mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[11191] Fixed crash introduced in prev. pool commit.
Propertly exclude pool_*_template spawns from static world state.
This commit is contained in:
parent
c7eb17b912
commit
3b6b6078d1
2 changed files with 27 additions and 17 deletions
|
|
@ -1231,14 +1231,18 @@ void ObjectMgr::LoadCreatureModelRace()
|
||||||
void ObjectMgr::LoadCreatures()
|
void ObjectMgr::LoadCreatures()
|
||||||
{
|
{
|
||||||
uint32 count = 0;
|
uint32 count = 0;
|
||||||
// 0 1 2 3
|
// 0 1 2 3
|
||||||
QueryResult *result = WorldDatabase.Query("SELECT creature.guid, id, map, modelid,"
|
QueryResult *result = WorldDatabase.Query("SELECT creature.guid, creature.id, map, modelid,"
|
||||||
// 4 5 6 7 8 9 10 11
|
// 4 5 6 7 8 9 10 11
|
||||||
"equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, spawndist, currentwaypoint,"
|
"equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, spawndist, currentwaypoint,"
|
||||||
// 12 13 14 15 16 17 18 19
|
// 12 13 14 15 16 17 18
|
||||||
"curhealth, curmana, DeathState, MovementType, spawnMask, phaseMask, event, pool_entry "
|
"curhealth, curmana, DeathState, MovementType, spawnMask, phaseMask, event,"
|
||||||
"FROM creature LEFT OUTER JOIN game_event_creature ON creature.guid = game_event_creature.guid "
|
// 19 20
|
||||||
"LEFT OUTER JOIN pool_creature ON creature.guid = pool_creature.guid");
|
"pool_creature.pool_entry, pool_creature_template.pool_entry "
|
||||||
|
"FROM creature "
|
||||||
|
"LEFT OUTER JOIN game_event_creature ON creature.guid = game_event_creature.guid "
|
||||||
|
"LEFT OUTER JOIN pool_creature ON creature.guid = pool_creature.guid "
|
||||||
|
"LEFT OUTER JOIN pool_creature_template ON creature.id = pool_creature_template.id");
|
||||||
|
|
||||||
if(!result)
|
if(!result)
|
||||||
{
|
{
|
||||||
|
|
@ -1304,7 +1308,8 @@ void ObjectMgr::LoadCreatures()
|
||||||
data.spawnMask = fields[16].GetUInt8();
|
data.spawnMask = fields[16].GetUInt8();
|
||||||
data.phaseMask = fields[17].GetUInt16();
|
data.phaseMask = fields[17].GetUInt16();
|
||||||
int16 gameEvent = fields[18].GetInt16();
|
int16 gameEvent = fields[18].GetInt16();
|
||||||
int16 PoolId = fields[19].GetInt16();
|
int16 GuidPoolId = fields[19].GetInt16();
|
||||||
|
int16 EntryPoolId = fields[20].GetInt16();
|
||||||
|
|
||||||
MapEntry const* mapEntry = sMapStore.LookupEntry(data.mapid);
|
MapEntry const* mapEntry = sMapStore.LookupEntry(data.mapid);
|
||||||
if(!mapEntry)
|
if(!mapEntry)
|
||||||
|
|
@ -1398,7 +1403,7 @@ void ObjectMgr::LoadCreatures()
|
||||||
data.phaseMask = 1;
|
data.phaseMask = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gameEvent==0 && PoolId==0) // if not this is to be managed by GameEvent System or Pool system
|
if (gameEvent==0 && GuidPoolId==0 && EntryPoolId==0)// if not this is to be managed by GameEvent System or Pool system
|
||||||
AddCreatureToGrid(guid, &data);
|
AddCreatureToGrid(guid, &data);
|
||||||
|
|
||||||
++count;
|
++count;
|
||||||
|
|
@ -1447,12 +1452,16 @@ void ObjectMgr::LoadGameobjects()
|
||||||
{
|
{
|
||||||
uint32 count = 0;
|
uint32 count = 0;
|
||||||
|
|
||||||
// 0 1 2 3 4 5 6
|
// 0 1 2 3 4 5 6
|
||||||
QueryResult *result = WorldDatabase.Query("SELECT gameobject.guid, id, map, position_x, position_y, position_z, orientation,"
|
QueryResult *result = WorldDatabase.Query("SELECT gameobject.guid, gameobject.id, map, position_x, position_y, position_z, orientation,"
|
||||||
// 7 8 9 10 11 12 13 14 15 16 17
|
// 7 8 9 10 11 12 13 14 15 16
|
||||||
"rotation0, rotation1, rotation2, rotation3, spawntimesecs, animprogress, state, spawnMask, phaseMask, event, pool_entry "
|
"rotation0, rotation1, rotation2, rotation3, spawntimesecs, animprogress, state, spawnMask, phaseMask, event,"
|
||||||
"FROM gameobject LEFT OUTER JOIN game_event_gameobject ON gameobject.guid = game_event_gameobject.guid "
|
// 17 18
|
||||||
"LEFT OUTER JOIN pool_gameobject ON gameobject.guid = pool_gameobject.guid");
|
"pool_gameobject.pool_entry, pool_gameobject_template.pool_entry "
|
||||||
|
"FROM gameobject "
|
||||||
|
"LEFT OUTER JOIN game_event_gameobject ON gameobject.guid = game_event_gameobject.guid "
|
||||||
|
"LEFT OUTER JOIN pool_gameobject ON gameobject.guid = pool_gameobject.guid "
|
||||||
|
"LEFT OUTER JOIN pool_gameobject_template ON gameobject.id = pool_gameobject_template.id");
|
||||||
|
|
||||||
if(!result)
|
if(!result)
|
||||||
{
|
{
|
||||||
|
|
@ -1551,7 +1560,8 @@ void ObjectMgr::LoadGameobjects()
|
||||||
data.spawnMask = fields[14].GetUInt8();
|
data.spawnMask = fields[14].GetUInt8();
|
||||||
data.phaseMask = fields[15].GetUInt16();
|
data.phaseMask = fields[15].GetUInt16();
|
||||||
int16 gameEvent = fields[16].GetInt16();
|
int16 gameEvent = fields[16].GetInt16();
|
||||||
int16 PoolId = fields[17].GetInt16();
|
int16 GuidPoolId = fields[17].GetInt16();
|
||||||
|
int16 EntryPoolId = fields[18].GetInt16();
|
||||||
|
|
||||||
if (data.rotation2 < -1.0f || data.rotation2 > 1.0f)
|
if (data.rotation2 < -1.0f || data.rotation2 > 1.0f)
|
||||||
{
|
{
|
||||||
|
|
@ -1577,7 +1587,7 @@ void ObjectMgr::LoadGameobjects()
|
||||||
data.phaseMask = 1;
|
data.phaseMask = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gameEvent == 0 && PoolId == 0) // if not this is to be managed by GameEvent System or Pool system
|
if (gameEvent==0 && GuidPoolId==0 && EntryPoolId==0)// if not this is to be managed by GameEvent System or Pool system
|
||||||
AddGameobjectToGrid(guid, &data);
|
AddGameobjectToGrid(guid, &data);
|
||||||
++count;
|
++count;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11190"
|
#define REVISION_NR "11191"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue