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:
Ovahlord
2018-11-18 09:04:08 +01:00
parent d8bf3a3170
commit 5229a734dd
49 changed files with 1381 additions and 602 deletions

View File

@@ -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))
{