diff options
author | gvcoman <none@none> | 2008-11-21 14:34:05 -0500 |
---|---|---|
committer | gvcoman <none@none> | 2008-11-21 14:34:05 -0500 |
commit | ae8a27bbb758dd2485d9bea14ccd8b892f626371 (patch) | |
tree | 213402aa6ce31963a4a329cbb261fd88db6a0bdd /src/bindings/scripts/ScriptMgr.h | |
parent | 837ce55de88e33825eb66814d07d33c1f869f7a7 (diff) | |
parent | 71707df1dec2aa77864d9a853c34108bb6021138 (diff) |
Merged commit 269 (5f0e38da128a).
--HG--
branch : trunk
Diffstat (limited to 'src/bindings/scripts/ScriptMgr.h')
-rw-r--r-- | src/bindings/scripts/ScriptMgr.h | 59 |
1 files changed, 29 insertions, 30 deletions
diff --git a/src/bindings/scripts/ScriptMgr.h b/src/bindings/scripts/ScriptMgr.h index 83b2c0dd7a0..ef7bdfd3cce 100644 --- a/src/bindings/scripts/ScriptMgr.h +++ b/src/bindings/scripts/ScriptMgr.h @@ -24,46 +24,45 @@ class Map; class Unit; class WorldObject; -#define MAX_SCRIPTS 1000 //72 bytes each (approx 71kb) +#define MAX_SCRIPTS 5000 //72 bytes each (approx 351kb) #define VISIBLE_RANGE (166.0f) //MAX visible range (size of grid) #define DEFAULT_TEXT "<Trinity Script Text Entry Missing!>" struct Script { 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),pReceiveEmote(NULL),pItemUse(NULL), GetAI(NULL), GetInstanceData(NULL) -{} + 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),pReceiveEmote(NULL),pItemUse(NULL), GetAI(NULL), GetInstanceData(NULL) + {} -std::string Name; + std::string Name; -// Quest/gossip Methods to be scripted -bool (*pGossipHello )(Player*, Creature*); -bool (*pQuestAccept )(Player*, Creature*, Quest const* ); -bool (*pGossipSelect )(Player*, Creature*, uint32 , uint32 ); -bool (*pGossipSelectWithCode)(Player*, Creature*, uint32 , uint32 , const char* ); -bool (*pQuestSelect )(Player*, Creature*, Quest const* ); -bool (*pQuestComplete )(Player*, Creature*, Quest const* ); -uint32 (*pNPCDialogStatus )(Player*, Creature* ); -uint32 (*pGODialogStatus )(Player *player, GameObject * _GO ); -bool (*pChooseReward )(Player*, Creature*, Quest const*, uint32 ); -bool (*pItemHello )(Player*, Item*, Quest const* ); -bool (*pGOHello )(Player*, GameObject* ); -bool (*pAreaTrigger )(Player*, AreaTriggerEntry* ); -bool (*pItemQuestAccept )(Player*, Item *, Quest const* ); -bool (*pGOQuestAccept )(Player*, GameObject*, Quest const* ); -bool (*pGOChooseReward )(Player*, GameObject*_GO, Quest const*, uint32 ); -bool (*pReceiveEmote )(Player*, Creature*, uint32 ); -bool (*pItemUse )(Player*, Item*, SpellCastTargets const& ); + //Methods to be scripted + bool (*pGossipHello )(Player*, Creature*); + bool (*pQuestAccept )(Player*, Creature*, Quest const* ); + bool (*pGossipSelect )(Player*, Creature*, uint32 , uint32 ); + bool (*pGossipSelectWithCode)(Player*, Creature*, uint32 , uint32 , const char* ); + bool (*pQuestSelect )(Player*, Creature*, Quest const* ); + bool (*pQuestComplete )(Player*, Creature*, Quest const* ); + uint32 (*pNPCDialogStatus )(Player*, Creature* ); + uint32 (*pGODialogStatus )(Player*, GameObject * _GO ); + bool (*pChooseReward )(Player*, Creature*, Quest const*, uint32 ); + bool (*pItemHello )(Player*, Item*, Quest const* ); + bool (*pGOHello )(Player*, GameObject* ); + bool (*pAreaTrigger )(Player*, AreaTriggerEntry* ); + bool (*pItemQuestAccept )(Player*, Item *, Quest const* ); + bool (*pGOQuestAccept )(Player*, GameObject*, Quest const* ); + bool (*pGOChooseReward )(Player*, GameObject*, Quest const*, uint32 ); + bool (*pReceiveEmote )(Player*, Creature*, uint32 ); + bool (*pItemUse )(Player*, Item*, SpellCastTargets const& ); -CreatureAI* (*GetAI)(Creature*); -InstanceData* (*GetInstanceData)(Map*); -}; + CreatureAI* (*GetAI)(Creature*); + InstanceData* (*GetInstanceData)(Map*); -extern int nrscripts; -extern Script *m_scripts[MAX_SCRIPTS]; + void RegisterSelf(); +}; //Generic scripting text function void DoScriptText(int32 textEntry, WorldObject* pSource, Unit* target = NULL); |