diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index b87524357d2..0dc6acdd4d8 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1672,9 +1672,6 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo if (aurApp->GetRemoveMode()) return; - if (modelid > 0) - target->SetDisplayId(modelid); - if (PowerType != POWER_MANA) { uint32 oldPower = target->GetPower(PowerType); @@ -1725,6 +1722,12 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo return; target->SetShapeshiftForm(form); + if (modelid > 0) + { + SpellInfo const* transformSpellInfo = sSpellMgr->GetSpellInfo(target->getTransForm()); + if (!transformSpellInfo || !GetSpellInfo()->IsPositive()) + target->SetDisplayId(modelid); + } } else { @@ -1847,9 +1850,11 @@ void AuraEffect::HandleAuraTransform(AuraApplication const* aurApp, uint8 mode, if (apply) { - // update active transform spell only when transform or shapeshift not set or not overwriting negative by positive case - if (!target->GetModelForForm(target->GetShapeshiftForm()) || !GetSpellInfo()->IsPositive()) + // update active transform spell only when transform not set or not overwriting negative by positive case + SpellInfo const* transformSpellInfo = sSpellMgr->GetSpellInfo(target->getTransForm()); + if (!transformSpellInfo || !GetSpellInfo()->IsPositive() || transformSpellInfo->IsPositive()) { + target->setTransForm(GetId()); // special case (spell specific functionality) if (GetMiscValue() == 0) { @@ -2018,11 +2023,6 @@ void AuraEffect::HandleAuraTransform(AuraApplication const* aurApp, uint8 mode, } } - // update active transform spell only when transform or shapeshift not set or not overwriting negative by positive case - SpellInfo const* transformSpellInfo = sSpellMgr->GetSpellInfo(target->getTransForm()); - if (!transformSpellInfo || !GetSpellInfo()->IsPositive() || transformSpellInfo->IsPositive()) - target->setTransForm(GetId()); - // polymorph case if ((mode & AURA_EFFECT_HANDLE_REAL) && target->GetTypeId() == TYPEID_PLAYER && target->IsPolymorphed()) { |