diff options
author | Rat <none@none> | 2010-10-05 18:07:41 +0200 |
---|---|---|
committer | Rat <none@none> | 2010-10-05 18:07:41 +0200 |
commit | f745705ef997ee0a50bef3aed36f0e1e0cfaba11 (patch) | |
tree | b8463d1fd0218ee614711b54f81e6bf3b88a1368 /src/server/game/Conditions/ConditionMgr.cpp | |
parent | f733d8b224ee17fbfbb0a1f3eda360b50a9b355b (diff) |
Code/ConditionMgr: cleanup
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Conditions/ConditionMgr.cpp')
-rw-r--r-- | src/server/game/Conditions/ConditionMgr.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index b60cb428d3b..7dbe704264e 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -160,19 +160,19 @@ bool Condition::Meets(Player * player, Unit* invoker) { switch (mConditionValue2) { - case 0: + case LVL_COND_EQ: condMeets = player->getLevel() == mConditionValue1; break; - case 1: + case LVL_COND_HIGH: condMeets = player->getLevel() > mConditionValue1; break; - case 2: + case LVL_COND_LOW: condMeets = player->getLevel() < mConditionValue1; break; - case 3: + case LVL_COND_HIGH_EQ: condMeets = player->getLevel() >= mConditionValue1; break; - case 4: + case LVL_COND_LOW_EQ: condMeets = player->getLevel() <= mConditionValue1; break; } @@ -1265,7 +1265,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) } case CONDITION_LEVEL: { - if (cond->mConditionValue2 > 4) + if (cond->mConditionValue2 >= LVL_COND_MAX) { sLog.outErrorDb("Level condition has invalid option (%u), skipped", cond->mConditionValue2); return false; |