Break spells on damage in some aura types.

This commit fixes spell Repentance(20066).

Patch by QAston, thanks to him.

--HG--
branch : trunk
This commit is contained in:
Anubisss
2010-03-30 15:49:59 +02:00
parent 66f5d749c0
commit b66f312888
+6 -5
View File
@@ -13734,12 +13734,12 @@ 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)
{
// 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;
// chargeable mods are breaking on hit
if (useCharges)
takeCharges = true;
else
{
int32 damageLeft = triggeredByAura->GetAmount();
// No damage left
if (damageLeft < damage)
@@ -13747,6 +13747,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag,
else
triggeredByAura->SetAmount(damageLeft - damage);
}
}
break;
//case SPELL_AURA_ADD_FLAT_MODIFIER:
//case SPELL_AURA_ADD_PCT_MODIFIER: