Skip to content

Commit

Permalink
Core/Spells: Fixes the rune cooldown when a hit mises the target
Browse files Browse the repository at this point in the history
Closes #412

Signed-off-by: Subv <s.v.h21@hotmail.com>
  • Loading branch information
Subv committed Apr 7, 2012
1 parent 945566e commit 7ce33ca
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/server/game/Spells/Spell.cpp
Expand Up @@ -4340,10 +4340,9 @@ void Spell::TakePower()
for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit) for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
if (ihit->targetGUID == targetGUID) 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) if (ihit->missCondition != SPELL_MISS_NONE)
{ {
hit = false;
//lower spell cost on fail (by talent aura) //lower spell cost on fail (by talent aura)
if (Player* modOwner = m_caster->ToPlayer()->GetSpellModOwner()) if (Player* modOwner = m_caster->ToPlayer()->GetSpellModOwner())
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_SPELL_COST_REFUND_ON_FAIL, m_powerCost); modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_SPELL_COST_REFUND_ON_FAIL, m_powerCost);
Expand Down

0 comments on commit 7ce33ca

Please sign in to comment.