aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-02-02 22:31:11 +0100
committerQAston <none@none>2009-02-02 22:31:11 +0100
commitcccfd132dd4388f42da8087a9ad5ff54b7ec4808 (patch)
tree6e229287a189e9d907d144ac2a7f3d5ecd33a728 /src/game/Spell.cpp
parentf2e514eb0457799466f92bebb1ab45b7aa798cce (diff)
*Handle SPELL_AURA_MOD_WEAPONTYPE_IGNORE_TARGET_RESISTANCE and new spellmods.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index c97e35f1396..0c53ec763c5 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -3242,6 +3242,12 @@ void Spell::TakePower()
{
if(ihit->missCondition != SPELL_MISS_NONE && ihit->missCondition != SPELL_MISS_MISS/* && ihit->targetGUID!=m_caster->GetGUID()*/)
hit = false;
+ if (ihit->missCondition != SPELL_MISS_NONE)
+ {
+ //lower spell cost on fail (by talent aura)
+ if(Player *modOwner = ((Player*)m_caster)->GetSpellModOwner())
+ modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_SPELL_COST_REFUND_ON_FAIL, m_powerCost);
+ }
break;
}
if(hit && NeedsComboPoints(m_spellInfo))