diff options
author | Shauren <shauren.trinity@gmail.com> | 2018-04-19 23:37:41 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2018-04-19 23:37:41 +0200 |
commit | a5df77a9d6f3e48f2c4e8a61d60e3b5f2f0c326e (patch) | |
tree | 16a01e46965e26ce441570fbe26175fd89c5777d /src/server/game/Globals/ObjectMgr.cpp | |
parent | 2e84035125362f0942a7ffaf1de7f1e36c6155d2 (diff) |
Core/Transports: Force transport passengers into legacy spawn group
Ref #21641
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 00461bbfb99..0d6e5f7bd0e 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -1859,8 +1859,13 @@ void ObjectMgr::LoadCreatures() } // Skip spawnMask check for transport maps - if (!IsTransportMap(data.spawnPoint.GetMapId()) && data.spawnMask & ~spawnMasks[data.spawnPoint.GetMapId()]) - TC_LOG_ERROR("sql.sql", "Table `creature` has creature (GUID: %u) that have wrong spawn mask %u including unsupported difficulty modes for map (Id: %u).", guid, data.spawnMask, data.spawnPoint.GetMapId()); + if (!IsTransportMap(data.spawnPoint.GetMapId())) + { + if (data.spawnMask & ~spawnMasks[data.spawnPoint.GetMapId()]) + TC_LOG_ERROR("sql.sql", "Table `creature` has creature (GUID: %u) that have wrong spawn mask %u including unsupported difficulty modes for map (Id: %u).", guid, data.spawnMask, data.spawnPoint.GetMapId()); + } + else + data.spawnGroupData = &_spawnGroupDataStore[1]; // force compatibility group for transport spawns bool ok = true; for (uint32 diff = 0; diff < MAX_DIFFICULTY - 1 && ok; ++diff) @@ -2173,8 +2178,13 @@ void ObjectMgr::LoadGameObjects() data.spawnMask = fields[14].GetUInt8(); - if (!IsTransportMap(data.spawnPoint.GetMapId()) && data.spawnMask & ~spawnMasks[data.spawnPoint.GetMapId()]) - TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) that has wrong spawn mask %u including unsupported difficulty modes for map (Id: %u), skip", guid, data.id, data.spawnMask, data.spawnPoint.GetMapId()); + if (!IsTransportMap(data.spawnPoint.GetMapId())) + { + if (data.spawnMask & ~spawnMasks[data.spawnPoint.GetMapId()]) + TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) that has wrong spawn mask %u including unsupported difficulty modes for map (Id: %u), skip", guid, data.id, data.spawnMask, data.spawnPoint.GetMapId()); + } + else + data.spawnGroupData = &_spawnGroupDataStore[1]; // force compatibility group for transport spawns data.phaseMask = fields[15].GetUInt32(); int16 gameEvent = fields[16].GetInt8(); |