Core/Auras: only apply shapeshift aura passives when changing forms

Closes #14845
Closes #17617
This commit is contained in:
ariel-
2016-10-28 12:12:27 -03:00
parent 042023877a
commit eb093c1538

View File

@@ -1776,7 +1776,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());
@@ -1848,11 +1853,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();