diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/SpellInfo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 2c62209ce4d..fbe4388e62c 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -3775,6 +3775,7 @@ std::vector<SpellPowerCost> SpellInfo::CalcPowerCost(Unit const* caster, SpellSc // Base powerCost int32 powerCost = power->ManaCost; + bool initiallyNegative = powerCost < 0; // PCT cost from total amount if (power->PowerCostPct) { @@ -3906,6 +3907,10 @@ std::vector<SpellPowerCost> SpellInfo::CalcPowerCost(Unit const* caster, SpellSc continue; } + // power cost cannot become negative if initially positive + if (initiallyNegative != (powerCost < 0)) + powerCost = 0; + bool found = false; for (SpellPowerCost& cost : costs) { |