diff options
author | tobmaps <spambot42@yandex.ru> | 2011-06-18 20:18:38 +0700 |
---|---|---|
committer | tobmaps <spambot42@yandex.ru> | 2011-06-18 20:18:38 +0700 |
commit | bfe1977f94c0443dd0624ffd95d9a75d66d71f32 (patch) | |
tree | d736f6aa830e29a681eb3ab747af4b9deadcdb5a /src | |
parent | 7f0af21fcd0d9d69e61390db58ff517356c8cf34 (diff) |
Core/Spells: Fix Seal of Vengeance and Seal of Corruption. Original patch by kezo90
Closes #1243
Closes #1461
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Entities/Unit/Unit.cpp | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 68026515ef7..43a5e1d12b8 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -6809,21 +6809,27 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger return false; // At melee attack or Hammer of the Righteous spell damage considered as melee attack - if ((procFlag & PROC_FLAG_DONE_MELEE_AUTO_ATTACK) || (procSpell && procSpell->Id == 53595)) - triggered_spell_id = 31803; + bool stacker = !procSpell || procSpell->Id == 53595; + bool damager = procSpell && procSpell->EquippedItemClass == ITEM_CLASS_WEAPON; + + if (!stacker && !damager) + return false; + + triggered_spell_id = 31803; + // On target with 5 stacks of Holy Vengeance direct damage is done if (Aura* aur = pVictim->GetAura(triggered_spell_id, GetGUID())) { if (aur->GetStackAmount() == 5) { - aur->RefreshDuration(); + if (stacker) + aur->RefreshDuration(); CastSpell(pVictim, 42463, true); return true; } } - // Only Autoattack can stack debuff - if (procFlag & PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS) + if (!stacker) return false; break; } @@ -6834,21 +6840,27 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger return false; // At melee attack or Hammer of the Righteous spell damage considered as melee attack - if ((procFlag & PROC_FLAG_DONE_MELEE_AUTO_ATTACK) || (procSpell && procSpell->Id == 53595)) - triggered_spell_id = 53742; + bool stacker = !procSpell || procSpell->Id == 53595; + bool damager = procSpell && procSpell->EquippedItemClass == ITEM_CLASS_WEAPON; + + if (!stacker && !damager) + return false; + + triggered_spell_id = 31803; + // On target with 5 stacks of Blood Corruption direct damage is done if (Aura* aur = pVictim->GetAura(triggered_spell_id, GetGUID())) { if (aur->GetStackAmount() == 5) { - aur->RefreshDuration(); + if (stacker) + aur->RefreshDuration(); CastSpell(pVictim, 53739, true); return true; } } - // Only Autoattack can stack debuff - if (procFlag & PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS) + if (!stacker) return false; break; } |