[11371] Drop not needed MAX_CONDITION define

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2011-04-16 23:40:56 +02:00
parent b39877f24a
commit 187a1916e3
3 changed files with 5 additions and 10 deletions

View file

@ -7607,13 +7607,7 @@ bool PlayerCondition::Meets(Player const * player) const
// Verification of condition values validity
bool PlayerCondition::IsValid(ConditionType condition, uint32 value1, uint32 value2)
{
if (condition >= MAX_CONDITION) // Wrong condition type
{
sLog.outErrorDb("Condition has bad type of %u, skipped ", condition );
return false;
}
switch (condition)
switch(condition)
{
case CONDITION_AURA:
{
@ -7881,6 +7875,9 @@ bool PlayerCondition::IsValid(ConditionType condition, uint32 value1, uint32 val
}
case CONDITION_NONE:
break;
default:
sLog.outErrorDb("Condition has bad type of %u, skipped ", condition);
return false;
}
return true;
}

View file

@ -357,8 +357,6 @@ enum ConditionType
// When player has spell or has item (when defined), condition return false.
};
#define MAX_CONDITION 29 // maximum value in ConditionType enum
struct PlayerCondition
{
ConditionType condition; // additional condition type

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11370"
#define REVISION_NR "11371"
#endif // __REVISION_NR_H__