Core/Spells: fixed Mana Tide amount calculation

This commit is contained in:
Ovahlord committed 2023-02-04 19:54:17 +01:00
1 parent c5046b0fec
commit 58b6681047
1 file changed
+8 -3
+8 -3
View File
@@ -841,9 +841,14 @@ class spell_sha_mana_tide_totem : public AuraScript
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
{
// @TODO: Exclude the "short term" buffs from the stat value
if (Unit* caster = GetUnitOwner())
if (Unit* owner = caster->GetCharmerOrOwner())
amount = CalculatePct(owner->GetStat(STAT_SPIRIT), amount);
Unit* caster = GetUnitOwner();
if (!caster || !caster->IsSummon())
return;
if (Unit* summoner = caster->ToTempSummon()->GetSummoner())
amount = CalculatePct(summoner->GetStat(STAT_SPIRIT), amount);
else
amount = 0;
}
void Register() override