* 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
This commit is contained in:
megamage
2009-08-26 16:33:07 -05:00
parent b68aa14ef1
commit dad2c55287

View File

@@ -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;