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