diff options
| author | Zedron <world_of_warcraft@ymail.com> | 2015-10-28 16:57:52 -0500 |
|---|---|---|
| committer | Zedron <world_of_warcraft@ymail.com> | 2015-10-28 16:57:52 -0500 |
| commit | bd04a460116ccea177339ad06ff7de068cfa1b4b (patch) | |
| tree | b3d061e7c3b4614a76ae0d9a635e954c5a37ba17 /src | |
| parent | bd16520ecc91d827abae7f0447cc292fe9e843e9 (diff) | |
Core/Spells: Fixed a mistake in SpellInfo::CalcPowerCost
Fixed a mistake which caused some SPELLMOD_COST modifiers to give (lots) of power instead of taking power in Spell::TakePower
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Spells/SpellInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 309b737399e..e91dadca57e 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -2729,7 +2729,8 @@ std::vector<SpellInfo::CostData> SpellInfo::CalcPowerCost(Unit const* caster, Sp else collector(sDB2Manager.GetSpellPowers(Id, caster->GetMap()->GetDifficultyID())); - std::remove_if(costs.begin(), costs.end(), [](CostData const& cost) { return cost.Amount <= 0; }); + // POWER_RUNES is handled by SpellRuneCost.db2, and cost.Amount is always 0 (see Spell::TakeRunePower) + costs.erase(std::remove_if(costs.begin(), costs.end(), [](CostData const& cost) { return cost.Power != POWER_RUNES && cost.Amount <= 0; }), costs.end()); return costs; } |
