[8483] Implement glyph 43361.
[getmangos.git] / src / game / ScriptCalls.h
blob4c8f46b69e4fd8618554601d0885ccc39becec0a
1 /*
2 * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
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.
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.
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
19 #ifndef __SCRIPT_CALLS_H
20 #define __SCRIPT_CALLS_H
22 #include "Common.h"
23 #include "ObjectMgr.h"
25 class Creature;
26 class CreatureAI;
27 class GameObject;
28 class Item;
29 class Player;
30 class Quest;
31 class SpellCastTargets;
32 class Map;
33 class InstanceData;
35 bool LoadScriptingModule(char const* libName = "");
36 void UnloadScriptingModule();
38 typedef void(MANGOS_IMPORT * scriptCallScriptsInit) (const ObjectMgr::ScriptNameMap &scriptNames);
39 typedef void(MANGOS_IMPORT * scriptCallScriptsFree) ();
40 typedef char const* (MANGOS_IMPORT * scriptCallScriptsVersion) ();
42 typedef bool(MANGOS_IMPORT * scriptCallGossipHello) (Player *player, Creature *_Creature );
43 typedef bool(MANGOS_IMPORT * scriptCallQuestAccept) (Player *player, Creature *_Creature, Quest const *);
44 typedef bool(MANGOS_IMPORT * scriptCallGossipSelect)(Player *player, Creature *_Creature, uint32 sender, uint32 action);
45 typedef bool(MANGOS_IMPORT * scriptCallGossipSelectWithCode)( Player *player, Creature *_Creature, uint32 sender, uint32 action, const char* sCode );
46 typedef bool(MANGOS_IMPORT * scriptCallQuestSelect)( Player *player, Creature *_Creature, Quest const* );
47 typedef bool(MANGOS_IMPORT * scriptCallQuestComplete)(Player *player, Creature *_Creature, Quest const*);
48 typedef uint32(MANGOS_IMPORT * scriptCallNPCDialogStatus)( Player *player, Creature *_Creature);
49 typedef uint32(MANGOS_IMPORT * scriptCallGODialogStatus)( Player *player, GameObject * _GO);
50 typedef bool(MANGOS_IMPORT * scriptCallChooseReward)( Player *player, Creature *_Creature, Quest const*, uint32 opt );
51 typedef bool(MANGOS_IMPORT * scriptCallItemHello)( Player *player, Item *, Quest const*);
52 typedef bool(MANGOS_IMPORT * scriptCallGOHello)( Player *player, GameObject * );
53 typedef bool(MANGOS_IMPORT * scriptCallAreaTrigger)( Player *player, AreaTriggerEntry const* );
54 typedef bool(MANGOS_IMPORT * scriptCallItemQuestAccept)(Player *player, Item *, Quest const*);
55 typedef bool(MANGOS_IMPORT * scriptCallGOQuestAccept)(Player *player, GameObject *, Quest const*);
56 typedef bool(MANGOS_IMPORT * scriptCallGOChooseReward)(Player *player, GameObject *, Quest const*, uint32 opt );
57 typedef bool(MANGOS_IMPORT * scriptCallItemUse) (Player *player, Item *_Item, SpellCastTargets const& targets);
58 typedef bool(MANGOS_IMPORT * scriptCallEffectDummyGameObj) (Unit *caster, uint32 spellId, uint32 effIndex, GameObject *gameObjTarget);
59 typedef bool(MANGOS_IMPORT * scriptCallEffectDummyCreature) (Unit *caster, uint32 spellId, uint32 effIndex, Creature *crTarget);
60 typedef bool(MANGOS_IMPORT * scriptCallEffectDummyItem) (Unit *caster, uint32 spellId, uint32 effIndex, Item *itemTarget);
61 typedef CreatureAI* (MANGOS_IMPORT * scriptCallGetAI) ( Creature *_Creature );
62 typedef InstanceData* (MANGOS_IMPORT * scriptCallCreateInstanceData) (Map *map);
64 typedef struct
66 scriptCallScriptsInit ScriptsInit;
67 scriptCallScriptsFree ScriptsFree;
68 scriptCallScriptsVersion ScriptsVersion;
70 scriptCallGossipHello GossipHello;
71 scriptCallGOChooseReward GOChooseReward;
72 scriptCallQuestAccept QuestAccept;
73 scriptCallGossipSelect GossipSelect;
74 scriptCallGossipSelectWithCode GossipSelectWithCode;
75 scriptCallQuestSelect QuestSelect;
76 scriptCallQuestComplete QuestComplete;
77 scriptCallNPCDialogStatus NPCDialogStatus;
78 scriptCallGODialogStatus GODialogStatus;
79 scriptCallChooseReward ChooseReward;
80 scriptCallItemHello ItemHello;
81 scriptCallGOHello GOHello;
82 scriptCallAreaTrigger scriptAreaTrigger;
83 scriptCallItemQuestAccept ItemQuestAccept;
84 scriptCallGOQuestAccept GOQuestAccept;
85 scriptCallItemUse ItemUse;
86 scriptCallEffectDummyGameObj EffectDummyGameObj;
87 scriptCallEffectDummyCreature EffectDummyCreature;
88 scriptCallEffectDummyItem EffectDummyItem;
89 scriptCallGetAI GetAI;
90 scriptCallCreateInstanceData CreateInstanceData;
92 MANGOS_LIBRARY_HANDLE hScriptsLib;
93 }_ScriptSet,*ScriptsSet;
95 extern ScriptsSet Script;
96 #endif