diff options
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 44 |
1 files changed, 17 insertions, 27 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index acadc036fb3..d042fd31e27 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -1650,8 +1650,8 @@ void ObjectMgr::LoadCreatures() // 0 1 2 3 4 5 6 7 8 9 10 QueryResult result = WorldDatabase.Query("SELECT creature.guid, id, map, modelid, equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, spawndist, " - // 11 12 13 14 15 16 17 18 19 20 21 22 23 - "currentwaypoint, curhealth, curmana, MovementType, spawnMask, phaseMask, eventEntry, pool_entry, creature.npcflag, creature.unit_flags, creature.dynamicflags, creature.phaseid, creature.phasegroup " + // 11 12 13 14 15 16 17 18 19 20 21 22 + "currentwaypoint, curhealth, curmana, MovementType, spawnMask, eventEntry, pool_entry, creature.npcflag, creature.unit_flags, creature.dynamicflags, creature.phaseid, creature.phasegroup " "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"); @@ -1701,14 +1701,13 @@ void ObjectMgr::LoadCreatures() data.curmana = fields[13].GetUInt32(); data.movementType = fields[14].GetUInt8(); data.spawnMask = fields[15].GetUInt32(); - data.phaseMask = fields[16].GetUInt32(); - int16 gameEvent = fields[17].GetInt8(); - uint32 PoolId = fields[18].GetUInt32(); - data.npcflag = fields[19].GetUInt32(); - data.unit_flags = fields[20].GetUInt32(); - data.dynamicflags = fields[21].GetUInt32(); - data.phaseid = fields[22].GetUInt32(); - data.phaseGroup = fields[23].GetUInt32(); + int16 gameEvent = fields[16].GetInt8(); + uint32 PoolId = fields[17].GetUInt32(); + data.npcflag = fields[18].GetUInt32(); + data.unit_flags = fields[19].GetUInt32(); + data.dynamicflags = fields[20].GetUInt32(); + data.phaseid = fields[21].GetUInt32(); + data.phaseGroup = fields[22].GetUInt32(); MapEntry const* mapEntry = sMapStore.LookupEntry(data.mapid); if (!mapEntry) @@ -1778,11 +1777,7 @@ void ObjectMgr::LoadCreatures() data.orientation = Position::NormalizeOrientation(data.orientation); } - if (data.phaseMask == 0) - { - TC_LOG_ERROR("sql.sql", "Table `creature` has creature (GUID: " UI64FMTD " Entry: %u) with `phaseMask`=0 (not visible for anyone), set to 1.", guid, data.id); - data.phaseMask = 1; - } + data.phaseMask = 1; if (data.phaseGroup && data.phaseid) { @@ -1984,8 +1979,8 @@ void ObjectMgr::LoadGameobjects() // 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 18 19 - "rotation0, rotation1, rotation2, rotation3, spawntimesecs, animprogress, state, spawnMask, phaseMask, eventEntry, pool_entry, phaseid, phasegroup " + // 7 8 9 10 11 12 13 14 15 16 17 18 + "rotation0, rotation1, rotation2, rotation3, spawntimesecs, animprogress, state, spawnMask, eventEntry, pool_entry, phaseid, phasegroup " "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"); @@ -2081,11 +2076,10 @@ void ObjectMgr::LoadGameobjects() if (!IsTransportMap(data.mapid) && data.spawnMask & ~spawnMasks[data.mapid]) TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: " UI64FMTD " Entry: %u) that has wrong spawn mask %u including unsupported difficulty modes for map (Id: %u), skip", guid, data.id, data.spawnMask, data.mapid); - data.phaseMask = fields[15].GetUInt32(); - int16 gameEvent = fields[16].GetInt8(); - uint32 PoolId = fields[17].GetUInt32(); - data.phaseid = fields[18].GetUInt32(); - data.phaseGroup = fields[19].GetUInt32(); + int16 gameEvent = fields[15].GetInt8(); + uint32 PoolId = fields[16].GetUInt32(); + data.phaseid = fields[17].GetUInt32(); + data.phaseGroup = fields[18].GetUInt32(); if (data.phaseGroup && data.phaseid) { @@ -2117,11 +2111,7 @@ void ObjectMgr::LoadGameobjects() continue; } - if (data.phaseMask == 0) - { - TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: " UI64FMTD " Entry: %u) with `phaseMask`=0 (not visible for anyone), set to 1.", guid, data.id); - data.phaseMask = 1; - } + data.phaseMask = 1; if (sWorld->getBoolConfig(CONFIG_CALCULATE_GAMEOBJECT_ZONE_AREA_DATA)) { |