diff --git a/src/game/ScriptMgr.cpp b/src/game/ScriptMgr.cpp index 1229b5bca..16a45cfe6 100644 --- a/src/game/ScriptMgr.cpp +++ b/src/game/ScriptMgr.cpp @@ -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; diff --git a/src/game/Unit.h b/src/game/Unit.h index 651eb1585..4a6e7b818 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -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 { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 4cb14d807..8c0aa5414 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11592" + #define REVISION_NR "11593" #endif // __REVISION_NR_H__