diff options
author | Anubisss <none@none> | 2010-03-30 15:49:59 +0200 |
---|---|---|
committer | Anubisss <none@none> | 2010-03-30 15:49:59 +0200 |
commit | b66f3128886fdc0fae71d83cbc44440de8f77dd9 (patch) | |
tree | c6940ddc1970f6b95e67ecd3d35ffcdacaabe183 /src/game/Unit.cpp | |
parent | 66f5d749c0f72053ddc8f2c9716310102b822f03 (diff) |
Break spells on damage in some aura types.
This commit fixes spell Repentance(20066).
Patch by QAston, thanks to him.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index f6b9438e828..869615a6f2c 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -13734,19 +13734,20 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag, case SPELL_AURA_MOD_STUN: case SPELL_AURA_MOD_ROOT: case SPELL_AURA_TRANSFORM: - if (isVictim && damage) + { + // chargeable mods are breaking on hit + if (useCharges) + takeCharges = true; + else { - // Damage is dealt after proc system - lets ignore auras which wasn't updated yet - // to make spell not remove its own aura - if (i->aura->GetDuration() == i->aura->GetMaxDuration()) - break; int32 damageLeft = triggeredByAura->GetAmount(); // No damage left - if (damageLeft < damage ) + if (damageLeft < damage) i->aura->Remove(); else - triggeredByAura->SetAmount(damageLeft-damage); + triggeredByAura->SetAmount(damageLeft - damage); } + } break; //case SPELL_AURA_ADD_FLAT_MODIFIER: //case SPELL_AURA_ADD_PCT_MODIFIER: |