mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[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:
parent
a27ca31ce0
commit
cbb5143348
2 changed files with 13 additions and 4 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue