aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellInfo.cpp
diff options
context:
space:
mode:
authorxinef1 <w.szyszko2@gmail.com>2017-02-19 06:10:50 +0100
committerariel- <ariel-@users.noreply.github.com>2017-02-19 02:10:50 -0300
commite261754c9cd8b14a0555e866b4e193e1fe3c25ae (patch)
tree123f28b82eadf63ce52ed3f26332da5069991b6a /src/server/game/Spells/SpellInfo.cpp
parent76f3e0edea88ce8854de11408b0f46bb6b221b49 (diff)
Fixed setting and unsetting of m_spellModTakingSpell (#19116)
- A problem when a different spell tries to overwrite existing ModTakingSpell should no longer happen
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index d5ce194e0d7..a5df6218e83 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -3110,7 +3110,7 @@ uint32 SpellInfo::GetRecoveryTime() const
return RecoveryTime > CategoryRecoveryTime ? RecoveryTime : CategoryRecoveryTime;
}
-int32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask) const
+int32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask, Spell* spell) const
{
// Spell drain all exist power on cast (Only paladin lay of Hands)
if (HasAttribute(SPELL_ATTR1_DRAIN_ALL_POWER))
@@ -3172,7 +3172,7 @@ int32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask) c
// Apply cost mod by spell
if (Player* modOwner = caster->GetSpellModOwner())
- modOwner->ApplySpellMod<SPELLMOD_COST>(Id, powerCost);
+ modOwner->ApplySpellMod<SPELLMOD_COST>(Id, powerCost, spell);
if (!caster->IsControlledByPlayer())
{