* Add new TransportScript::OnRelocate hook.

* TransportScript::OnUpdate is now called on every tick, not just on movement update.

--HG--
branch : trunk
This commit is contained in:
XTZGZoReX
2010-08-07 14:17:32 +02:00
parent bcfc58a72d
commit 360e028331
3 changed files with 17 additions and 5 deletions

View File

@@ -729,6 +729,9 @@ class TransportScript : public ScriptObject, public UpdatableScript<Transport>
// Called when a player exits the transport.
virtual void OnRemovePassenger(Transport* transport, Player* player) { }
// Called when a transport moves.
virtual void OnRelocate(Transport* transport, uint32 mapId, float x, float y, float z) { }
};
// Placed here due to ScriptRegistry::AddScript dependency.
@@ -895,6 +898,7 @@ class ScriptMgr
void OnAddCreaturePassenger(Transport* transport, Creature* creature);
void OnRemovePassenger(Transport* transport, Player* player);
void OnTransportUpdate(Transport* transport, uint32 diff);
void OnRelocate(Transport* transport, uint32 mapId, float x, float y, float z);
public: /* ScriptRegistry */