Add summoner information to TeleportTo function and created OnBeforeTeleport hook
This commit is contained in:
parent
b340ebbec9
commit
bf60f8f5c6
6 changed files with 32 additions and 15 deletions
|
|
@ -848,6 +848,9 @@ class PlayerScript : public ScriptObject
|
|||
// Called when a player changes to a new map (after moving to new map)
|
||||
virtual void OnMapChanged(Player* /*player*/) { }
|
||||
|
||||
// Called before a player is being teleported to new coords
|
||||
virtual bool OnBeforeTeleport(Player* /*player*/, uint32 /*mapid*/, float /*x*/, float /*y*/, float /*z*/, float /*orientation*/, uint32 /*options*/, Unit* /*target*/) { return true; }
|
||||
|
||||
// Called when team/faction is set on player
|
||||
virtual void OnUpdateFaction(Player* /*player*/) { }
|
||||
|
||||
|
|
@ -1221,6 +1224,7 @@ class ScriptMgr
|
|||
void OnPlayerBindToInstance(Player* player, Difficulty difficulty, uint32 mapid, bool permanent);
|
||||
void OnPlayerUpdateZone(Player* player, uint32 newZone, uint32 newArea);
|
||||
void OnPlayerUpdateArea(Player* player, uint32 oldArea, uint32 newArea);
|
||||
bool OnBeforePlayerTeleport(Player* player, uint32 mapid, float x, float y, float z, float orientation, uint32 options, Unit *target);
|
||||
void OnPlayerUpdateFaction(Player* player);
|
||||
void OnPlayerAddToBattleground(Player* player, Battleground* bg);
|
||||
void OnPlayerRemoveFromBattleground(Player* player, Battleground* bg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue