only apply shapeshift aura passives when changing forms

This commit is contained in:
hondacrx
2017-11-05 15:47:34 -05:00
parent b9d3e7623b
commit 76b8c4a10d
+8 -4
View File
@@ -1392,7 +1392,12 @@ namespace Game.Spells
if (aurApp.HasRemoveMode()) if (aurApp.HasRemoveMode())
return; return;
ShapeShiftForm prevForm = target.GetShapeshiftForm();
target.SetShapeshiftForm(form); target.SetShapeshiftForm(form);
// add the shapeshift aura's boosts
if (prevForm != form)
HandleShapeshiftBoosts(target, true);
if (modelid > 0) if (modelid > 0)
{ {
SpellInfo transformSpellInfo = Global.SpellMgr.GetSpellInfo(target.GetTransForm()); SpellInfo transformSpellInfo = Global.SpellMgr.GetSpellInfo(target.GetTransForm());
@@ -1435,11 +1440,10 @@ namespace Game.Spells
default: default:
break; break;
} }
}
// adding/removing linked auras // remove the shapeshift aura's boosts
// add/remove the shapeshift aura's boosts HandleShapeshiftBoosts(target, apply);
HandleShapeshiftBoosts(target, apply); }
if (target.IsTypeId(TypeId.Player)) if (target.IsTypeId(TypeId.Player))
target.ToPlayer().InitDataForForm(); target.ToPlayer().InitDataForForm();