diff options
author | Sebastian Valle Herrera <subv2112@gmail.com> | 2014-06-07 11:49:00 -0500 |
---|---|---|
committer | Sebastian Valle Herrera <subv2112@gmail.com> | 2014-06-07 11:49:00 -0500 |
commit | 6c31c33f667e4a861e40418f8b10e4e6b06d30c1 (patch) | |
tree | 5874aadad3f0fafe492a20b948cfb79a96a202ac /src | |
parent | 35b8874ccaef8515dcd7ac68cd5f43020a5b7ac5 (diff) | |
parent | d99f0362cb9ee9e6710162c147260bb7e23eef10 (diff) |
Merge pull request #12128 from Trisjdc/aura_transform
Core/Auras: Update model overwriting rules for SPELL_AURA_TRANSFORM
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 2096f21e5a1..07691e14e4f 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()) { |