[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); ((Creature*)pVictim)->AI()->AttackedBy(this);
} }
// polymorphed and other negative transformed cases // polymorphed, hex and other negative transformed cases
if(pVictim->getTransForm() && pVictim->hasUnitState(UNIT_STAT_CONFUSED)) uint32 morphSpell = pVictim->getTransForm();
pVictim->RemoveAurasDueToSpell(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) if(damagetype == DIRECT_DAMAGE || damagetype == SPELL_DIRECT_DAMAGE)
{ {

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "8984" #define REVISION_NR "8985"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__