mirror of
https://github.com/mangosfour/server.git
synced 2026-01-01 16:37:12 +00:00
[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:
parent
5c05280c44
commit
7c555add76
14 changed files with 128 additions and 128 deletions
|
|
@ -160,7 +160,7 @@ inline bool IsSealSpell(SpellEntry const *spellInfo)
|
|||
return spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN &&
|
||||
( spellInfo->SpellFamilyFlags & SPELLFAMILYFLAG_PALADIN_SEALS ) &&
|
||||
// avoid counting target triggered effect as seal for avoid remove it or seal by it.
|
||||
spellInfo->EffectImplicitTargetA[0] == TARGET_SELF;
|
||||
spellInfo->EffectImplicitTargetA[EFFECT_INDEX_0] == TARGET_SELF;
|
||||
}
|
||||
|
||||
inline bool IsElementalShield(SpellEntry const *spellInfo)
|
||||
|
|
@ -171,17 +171,17 @@ inline bool IsElementalShield(SpellEntry const *spellInfo)
|
|||
|
||||
inline bool IsExplicitDiscoverySpell(SpellEntry const *spellInfo)
|
||||
{
|
||||
return ((spellInfo->Effect[0] == SPELL_EFFECT_CREATE_RANDOM_ITEM
|
||||
&& spellInfo->Effect[1] == SPELL_EFFECT_SCRIPT_EFFECT)
|
||||
return ((spellInfo->Effect[EFFECT_INDEX_0] == SPELL_EFFECT_CREATE_RANDOM_ITEM
|
||||
&& spellInfo->Effect[EFFECT_INDEX_1] == SPELL_EFFECT_SCRIPT_EFFECT)
|
||||
|| spellInfo->Id == 64323); // Book of Glyph Mastery (Effect0==SPELL_EFFECT_SCRIPT_EFFECT without any other data)
|
||||
}
|
||||
|
||||
inline bool IsLootCraftingSpell(SpellEntry const *spellInfo)
|
||||
{
|
||||
return (spellInfo->Effect[0]==SPELL_EFFECT_CREATE_RANDOM_ITEM ||
|
||||
return (spellInfo->Effect[EFFECT_INDEX_0] == SPELL_EFFECT_CREATE_RANDOM_ITEM ||
|
||||
// different random cards from Inscription (121==Virtuoso Inking Set category)
|
||||
// also Abyssal Shatter (63), any !=0 infact
|
||||
(spellInfo->Effect[0]==SPELL_EFFECT_CREATE_ITEM_2 && spellInfo->TotemCategory[0] != 0));
|
||||
(spellInfo->Effect[EFFECT_INDEX_0] == SPELL_EFFECT_CREATE_ITEM_2 && spellInfo->TotemCategory[0] != 0));
|
||||
}
|
||||
|
||||
int32 CompareAuraRanks(uint32 spellId_1, uint32 effIndex_1, uint32 spellId_2, uint32 effIndex_2);
|
||||
|
|
@ -330,11 +330,11 @@ inline bool IsAreaEffectTarget( Targets target )
|
|||
|
||||
inline bool IsAreaOfEffectSpell(SpellEntry const *spellInfo)
|
||||
{
|
||||
if(IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetA[0])) || IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetB[0])))
|
||||
if(IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetA[EFFECT_INDEX_0])) || IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetB[EFFECT_INDEX_0])))
|
||||
return true;
|
||||
if(IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetA[1])) || IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetB[1])))
|
||||
if(IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetA[EFFECT_INDEX_1])) || IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetB[EFFECT_INDEX_1])))
|
||||
return true;
|
||||
if(IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetA[2])) || IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetB[2])))
|
||||
if(IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetA[EFFECT_INDEX_2])) || IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetB[EFFECT_INDEX_2])))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
|
@ -353,9 +353,9 @@ inline bool IsAreaAuraEffect(uint32 effect)
|
|||
|
||||
inline bool IsDispelSpell(SpellEntry const *spellInfo)
|
||||
{
|
||||
if (spellInfo->Effect[0] == SPELL_EFFECT_DISPEL ||
|
||||
spellInfo->Effect[1] == SPELL_EFFECT_DISPEL ||
|
||||
spellInfo->Effect[2] == SPELL_EFFECT_DISPEL )
|
||||
if (spellInfo->Effect[EFFECT_INDEX_0] == SPELL_EFFECT_DISPEL ||
|
||||
spellInfo->Effect[EFFECT_INDEX_1] == SPELL_EFFECT_DISPEL ||
|
||||
spellInfo->Effect[EFFECT_INDEX_2] == SPELL_EFFECT_DISPEL )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue