*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
This commit is contained in:
QAston
2009-08-04 01:44:14 +02:00
parent 29c9d709b9
commit 2e34af64cf
15 changed files with 91 additions and 7 deletions

View File

@@ -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* );