[9403] Replace number with enum name where explicitly used in array/other checks

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-02-17 19:06:09 +01:00
parent 5c05280c44
commit 7c555add76
14 changed files with 128 additions and 128 deletions

View file

@ -2909,7 +2909,7 @@ bool ChatHandler::HandleLookupSpellCommand(const char* args)
if(loc < MAX_LOCALE)
{
bool known = target && target->HasSpell(id);
bool learn = (spellInfo->Effect[0] == SPELL_EFFECT_LEARN_SPELL);
bool learn = (spellInfo->Effect[EFFECT_INDEX_0] == SPELL_EFFECT_LEARN_SPELL);
uint32 talentCost = GetTalentSpellCost(id);
@ -2919,7 +2919,7 @@ bool ChatHandler::HandleLookupSpellCommand(const char* args)
// unit32 used to prevent interpreting uint8 as char at output
// find rank of learned spell for learning spell, or talent rank
uint32 rank = talentCost ? talentCost : sSpellMgr.GetSpellRank(learn ? spellInfo->EffectTriggerSpell[0] : id);
uint32 rank = talentCost ? talentCost : sSpellMgr.GetSpellRank(learn ? spellInfo->EffectTriggerSpell[EFFECT_INDEX_0] : id);
// send spell in "id - [name, rank N] [talent] [passive] [learn] [known]" format
std::ostringstream ss;