mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[11975] Use a few more enums instead of magic numbers
This commit is contained in:
parent
5d445d5da9
commit
1f24d991e3
3 changed files with 7 additions and 7 deletions
|
|
@ -585,7 +585,7 @@ void Spell::FillTargetMap()
|
|||
SetTargetMap(SpellEffectIndex(i), m_spellInfo->EffectImplicitTargetB[i], tmpUnitLists[i /*==effToIndex[i]*/]);
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
case TARGET_NONE:
|
||||
SetTargetMap(SpellEffectIndex(i), m_spellInfo->EffectImplicitTargetA[i], tmpUnitLists[i /*==effToIndex[i]*/]);
|
||||
tmpUnitLists[i /*==effToIndex[i]*/].push_back(m_caster);
|
||||
break;
|
||||
|
|
@ -598,7 +598,7 @@ void Spell::FillTargetMap()
|
|||
case TARGET_TABLE_X_Y_Z_COORDINATES:
|
||||
switch(m_spellInfo->EffectImplicitTargetB[i])
|
||||
{
|
||||
case 0:
|
||||
case TARGET_NONE:
|
||||
SetTargetMap(SpellEffectIndex(i), m_spellInfo->EffectImplicitTargetA[i], tmpUnitLists[i /*==effToIndex[i]*/]);
|
||||
|
||||
// need some target for processing
|
||||
|
|
@ -616,7 +616,7 @@ void Spell::FillTargetMap()
|
|||
case TARGET_SELF2:
|
||||
switch(m_spellInfo->EffectImplicitTargetB[i])
|
||||
{
|
||||
case 0:
|
||||
case TARGET_NONE:
|
||||
case TARGET_EFFECT_SELECT:
|
||||
SetTargetMap(SpellEffectIndex(i), m_spellInfo->EffectImplicitTargetA[i], tmpUnitLists[i /*==effToIndex[i]*/]);
|
||||
break;
|
||||
|
|
@ -629,7 +629,7 @@ void Spell::FillTargetMap()
|
|||
case TARGET_DUELVSPLAYER_COORDINATES:
|
||||
switch(m_spellInfo->EffectImplicitTargetB[i])
|
||||
{
|
||||
case 0:
|
||||
case TARGET_NONE:
|
||||
case TARGET_EFFECT_SELECT:
|
||||
SetTargetMap(SpellEffectIndex(i), m_spellInfo->EffectImplicitTargetA[i], tmpUnitLists[i /*==effToIndex[i]*/]);
|
||||
if (Unit* currentTarget = m_targets.getUnitTarget())
|
||||
|
|
@ -644,7 +644,7 @@ void Spell::FillTargetMap()
|
|||
default:
|
||||
switch(m_spellInfo->EffectImplicitTargetB[i])
|
||||
{
|
||||
case 0:
|
||||
case TARGET_NONE:
|
||||
case TARGET_EFFECT_SELECT:
|
||||
SetTargetMap(SpellEffectIndex(i), m_spellInfo->EffectImplicitTargetA[i], tmpUnitLists[i /*==effToIndex[i]*/]);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -3575,7 +3575,7 @@ bool SpellMgr::IsSpellValid(SpellEntry const* spellInfo, Player* pl, bool msg)
|
|||
{
|
||||
switch(spellInfo->Effect[i])
|
||||
{
|
||||
case 0:
|
||||
case SPELL_EFFECT_NONE:
|
||||
continue;
|
||||
|
||||
// craft spell for crafting nonexistent item (break client recipes list show)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11974"
|
||||
#define REVISION_NR "11975"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue