Skip to content

Commit

Permalink
[11975] Use a few more enums instead of magic numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
Schmoozerd committed Apr 22, 2012
1 parent 806d27b commit e19471f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/game/Spell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand All @@ -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;
Expand All @@ -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())
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/game/SpellMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11974"
#define REVISION_NR "11975"
#endif // __REVISION_NR_H__

0 comments on commit e19471f

Please sign in to comment.