mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[7715] Provided way for scripts set alternative gameobject state for client show.
Also use enum for gsmeobject states.
This commit is contained in:
parent
1ec21cfb71
commit
c2e6dd20dd
10 changed files with 80 additions and 53 deletions
|
|
@ -1081,7 +1081,15 @@ void ObjectMgr::LoadGameobjects()
|
|||
data.rotation3 = fields[10].GetFloat();
|
||||
data.spawntimesecs = fields[11].GetInt32();
|
||||
data.animprogress = fields[12].GetUInt32();
|
||||
data.go_state = fields[13].GetUInt32();
|
||||
|
||||
uint32 go_state = fields[13].GetUInt32();
|
||||
if (go_state >= MAX_GO_STATE)
|
||||
{
|
||||
sLog.outErrorDb("Table `gameobject` have gameobject (GUID: %u Entry: %u) with invalid `state` (%u) value, skip",guid,data.id,go_state);
|
||||
continue;
|
||||
}
|
||||
data.go_state = GOState(go_state);
|
||||
|
||||
data.spawnMask = fields[14].GetUInt8();
|
||||
data.phaseMask = fields[15].GetUInt16();
|
||||
int16 gameEvent = fields[16].GetInt16();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue