diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 1efd400a8..33138a2b4 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -1231,14 +1231,18 @@ void ObjectMgr::LoadCreatureModelRace() void ObjectMgr::LoadCreatures() { uint32 count = 0; - // 0 1 2 3 - QueryResult *result = WorldDatabase.Query("SELECT creature.guid, id, map, modelid," + // 0 1 2 3 + QueryResult *result = WorldDatabase.Query("SELECT creature.guid, creature.id, map, modelid," // 4 5 6 7 8 9 10 11 "equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, spawndist, currentwaypoint," - // 12 13 14 15 16 17 18 19 - "curhealth, curmana, DeathState, MovementType, spawnMask, phaseMask, event, 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"); + // 12 13 14 15 16 17 18 + "curhealth, curmana, DeathState, MovementType, spawnMask, phaseMask, event," + // 19 20 + "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) { @@ -1304,7 +1308,8 @@ void ObjectMgr::LoadCreatures() data.spawnMask = fields[16].GetUInt8(); data.phaseMask = fields[17].GetUInt16(); 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); if(!mapEntry) @@ -1398,7 +1403,7 @@ void ObjectMgr::LoadCreatures() 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); ++count; @@ -1447,12 +1452,16 @@ void ObjectMgr::LoadGameobjects() { uint32 count = 0; - // 0 1 2 3 4 5 6 - QueryResult *result = WorldDatabase.Query("SELECT gameobject.guid, id, map, position_x, position_y, position_z, orientation," - // 7 8 9 10 11 12 13 14 15 16 17 - "rotation0, rotation1, rotation2, rotation3, spawntimesecs, animprogress, state, spawnMask, phaseMask, event, 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"); + // 0 1 2 3 4 5 6 + 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 + "rotation0, rotation1, rotation2, rotation3, spawntimesecs, animprogress, state, spawnMask, phaseMask, event," + // 17 18 + "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) { @@ -1551,7 +1560,8 @@ void ObjectMgr::LoadGameobjects() data.spawnMask = fields[14].GetUInt8(); data.phaseMask = fields[15].GetUInt16(); 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) { @@ -1577,7 +1587,7 @@ void ObjectMgr::LoadGameobjects() 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); ++count; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 688addee3..f2ea1a53c 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 "11190" + #define REVISION_NR "11191" #endif // __REVISION_NR_H__