Core/Spells: Fixes the rune cooldown when a hit mises the target

Closes #412

Signed-off-by: Subv <s.v.h21@hotmail.com>
This commit is contained in:
Subv
2012-04-07 16:20:01 -05:00
parent 945566e84e
commit 7ce33ca0a6

View File

@@ -4340,10 +4340,9 @@ void Spell::TakePower()
for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
if (ihit->targetGUID == targetGUID)
{
if (ihit->missCondition != SPELL_MISS_NONE && ihit->missCondition != SPELL_MISS_MISS/* && ihit->targetGUID != m_caster->GetGUID()*/)
hit = false;
if (ihit->missCondition != SPELL_MISS_NONE)
{
hit = false;
//lower spell cost on fail (by talent aura)
if (Player* modOwner = m_caster->ToPlayer()->GetSpellModOwner())
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_SPELL_COST_REFUND_ON_FAIL, m_powerCost);