diff options
author | megamage <none@none> | 2009-08-26 16:33:07 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-08-26 16:33:07 -0500 |
commit | dad2c55287d4a9c35cbfa1ad4e8d3e8e8255f588 (patch) | |
tree | f31e3b5e7db23c13bd92a37e612ed7222eb0a88a | |
parent | b68aa14ef17c6f980eff6a64290bacb7b925cde4 (diff) |
* Also check for Power Type when checking out if player has enough Runes to cast spell. Some spells have Rune cost entry, but use Runic Power instead ( eg. Mind Freeze ) By thenecromancer
--HG--
branch : trunk
-rw-r--r-- | src/game/Spell.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 7d4099500d9..550b6e25906 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -3493,7 +3493,7 @@ void Spell::SendSpellStart() && m_spellInfo->powerType != POWER_HEALTH ) castFlags |= CAST_FLAG_POWER_LEFT_SELF; - if(m_spellInfo->runeCostID) + if(m_spellInfo->runeCostID && m_spellInfo->powerType == POWER_RUNE) castFlags |= CAST_FLAG_UNKNOWN10; WorldPacket data(SMSG_SPELL_START, (8+8+4+4+2)); @@ -3540,7 +3540,7 @@ void Spell::SendSpellGo() && m_spellInfo->powerType != POWER_HEALTH ) castFlags |= CAST_FLAG_POWER_LEFT_SELF; // should only be sent to self, but the current messaging doesn't make that possible - if((m_caster->GetTypeId() == TYPEID_PLAYER) && (m_caster->getClass() == CLASS_DEATH_KNIGHT) && m_spellInfo->runeCostID) + if((m_caster->GetTypeId() == TYPEID_PLAYER) && (m_caster->getClass() == CLASS_DEATH_KNIGHT) && m_spellInfo->runeCostID && m_spellInfo->powerType == POWER_RUNE) { castFlags |= CAST_FLAG_UNKNOWN10; // same as in SMSG_SPELL_START castFlags |= CAST_FLAG_UNKNOWN7; // rune cooldowns list @@ -4093,6 +4093,9 @@ void Spell::TakeAmmo() SpellCastResult Spell::CheckRuneCost(uint32 runeCostID) { + if(m_spellInfo->powerType != POWER_RUNE || !runeCostID) + return SPELL_CAST_OK; + if(m_caster->GetTypeId() != TYPEID_PLAYER) return SPELL_CAST_OK; |