aboutsummaryrefslogtreecommitdiff
path: root/src/server/game
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2018-04-19 23:37:41 +0200
committerShauren <shauren.trinity@gmail.com>2018-04-19 23:37:41 +0200
commita5df77a9d6f3e48f2c4e8a61d60e3b5f2f0c326e (patch)
tree16a01e46965e26ce441570fbe26175fd89c5777d /src/server/game
parent2e84035125362f0942a7ffaf1de7f1e36c6155d2 (diff)
Core/Transports: Force transport passengers into legacy spawn group
Ref #21641
Diffstat (limited to 'src/server/game')
-rw-r--r--src/server/game/Entities/Transport/Transport.cpp8
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp18
2 files changed, 21 insertions, 5 deletions
diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp
index b8880564155..52ef320b886 100644
--- a/src/server/game/Entities/Transport/Transport.cpp
+++ b/src/server/game/Entities/Transport/Transport.cpp
@@ -300,9 +300,12 @@ void Transport::RemovePassenger(WorldObject* passenger)
Creature* Transport::CreateNPCPassenger(ObjectGuid::LowType guid, CreatureData const* data)
{
Map* map = GetMap();
+ if (map->GetCreatureRespawnTime(guid))
+ return nullptr;
+
Creature* creature = new Creature();
- if (!creature->LoadFromDB(guid, map, false, true))
+ if (!creature->LoadFromDB(guid, map, false, false))
{
delete creature;
return nullptr;
@@ -345,6 +348,9 @@ Creature* Transport::CreateNPCPassenger(ObjectGuid::LowType guid, CreatureData c
GameObject* Transport::CreateGOPassenger(ObjectGuid::LowType guid, GameObjectData const* data)
{
Map* map = GetMap();
+ if (map->GetGORespawnTime(guid))
+ return nullptr;
+
GameObject* go = new GameObject();
if (!go->LoadFromDB(guid, map, false))
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();