From 2e34af64cf83d79b7352636da71b60132b512106 Mon Sep 17 00:00:00 2001 From: QAston Date: Tue, 4 Aug 2009 01:44:14 +0200 Subject: *Allow ItemExpire events to be scripted. *Add .debug itemexpire command *Add script for Disgusting Jar and Mysterious Egg - original patch by Elron. --HG-- branch : trunk --- src/bindings/scripts/ScriptMgr.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/bindings/scripts/ScriptMgr.h') diff --git a/src/bindings/scripts/ScriptMgr.h b/src/bindings/scripts/ScriptMgr.h index 719cf7932e9..06830532c9b 100644 --- a/src/bindings/scripts/ScriptMgr.h +++ b/src/bindings/scripts/ScriptMgr.h @@ -23,6 +23,7 @@ class SpellCastTargets; class Map; class Unit; class WorldObject; +struct ItemPrototype; #define MAX_SCRIPTS 5000 //72 bytes each (approx 351kb) #define VISIBLE_RANGE (166.0f) //MAX visible range (size of grid) @@ -34,7 +35,7 @@ struct Script pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL), pQuestSelect(NULL), pQuestComplete(NULL), pNPCDialogStatus(NULL), pGODialogStatus(NULL), pChooseReward(NULL), pItemHello(NULL), pGOHello(NULL), pAreaTrigger(NULL), pItemQuestAccept(NULL), - pGOQuestAccept(NULL), pGOChooseReward(NULL),pItemUse(NULL), + pGOQuestAccept(NULL), pGOChooseReward(NULL),pItemUse(NULL), pItemExpire(NULL), pEffectDummyCreature(NULL), pEffectDummyGameObj(NULL), pEffectDummyItem(NULL), GetAI(NULL), GetInstanceData(NULL) {} @@ -60,6 +61,7 @@ struct Script bool (*pGOQuestAccept )(Player*, GameObject*, Quest const* ); bool (*pGOChooseReward )(Player*, GameObject*, Quest const*, uint32 ); bool (*pItemUse )(Player*, Item*, SpellCastTargets const& ); + bool (*pItemExpire )(Player*, ItemPrototype const *); bool (*pEffectDummyCreature )(Unit*, uint32, uint32, Creature* ); bool (*pEffectDummyGameObj )(Unit*, uint32, uint32, GameObject* ); bool (*pEffectDummyItem )(Unit*, uint32, uint32, Item* ); -- cgit v1.2.3