mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[11593] Use MAX_UNIT_STAND_STATE instead client dependent last value in enum.
This commit is contained in:
parent
a0852287ac
commit
8c560ebd97
3 changed files with 4 additions and 2 deletions
|
|
@ -561,7 +561,7 @@ void ScriptMgr::LoadScripts(ScriptMapMap& scripts, const char* tablename)
|
||||||
}
|
}
|
||||||
case SCRIPT_COMMAND_STAND_STATE:
|
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);
|
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;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,8 @@ enum UnitStandStateType
|
||||||
UNIT_STAND_STATE_CUSTOM = 9 // Depends on model animation. Submerge, freeze, hide, hibernate, rest
|
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)
|
// byte flags value (UNIT_FIELD_BYTES_1,2)
|
||||||
enum UnitStandFlags
|
enum UnitStandFlags
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11592"
|
#define REVISION_NR "11593"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue