[11593] Use MAX_UNIT_STAND_STATE instead client dependent last value in enum.

This commit is contained in:
VladimirMangos 2011-06-03 16:23:28 +04:00
parent a0852287ac
commit 8c560ebd97
3 changed files with 4 additions and 2 deletions

View file

@ -561,7 +561,7 @@ void ScriptMgr::LoadScripts(ScriptMapMap& scripts, const char* tablename)
}
case SCRIPT_COMMAND_STAND_STATE:
{
if (tmp.standState.stand_state > UNIT_STAND_STATE_CUSTOM)
if (tmp.standState.stand_state >= MAX_UNIT_STAND_STATE)
{
sLog.outErrorDb("Table `%s` has invalid stand state (datalong = %u) in SCRIPT_COMMAND_STAND_STATE for script id %u", tablename, tmp.standState.stand_state, tmp.id);
continue;

View file

@ -145,6 +145,8 @@ enum UnitStandStateType
UNIT_STAND_STATE_CUSTOM = 9 // Depends on model animation. Submerge, freeze, hide, hibernate, rest
};
#define MAX_UNIT_STAND_STATE 10
// byte flags value (UNIT_FIELD_BYTES_1,2)
enum UnitStandFlags
{

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11592"
#define REVISION_NR "11593"
#endif // __REVISION_NR_H__