mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-01 14:46:54 +01:00
Core/Transports: ported transport refactoring
* this implements full support for stoppable transports as well as serverside transport position tracking * fixed several vehicle related issues * fixed gameobject passengers not being displayed as transport passengers * pets, dynamic objects and other summons are not added as transport passengers and will now properly be displayed Todo: - Deeprun Tram visual issues needs to be resolved - Lady Deathwhisper's elevator needs some additional research
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "Log.h"
|
||||
#include "MapManager.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Transport.h"
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// template class ActivePoolData
|
||||
@@ -410,7 +411,11 @@ void PoolGroup<GameObject>::Spawn1Object(PoolObject* obj)
|
||||
// We use current coords to unspawn, not spawn coords since creature can have changed grid
|
||||
if (!map->Instanceable() && map->IsGridLoaded(data->spawnPoint))
|
||||
{
|
||||
GameObject* pGameobject = new GameObject;
|
||||
GameObject* pGameobject = nullptr;
|
||||
if (sObjectMgr->GetGameObjectTypeByEntry(data->id) == GAMEOBJECT_TYPE_TRANSPORT)
|
||||
pGameobject = new Transport();
|
||||
else
|
||||
pGameobject = new GameObject();
|
||||
//TC_LOG_DEBUG("pool", "Spawning gameobject %u", guid);
|
||||
if (!pGameobject->LoadFromDB(obj->guid, map, false))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user