Core/Transports: Path generation rewrite v2

* No TaxiPathNode row is skipped anymore (events/delays on first node now work)
* Fixed transport animation synchronization with client
* Fixed stoppable transports randomly resuming their path after relogging
This commit is contained in:
Shauren authored and Ovahlord committed 2022-06-18 22:37:46 +02:00
1 parent c682680a2f
commit 5a236799c2
7 files changed
+514 -479

No files matched your search

+2 -2
View File
@@ -1784,10 +1784,10 @@ void ScriptMgr::OnTransportUpdate(Transport* transport, uint32 diff)
tmpscript->OnUpdate(transport, diff);
}
void ScriptMgr::OnRelocate(Transport* transport, uint32 waypointId, uint32 mapId, float x, float y, float z)
void ScriptMgr::OnRelocate(Transport* transport, uint32 mapId, float x, float y, float z)
{
GET_SCRIPT(TransportScript, transport->GetScriptId(), tmpscript);
tmpscript->OnRelocate(transport, waypointId, mapId, x, y, z);
tmpscript->OnRelocate(transport, mapId, x, y, z);
}
void ScriptMgr::OnStartup()
+2 -2
View File
@@ -592,7 +592,7 @@ class TC_GAME_API TransportScript : public ScriptObject, public UpdatableScript<
virtual void OnRemovePassenger(Transport* /*transport*/, Player* /*player*/) { }
// Called when a transport moves.
virtual void OnRelocate(Transport* /*transport*/, uint32 /*waypointId*/, uint32 /*mapId*/, float /*x*/, float /*y*/, float /*z*/) { }
virtual void OnRelocate(Transport* /*transport*/, uint32 /*mapId*/, float /*x*/, float /*y*/, float /*z*/) { }
};
class TC_GAME_API AchievementCriteriaScript : public ScriptObject
@@ -975,7 +975,7 @@ class TC_GAME_API ScriptMgr
void OnAddCreaturePassenger(Transport* transport, Creature* creature);
void OnRemovePassenger(Transport* transport, Player* player);
void OnTransportUpdate(Transport* transport, uint32 diff);
void OnRelocate(Transport* transport, uint32 waypointId, uint32 mapId, float x, float y, float z);
void OnRelocate(Transport* transport, uint32 mapId, float x, float y, float z);
public: /* AchievementCriteriaScript */