From 9e10c27b2a4d060e6efd8ee49fdf0c2be69b9556 Mon Sep 17 00:00:00 2001 From: Ebrithil Date: Sun, 13 Dec 2009 21:20:08 +0300 Subject: [PATCH] [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 --- src/game/Unit.cpp | 15 ++++++++++++--- src/shared/revision_nr.h | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 588759a6d..b3535372f 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -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) { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index ab8a2f4a2..fbf8a240e 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8984" + #define REVISION_NR "8985" #endif // __REVISION_NR_H__ -- 2.11.4.GIT