mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[11371] Drop not needed MAX_CONDITION define
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
b39877f24a
commit
187a1916e3
3 changed files with 5 additions and 10 deletions
|
|
@ -7607,12 +7607,6 @@ bool PlayerCondition::Meets(Player const * player) const
|
||||||
// Verification of condition values validity
|
// Verification of condition values validity
|
||||||
bool PlayerCondition::IsValid(ConditionType condition, uint32 value1, uint32 value2)
|
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:
|
case CONDITION_AURA:
|
||||||
|
|
@ -7881,6 +7875,9 @@ bool PlayerCondition::IsValid(ConditionType condition, uint32 value1, uint32 val
|
||||||
}
|
}
|
||||||
case CONDITION_NONE:
|
case CONDITION_NONE:
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
sLog.outErrorDb("Condition has bad type of %u, skipped ", condition);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -357,8 +357,6 @@ enum ConditionType
|
||||||
// When player has spell or has item (when defined), condition return false.
|
// When player has spell or has item (when defined), condition return false.
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MAX_CONDITION 29 // maximum value in ConditionType enum
|
|
||||||
|
|
||||||
struct PlayerCondition
|
struct PlayerCondition
|
||||||
{
|
{
|
||||||
ConditionType condition; // additional condition type
|
ConditionType condition; // additional condition type
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11370"
|
#define REVISION_NR "11371"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue