Skip to content

Instantly share code, notes, and snippets.

@tobmaps
Created April 10, 2011 17:47
Show Gist options
  • Save tobmaps/912563 to your computer and use it in GitHub Desktop.
Save tobmaps/912563 to your computer and use it in GitHub Desktop.
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 7543fb5..e48b010 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -4374,15 +4374,15 @@ void Spell::TakePower()
bool hit = true;
if (m_caster->GetTypeId() == TYPEID_PLAYER)
{
- if (m_spellInfo->powerType == POWER_RAGE || m_spellInfo->powerType == POWER_ENERGY || m_spellInfo->powerType == POWER_RUNE)
+ if (m_spellInfo->powerType == POWER_RAGE || m_spellInfo->powerType == POWER_ENERGY ||
+ m_spellInfo->powerType == POWER_RUNE || m_spellInfo->powerType == POWER_RUNIC_POWER)
if (uint64 targetGUID = m_targets.getUnitTargetGUID())
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);
@@ -4415,10 +4415,10 @@ void Spell::TakePower()
return;
}
- if (hit)
+ if (hit || m_spellInfo->AttributesEx & SPELL_ATTR1_REQ_COMBO_POINTS1)
m_caster->ModifyPower(powerType, -m_powerCost);
else
- m_caster->ModifyPower(powerType, -irand(0, m_powerCost/4));
+ m_caster->ModifyPower(powerType, -m_powerCost/5);
// Set the five second timer
if (powerType == POWER_MANA && m_powerCost > 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment