From ed099e860079fa3b3bb49a6452687f5671480bd4 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Fri, 27 Jul 2018 11:45:38 +0200 Subject: [PATCH] Core/Spells: fixed Inquisition not consuming all Holy Power caused by an logic mistake in HandleHolyPower that was not thinking about spells that do not have a target --- src/server/game/Spells/Spell.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index e3b83792f6..c683c5887f 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -5003,7 +5003,7 @@ void Spell::HandleHolyPower(Player* caster) if (!m_powerCost || !modOwner) return; - if (uint64 targetGUID = m_targets.GetUnitTargetGUID()) + if (ObjectGuid targetGUID = m_targets.GetUnitTargetGUID()) { for (std::list::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit) { @@ -5015,13 +5015,13 @@ void Spell::HandleHolyPower(Player* caster) break; } } + } - // The spell did hit the target, apply aura cost mods if there are any. - if (hit) - { - modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_COST, m_powerCost, this); - m_caster->ModifyPower(POWER_HOLY_POWER, -m_powerCost); - } + // The spell did hit the target, apply aura cost mods if there are any. + if (hit) + { + modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_COST, m_powerCost, this); + m_caster->ModifyPower(POWER_HOLY_POWER, -m_powerCost); } }