diff options
author | Blaymoira <none@none> | 2009-01-25 12:00:30 +0100 |
---|---|---|
committer | Blaymoira <none@none> | 2009-01-25 12:00:30 +0100 |
commit | a0b7d98caa381ea436102dc7ef61b4ed48237aa7 (patch) | |
tree | 0126ceac5e052755fd1eaa566de759dfcc05400b /src/game/Unit.cpp | |
parent | f57ed8519cd76435146201404d4ab0e868136183 (diff) |
*Fixed aura interrupting when damage is absorbed - by _krz
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 2e966eb53cc..9d9b1fdc101 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -627,11 +627,16 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa } } } - } - + } + if (damagetype != NODAMAGE) + { + // interrupting auras with AURA_INTERRUPT_FLAG_DAMAGE before checking !damage (absorbed damage breaks that type of auras) + pVictim->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_DAMAGE, spellProto ? spellProto->Id : 0); + pVictim->RemoveSpellbyDamageTaken(damage, spellProto ? spellProto->Id : 0); + } - if(!damage) //when will zero damage? need interrupt aura? + if(!damage) { // Rage from physical damage received . if(cleanDamage && cleanDamage->damage && (damageSchoolMask & SPELL_SCHOOL_MASK_NORMAL) && pVictim->GetTypeId() == TYPEID_PLAYER && (pVictim->getPowerType() == POWER_RAGE)) @@ -803,9 +808,6 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa if (damagetype != NODAMAGE && damage)// && pVictim->GetTypeId() == TYPEID_PLAYER) { - pVictim->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_DAMAGE, spellProto ? spellProto->Id : 0); - pVictim->RemoveSpellbyDamageTaken(damage, spellProto ? spellProto->Id : 0); - /*const SpellEntry *se = i->second->GetSpellProto(); next = i; ++next; if (spellProto && spellProto->Id == se->Id) // Not drop auras added by self |