root/trunk/src/game/ScriptCalls.h @ 19

Revision 2, 4.1 kB (checked in by yumileroy, 17 years ago)

[svn] * Proper SVN structure

Original author: Neo2003
Date: 2008-10-02 16:23:55-05:00

Line 
1/*
2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17 */
18
19#ifndef __SCRIPT_CALLS_H
20#define __SCRIPT_CALLS_H
21
22#include "Common.h"
23#include "ObjectMgr.h"
24
25class Creature;
26class CreatureAI;
27class GameObject;
28class Item;
29class Player;
30class Quest;
31class SpellCastTargets;
32class Map;
33class InstanceData;
34
35bool LoadScriptingModule(char const* libName = "");
36void UnloadScriptingModule();
37
38typedef void(MANGOS_IMPORT * scriptCallScriptsInit) ();
39typedef void(MANGOS_IMPORT * scriptCallScriptsFree) ();
40
41typedef bool(MANGOS_IMPORT * scriptCallGossipHello) (Player *player, Creature *_Creature );
42typedef bool(MANGOS_IMPORT * scriptCallQuestAccept) (Player *player, Creature *_Creature, Quest const *);
43typedef bool(MANGOS_IMPORT * scriptCallGossipSelect)(Player *player, Creature *_Creature, uint32 sender, uint32 action);
44typedef bool(MANGOS_IMPORT * scriptCallGossipSelectWithCode)( Player *player, Creature *_Creature, uint32 sender, uint32 action, const char* sCode );
45typedef bool(MANGOS_IMPORT * scriptCallQuestSelect)( Player *player, Creature *_Creature, Quest const* );
46typedef bool(MANGOS_IMPORT * scriptCallQuestComplete)(Player *player, Creature *_Creature, Quest const*);
47typedef uint32(MANGOS_IMPORT * scriptCallNPCDialogStatus)( Player *player, Creature *_Creature);
48typedef uint32(MANGOS_IMPORT * scriptCallGODialogStatus)( Player *player, GameObject * _GO);
49typedef bool(MANGOS_IMPORT * scriptCallChooseReward)( Player *player, Creature *_Creature, Quest const*, uint32 opt );
50typedef bool(MANGOS_IMPORT * scriptCallItemHello)( Player *player, Item *, Quest const*);
51typedef bool(MANGOS_IMPORT * scriptCallGOHello)( Player *player, GameObject * );
52typedef bool(MANGOS_IMPORT * scriptCallAreaTrigger)( Player *player, AreaTriggerEntry const* );
53typedef bool(MANGOS_IMPORT * scriptCallItemQuestAccept)(Player *player, Item *, Quest const*);
54typedef bool(MANGOS_IMPORT * scriptCallGOQuestAccept)(Player *player, GameObject *, Quest const*);
55typedef bool(MANGOS_IMPORT * scriptCallGOChooseReward)(Player *player, GameObject *, Quest const*, uint32 opt );
56typedef bool(MANGOS_IMPORT * scriptCallReceiveEmote) ( Player *player, Creature *_Creature, uint32 emote );
57typedef bool(MANGOS_IMPORT * scriptCallItemUse) (Player *player, Item *_Item, SpellCastTargets const& targets);
58typedef CreatureAI* (MANGOS_IMPORT * scriptCallGetAI) ( Creature *_Creature );
59typedef InstanceData* (MANGOS_IMPORT * scriptCallCreateInstanceData) (Map *map);
60
61typedef struct
62{
63    scriptCallScriptsInit ScriptsInit;
64    scriptCallScriptsFree ScriptsFree;
65
66    scriptCallGossipHello GossipHello;
67    scriptCallGOChooseReward GOChooseReward;
68    scriptCallQuestAccept QuestAccept;
69    scriptCallGossipSelect GossipSelect;
70    scriptCallGossipSelectWithCode GossipSelectWithCode;
71    scriptCallQuestSelect QuestSelect;
72    scriptCallQuestComplete QuestComplete;
73    scriptCallNPCDialogStatus NPCDialogStatus;
74    scriptCallGODialogStatus GODialogStatus;
75    scriptCallChooseReward ChooseReward;
76    scriptCallItemHello ItemHello;
77    scriptCallGOHello GOHello;
78    scriptCallAreaTrigger scriptAreaTrigger;
79    scriptCallItemQuestAccept ItemQuestAccept;
80    scriptCallGOQuestAccept GOQuestAccept;
81    scriptCallReceiveEmote ReceiveEmote;
82    scriptCallItemUse ItemUse;
83    scriptCallGetAI GetAI;
84    scriptCallCreateInstanceData CreateInstanceData;
85
86    MANGOS_LIBRARY_HANDLE hScriptsLib;
87}_ScriptSet,*ScriptsSet;
88
89extern ScriptsSet Script;
90#endif
Note: See TracBrowser for help on using the browser.