aboutsummaryrefslogtreecommitdiff
path: root/src/bindings/interface/ScriptMgr.h
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-25 13:17:41 -0500
committermegamage <none@none>2009-05-25 13:17:41 -0500
commitb96dea29c7432b776f7874ca536070682e9e426b (patch)
tree02100dfe87b40abb4ac1ff5cb01c9f3e90d0909c /src/bindings/interface/ScriptMgr.h
parenta2f8a735aeec5517a1e28dd9202f241966be7691 (diff)
parent1efdaa89601f5b617b6abfc8b023ccac8e915ff6 (diff)
*Merge.
--HG-- branch : trunk
Diffstat (limited to 'src/bindings/interface/ScriptMgr.h')
-rw-r--r--src/bindings/interface/ScriptMgr.h52
1 files changed, 25 insertions, 27 deletions
diff --git a/src/bindings/interface/ScriptMgr.h b/src/bindings/interface/ScriptMgr.h
index a5e5f478d03..56ad4c2b87b 100644
--- a/src/bindings/interface/ScriptMgr.h
+++ b/src/bindings/interface/ScriptMgr.h
@@ -35,12 +35,11 @@ class SpellCastTargets;
class Map;
#define MAX_SCRIPTS 1000
-#define MAX_INSTANCE_SCRIPTS 1000
struct Script
{
Script() :
- pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL),
+ pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL), pGOSelect(NULL), pGOSelectWithCode(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)
@@ -49,26 +48,30 @@ struct Script
std::string Name;
// -- Quest/gossip Methods to be scripted --
- bool (*pGossipHello )(Player *player, Creature *_Creature);
- bool (*pQuestAccept )(Player *player, Creature *_Creature, Quest const*_Quest );
- bool (*pGossipSelect )(Player *player, Creature *_Creature, uint32 sender, uint32 action );
- bool (*pGossipSelectWithCode)(Player *player, Creature *_Creature, uint32 sender, uint32 action, const char* sCode );
- bool (*pQuestSelect )(Player *player, Creature *_Creature, Quest const*_Quest );
- bool (*pQuestComplete )(Player *player, Creature *_Creature, Quest const*_Quest );
- uint32 (*pNPCDialogStatus )(Player *player, Creature *_Creature );
- uint32 (*pGODialogStatus )(Player *player, GameObject * _GO );
- bool (*pChooseReward )(Player *player, Creature *_Creature, Quest const*_Quest, uint32 opt );
- bool (*pItemHello )(Player *player, Item *_Item, Quest const*_Quest );
- bool (*pGOHello )(Player *player, GameObject *_GO );
- bool (*pAreaTrigger )(Player *player, AreaTriggerEntry* at);
- bool (*pItemQuestAccept )(Player *player, Item *_Item, Quest const*_Quest );
- bool (*pGOQuestAccept )(Player *player, GameObject *_GO, Quest const*_Quest );
- bool (*pGOChooseReward )(Player *player, GameObject *_GO, Quest const*_Quest, uint32 opt );
- bool (*pReceiveEmote )(Player *player, Creature *_Creature, uint32 emote );
- bool (*pItemUse )(Player *player, Item* _Item, SpellCastTargets const& targets);
-
- CreatureAI* (*GetAI)(Creature *_Creature);
- // -----------------------------------------
+ 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 (*pGOSelect )(Player*, GameObject*, uint32, uint32);
+ bool (*pGOSelectWithCode )(Player*, GameObject*, uint32, uint32, const char*);
+ bool (*pQuestSelect )(Player*, Creature*, Quest const*);
+ bool (*pQuestComplete )(Player*, Creature*, Quest const*);
+ uint32 (*pNPCDialogStatus )(Player*, Creature*);
+ uint32 (*pGODialogStatus )(Player*, GameObject*);
+ 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*);
+
+ void RegisterSelf();
};
@@ -81,11 +84,6 @@ class InstanceDataScript
InstanceData* (*GetInstanceData)(Map *_Map);
};
-extern int nrscripts;
-extern Script *m_scripts[MAX_SCRIPTS];
-extern InstanceDataScript *m_instance_scripts[MAX_INSTANCE_SCRIPTS];
-extern int num_inst_scripts;
-
#define VISIBLE_RANGE (50.0f)
struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI