Core/Auras: implement mana cost modification aura

Port From (https://github.com/TrinityCore/TrinityCore/commit/a76c08843fc1695241b7246c4014322ee07a6453)
This commit is contained in:
hondacrx
2021-02-22 16:06:13 -05:00
parent e74d30024f
commit f25af46c8f
4 changed files with 15 additions and 5 deletions
+3 -4
View File
@@ -2773,9 +2773,6 @@ namespace Game.Spells
flatMod += eff.GetAmount();
}
if (power.PowerType == PowerType.Mana)
flatMod *= (int)(1.0f + caster.m_unitData.ManaCostMultiplier); // this is wrong
powerCost += flatMod;
}
@@ -2842,7 +2839,9 @@ namespace Game.Spells
powerCost += MathFunctions.CalculatePct(powerCost, eff.GetAmount());
}
if (power.PowerType == PowerType.Health)
if (power.PowerType == PowerType.Mana)
powerCost = (int)((float)powerCost * (1.0f + caster.m_unitData.ManaCostMultiplier));
else if (power.PowerType == PowerType.Health)
{
healthCost += powerCost;
continue;