diff options
author | ariel- <ariel-@users.noreply.github.com> | 2016-10-28 12:12:27 -0300 |
---|---|---|
committer | joschiwald <joschiwald.trinity@gmail.com> | 2017-11-05 13:02:59 +0100 |
commit | 5f3434387eb5ff98ca9abbf9e5a309f0641e8e77 (patch) | |
tree | 9dc8bc2f9a81a493490f123e9effe58283639e58 /src | |
parent | ceb7c048276bf15b79d46aff530c8c1cd8790cda (diff) |
Core/Auras: only apply shapeshift aura passives when changing forms
Closes #14845
Closes #17617
(cherry picked from commit eb093c1538013b2a103ea67b017c60f345bd90cf)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index f4a78be86e4..86e340d0b17 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1778,7 +1778,12 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo if (aurApp->GetRemoveMode()) return; + ShapeshiftForm prevForm = target->GetShapeshiftForm(); target->SetShapeshiftForm(form); + // add the shapeshift aura's boosts + if (prevForm != form) + HandleShapeshiftBoosts(target, true); + if (modelid > 0) { SpellInfo const* transformSpellInfo = sSpellMgr->GetSpellInfo(target->getTransForm()); @@ -1819,11 +1824,10 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo default: break; } - } - // adding/removing linked auras - // add/remove the shapeshift aura's boosts - HandleShapeshiftBoosts(target, apply); + // remove the shapeshift aura's boosts + HandleShapeshiftBoosts(target, false); + } if (target->GetTypeId() == TYPEID_PLAYER) target->ToPlayer()->InitDataForForm(); |