Core/Spells: fixed Mana Tide amount calculation
This commit is contained in:
1 parent
c5046b0fec
commit
58b6681047
1 file changed
+8
-3
@@ -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
|
||||
|
||||
Reference in new issue
Block a user