Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From ab2fa41322f5c02fdea66ca3d7abe80d04403c67 Mon Sep 17 00:00:00 2001
- From: unknown <cristi@cristis-PC.(none)>
- Date: Sat, 28 Jul 2012 06:01:17 +0300
- Subject: [PATCH] Fix talent Sin and Punishment - Priest (both effects).
- ---
- src/server/game/Entities/Unit/Unit.cpp | 69 +++++++++++++++++++++++++-------
- 1 file changed, 54 insertions(+), 15 deletions(-)
- diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
- index 46207ff..95871d7 100644
- --- a/src/server/game/Entities/Unit/Unit.cpp
- +++ b/src/server/game/Entities/Unit/Unit.cpp
- @@ -3742,6 +3742,35 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint32 dispellerSpellId
- }
- return;
- }
- + case SPELLFAMILY_PRIEST:
- + {
- + if(aura->GetId() == 34914) //Vampiric Touch
- + {
- + Unit* caster = aura->GetCaster();
- + if(caster)
- + {
- + uint32 uChance = 0;
- + if(caster->HasAura(87099))
- + uChance = 50;
- + else if(caster->HasAura(87100))
- + uChance = 100;
- +
- + if(uChance && roll_chance_i(uChance))
- + {
- + std::list<Unit*> targets;
- + SkyFire::AnyUnfriendlyUnitInObjectRangeCheck u_check(dispeller,caster,10.0f);
- + SkyFire::UnitListSearcher<SkyFire::AnyUnfriendlyUnitInObjectRangeCheck> searcher(caster, targets,u_check);
- + dispeller->VisitNearbyObject(10.0f,searcher);
- + for (std::list<Unit*>::const_iterator iter = targets.begin(); iter != targets.end(); ++iter)
- + {
- + if(caster->IsHostileTo(*iter))
- + (*iter)->AddAura(87204,*iter);
- + }
- + }
- + }
- + }
- + break;
- + }
- default:
- break;
- }
- @@ -6363,21 +6392,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
- target = this;
- break;
- - }
- - // Sin and Punishment
- - case 87100:
- - case 87099:
- - {
- - if (Player* caster = triggeredByAura->GetCaster()->ToPlayer())
- - {
- - if (caster->HasSpellCooldown(34433))
- - {
- - uint32 seconds = triggeredByAura->GetSpellInfo()->Effects[triggeredByAura->GetEffIndex()].CalcValue();
- - caster->UpdateSpellCooldown(34433, seconds);
- - return true;
- - }
- - }
- - return false;
- }
- // Glyph of Prayer of Healing
- case 55680:
- @@ -11542,6 +11556,31 @@ uint32 Unit::SpellCriticalDamageBonus(SpellInfo const* spellProto, uint32 damage
- if(unit = aura->GetCaster())
- unit->CastSpell(unit,85759);
- }
- + //mind flay crit
- + else if(spellProto->Id == 15407) //has sin and punishment talents
- + {
- + if (modOwner->HasSpellCooldown(34433)) //has cooldown at shadowfiend
- + {
- + uint32 seconds = 0;
- +
- + if(modOwner->HasAura(87099)) //sin & punishment rank 1
- + seconds = -5;
- + else if(modOwner->HasAura(87100)) //sin & punisment rank 2
- + seconds = -10;
- +
- + uint32 curCooldown = modOwner->GetSpellCooldownDelay(34433);
- +
- + curCooldown += seconds;
- +
- + modOwner->AddSpellCooldown(34433, 0, uint32(time(NULL) + curCooldown));
- +
- + WorldPacket data(SMSG_MODIFY_COOLDOWN, 4+8+4);
- + data << uint32(34433);
- + data << uint64(GetGUID());
- + data << int32(seconds * 1000);
- + modOwner->GetSession()->SendPacket(&data);
- + }
- + }
- }
- return damage;
- --
- 1.7.10.msysgit.1
Advertisement
Add Comment
Please, Sign In to add comment