mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +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);
|
((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)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue