diff options
author | Subv2112 <s.v.h21@hotmail.com> | 2012-01-28 12:45:27 -0500 |
---|---|---|
committer | Subv2112 <s.v.h21@hotmail.com> | 2012-01-28 12:45:27 -0500 |
commit | 59f378ea8980efa25fe1ec620cd872e64f5cf303 (patch) | |
tree | 4bb3221014e53df38ff6aeb3001e00153d77fbe7 /src | |
parent | ff81a2455b9dc9afb4e3875a02899fc52b0a510f (diff) |
Core/Conditions: Fixed the error introduced in the previous commit
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Conditions/ConditionMgr.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 9b045a8ed6a..dd46898a0c6 100755 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -1180,9 +1180,9 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) } case CONDITION_CLASS: { - if (cond->mConditionValue1 >= MAX_CLASSES) + if (!(cond->mConditionValue1 & CLASSMASK_ALL_PLAYABLE)) { - sLog->outErrorDb("Class condition has non existing class (%u), skipped", cond->mConditionValue1); + sLog->outErrorDb("Class condition has non existing classmask (%u), skipped", cond->mConditionValue1 & ~CLASSMASK_ALL_PLAYABLE); return false; } @@ -1192,9 +1192,9 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) } case CONDITION_RACE: { - if (cond->mConditionValue1 >= MAX_RACES) + if (!(cond->mConditionValue1 & RACEMASK_ALL_PLAYABLE)) { - sLog->outErrorDb("Race condition has non existing race (%u), skipped", cond->mConditionValue1); + sLog->outErrorDb("Race condition has non existing racemask (%u), skipped", cond->mConditionValue1 & ~RACEMASK_ALL_PLAYABLE); return false; } |