[10299] Add new script call ProcessEventId

Let script library know when some event is about to start. Event id's may be found in several sources, such as spells, GO's and transport/taxi paths.
Database scripts may be prevented by returning true from script side whenever needed. If false, DB script will run like normal.
New database table event_id_scripts will need a ScriptName for the event id, in same way as for example areatrigger_scripts.

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-07-31 17:51:49 +02:00
parent 28d1ac66c3
commit 2ad9cd34b2
16 changed files with 180 additions and 11 deletions

View file

@ -55,6 +55,7 @@ typedef bool(MANGOS_IMPORT * scriptCallChooseReward)( Player *player, Creature *
typedef bool(MANGOS_IMPORT * scriptCallItemHello)( Player *player, Item *, Quest const*);
typedef bool(MANGOS_IMPORT * scriptCallGOHello)( Player *player, GameObject * );
typedef bool(MANGOS_IMPORT * scriptCallAreaTrigger)( Player *player, AreaTriggerEntry const* );
typedef bool(MANGOS_IMPORT * scriptCallProcessEventId)(uint32 eventId, Object* source, Object* target, bool data);
typedef bool(MANGOS_IMPORT * scriptCallItemQuestAccept)(Player *player, Item *, Quest const*);
typedef bool(MANGOS_IMPORT * scriptCallGOQuestAccept)(Player *player, GameObject *, Quest const*);
typedef bool(MANGOS_IMPORT * scriptCallGOChooseReward)(Player *player, GameObject *, Quest const*, uint32 opt );
@ -88,6 +89,7 @@ typedef struct
scriptCallItemHello ItemHello;
scriptCallGOHello GOHello;
scriptCallAreaTrigger scriptAreaTrigger;
scriptCallProcessEventId ProcessEventId;
scriptCallItemQuestAccept ItemQuestAccept;
scriptCallGOQuestAccept GOQuestAccept;
scriptCallItemUse ItemUse;