mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[11808] Fix an old bug related to GO spawnmask check
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
3567e69a3d
commit
241445aeeb
2 changed files with 13 additions and 14 deletions
|
|
@ -1481,6 +1481,13 @@ void ObjectMgr::LoadGameObjects()
|
|||
data.rotation.z = fields[ 9].GetFloat();
|
||||
data.rotation.w = fields[10].GetFloat();
|
||||
data.spawntimesecs = fields[11].GetInt32();
|
||||
data.animprogress = fields[12].GetUInt32();
|
||||
uint32 go_state = fields[13].GetUInt32();
|
||||
data.spawnMask = fields[14].GetUInt8();
|
||||
data.phaseMask = fields[15].GetUInt16();
|
||||
int16 gameEvent = fields[16].GetInt16();
|
||||
int16 GuidPoolId = fields[17].GetInt16();
|
||||
int16 EntryPoolId = fields[18].GetInt16();
|
||||
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(data.mapid);
|
||||
if (!mapEntry)
|
||||
|
|
@ -1497,9 +1504,6 @@ void ObjectMgr::LoadGameObjects()
|
|||
sLog.outErrorDb("Table `gameobject` have gameobject (GUID: %u Entry: %u) with `spawntimesecs` (0) value, but gameobejct marked as despawnable at action.", guid, data.id);
|
||||
}
|
||||
|
||||
data.animprogress = fields[12].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);
|
||||
|
|
@ -1507,12 +1511,6 @@ void ObjectMgr::LoadGameObjects()
|
|||
}
|
||||
data.go_state = GOState(go_state);
|
||||
|
||||
data.spawnMask = fields[14].GetUInt8();
|
||||
data.phaseMask = fields[15].GetUInt16();
|
||||
int16 gameEvent = fields[16].GetInt16();
|
||||
int16 GuidPoolId = fields[17].GetInt16();
|
||||
int16 EntryPoolId = fields[18].GetInt16();
|
||||
|
||||
if (data.rotation.x < -1.0f || data.rotation.x > 1.0f)
|
||||
{
|
||||
sLog.outErrorDb("Table `gameobject` have gameobject (GUID: %u Entry: %u) with invalid rotation.x (%f) value, skip", guid, data.id, data.rotation.x);
|
||||
|
|
@ -1551,6 +1549,7 @@ void ObjectMgr::LoadGameObjects()
|
|||
|
||||
if (gameEvent==0 && GuidPoolId==0 && EntryPoolId==0)// if not this is to be managed by GameEvent System or Pool system
|
||||
AddGameobjectToGrid(guid, &data);
|
||||
|
||||
++count;
|
||||
|
||||
} while (result->NextRow());
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11807"
|
||||
#define REVISION_NR "11808"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue