mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Transports
* Rewritten path generation, now uses splines - timers are a lot more accurate now * Implemented stopping transports * Implemented spawning transports in instances * Implemented spawning gameobjects as transport passengers * Transport passengers are now stored in creature/gameobject table using gameobject_template.data6 from transport's template as map id
This commit is contained in:
@@ -43,6 +43,20 @@ void ObjectGridEvacuator::Visit(CreatureMapType &m)
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectGridEvacuator::Visit(GameObjectMapType &m)
|
||||
{
|
||||
// gameobject in unloading grid can have respawn point in another grid
|
||||
// if it will be unloaded then it will not respawn in original grid until unload/load original grid
|
||||
// move to respawn point to prevent this case. For player view in respawn grid this will be normal respawn.
|
||||
for (GameObjectMapType::iterator iter = m.begin(); iter != m.end();)
|
||||
{
|
||||
GameObject* go = iter->GetSource();
|
||||
++iter;
|
||||
|
||||
go->GetMap()->GameObjectRespawnRelocation(go, true);
|
||||
}
|
||||
}
|
||||
|
||||
// for loading world object at grid loading (Corpses)
|
||||
/// @todo to implement npc on transport, also need to load npcs at grid loading
|
||||
class ObjectWorldLoader
|
||||
@@ -70,7 +84,12 @@ template<class T> void ObjectGridLoader::SetObjectCell(T* /*obj*/, CellCoord con
|
||||
template<> void ObjectGridLoader::SetObjectCell(Creature* obj, CellCoord const& cellCoord)
|
||||
{
|
||||
Cell cell(cellCoord);
|
||||
obj->SetCurrentCell(cell);
|
||||
}
|
||||
|
||||
template<> void ObjectGridLoader::SetObjectCell(GameObject* obj, CellCoord const& cellCoord)
|
||||
{
|
||||
Cell cell(cellCoord);
|
||||
obj->SetCurrentCell(cell);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user