[10390] Add several new script calls for InstanceData

OnCreature Evade/Death/EnterCombat and in addition OnPlayerLeave
The functions are intended to help doing instance related tasks (in other words, not for the general AI of creatures).

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-08-20 20:25:02 +02:00
parent 1fd4ff3155
commit 9c02f476ec
4 changed files with 33 additions and 1 deletions

View file

@ -57,12 +57,24 @@ class MANGOS_DLL_SPEC InstanceData
//Called when a player successfully enters the instance (after really added to map)
virtual void OnPlayerEnter(Player *) {}
//Called when a player leaves the instance (before really removed from map (or possibly world))
virtual void OnPlayerLeave(Player *) {}
//Called when a gameobject is created
virtual void OnObjectCreate(GameObject *) {}
//called on creature creation
virtual void OnCreatureCreate(Creature * /*creature*/) {}
//called on creature enter combat
virtual void OnCreatureEnterCombat(Creature * /*creature*/) {}
//called on creature evade
virtual void OnCreatureEvade(Creature * /*creature*/) {}
//called on creature death
virtual void OnCreatureDeath(Creature * /*creature*/) {}
//All-purpose data storage 64 bit
virtual uint64 GetData64(uint32 /*Data*/) { return 0; }
virtual void SetData64(uint32 /*Data*/, uint64 /*Value*/) { }