aboutsummaryrefslogtreecommitdiff
path: root/src/bindings/scripts/ScriptMgr.h
diff options
context:
space:
mode:
authormegamage <none@none>2008-11-20 16:16:57 -0600
committermegamage <none@none>2008-11-20 16:16:57 -0600
commit1e997b95cc89c615adf2acd27a5f6916b78e0ff3 (patch)
tree491c496b798daf9b20db6397ae3f0affb6fd3738 /src/bindings/scripts/ScriptMgr.h
parent0b61584e1b19afb8dbef376a4e2903d8631bfc1d (diff)
Re-commit 262 due to EOL issues. (no difference from 262)
--HG-- branch : trunk
Diffstat (limited to 'src/bindings/scripts/ScriptMgr.h')
-rw-r--r--src/bindings/scripts/ScriptMgr.h59
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);