[8529] check rune cost only if spell has PowerType == POWER_RUNE. Patch provided by yavi.

Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
Ambal 2009-09-25 14:28:43 +03:00 committed by tomrus88
parent d482660177
commit a202347079
2 changed files with 8 additions and 4 deletions

View file

@ -5091,9 +5091,13 @@ SpellCastResult Spell::CheckPower()
return SPELL_FAILED_UNKNOWN;
}
SpellCastResult failReason = CheckRuneCost(m_spellInfo->runeCostID);
if(failReason != SPELL_CAST_OK)
return failReason;
//check rune cost only if a spell has PowerType == POWER_RUNE
if(m_spellInfo->powerType == POWER_RUNE)
{
SpellCastResult failReason = CheckRuneCost(m_spellInfo->runeCostID);
if(failReason != SPELL_CAST_OK)
return failReason;
}
// Check power amount
Powers powerType = Powers(m_spellInfo->powerType);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8528"
#define REVISION_NR "8529"
#endif // __REVISION_NR_H__