[8985] Remove morph from spells including aura SPELL_AURA_MOD_PACIFY_SILENCE

This fix at damage transformation remove for spell 51514/47585 and ranks.

Thanks to KAPATEJIb for prepare compatible version for current sources.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Ebrithil 2009-12-13 21:20:08 +03:00 committed by VladimirMangos
parent a27ca31ce0
commit cbb5143348
2 changed files with 13 additions and 4 deletions

View file

@ -764,9 +764,18 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
((Creature*)pVictim)->AI()->AttackedBy(this);
}
// polymorphed and other negative transformed cases
if(pVictim->getTransForm() && pVictim->hasUnitState(UNIT_STAT_CONFUSED))
pVictim->RemoveAurasDueToSpell(pVictim->getTransForm());
// polymorphed, hex and other negative transformed cases
uint32 morphSpell = pVictim->getTransForm();
if (morphSpell && !IsPositiveSpell(morphSpell))
{
if (SpellEntry const* morphEntry = sSpellStore.LookupEntry(morphSpell))
{
if (IsSpellHaveAura(morphEntry, SPELL_AURA_MOD_CONFUSE))
pVictim->RemoveAurasDueToSpell(morphSpell);
else if (IsSpellHaveAura(morphEntry, SPELL_AURA_MOD_PACIFY_SILENCE))
pVictim->RemoveSpellbyDamageTaken(SPELL_AURA_MOD_PACIFY_SILENCE, damage);
}
}
if(damagetype == DIRECT_DAMAGE || damagetype == SPELL_DIRECT_DAMAGE)
{