aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2015-10-29 14:13:33 +0100
committerShauren <shauren.trinity@gmail.com>2015-10-29 14:13:33 +0100
commit19a574b2e81b0f13b1e4399f82a04901d983bdbc (patch)
treebeb22a6b6d01b0651e1520dc396bdb19f7e96040 /src
parentead64502a3239d7657873e9e311edb4bb90ad4e0 (diff)
parentbd04a460116ccea177339ad06ff7de068cfa1b4b (diff)
Merge pull request #15771 from Zedron/6.x
Core/Spells: Fixed a mistake in SpellInfo::CalcPowerCost
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp3
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;
}