* Implemented second choice aggro targets for creatures. This will prevent players...
[auctionmangos.git] / src / game / ScriptCalls.h
blob0b8b5834435bc39f861d23c25607712f0bea1a8d
1 /*
2 * Copyright (C) 2005-2008 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) ();
39 typedef void(MANGOS_IMPORT * scriptCallScriptsFree) ();
41 typedef bool(MANGOS_IMPORT * scriptCallGossipHello) (Player *player, Creature *_Creature );
42 typedef bool(MANGOS_IMPORT * scriptCallQuestAccept) (Player *player, Creature *_Creature, Quest const *);
43 typedef bool(MANGOS_IMPORT * scriptCallGossipSelect)(Player *player, Creature *_Creature, uint32 sender, uint32 action);
44 typedef bool(MANGOS_IMPORT * scriptCallGossipSelectWithCode)( Player *player, Creature *_Creature, uint32 sender, uint32 action, const char* sCode );
45 typedef bool(MANGOS_IMPORT * scriptCallQuestSelect)( Player *player, Creature *_Creature, Quest const* );
46 typedef bool(MANGOS_IMPORT * scriptCallQuestComplete)(Player *player, Creature *_Creature, Quest const*);
47 typedef uint32(MANGOS_IMPORT * scriptCallNPCDialogStatus)( Player *player, Creature *_Creature);
48 typedef uint32(MANGOS_IMPORT * scriptCallGODialogStatus)( Player *player, GameObject * _GO);
49 typedef bool(MANGOS_IMPORT * scriptCallChooseReward)( Player *player, Creature *_Creature, Quest const*, uint32 opt );
50 typedef bool(MANGOS_IMPORT * scriptCallItemHello)( Player *player, Item *, Quest const*);
51 typedef bool(MANGOS_IMPORT * scriptCallGOHello)( Player *player, GameObject * );
52 typedef bool(MANGOS_IMPORT * scriptCallAreaTrigger)( Player *player, AreaTriggerEntry const* );
53 typedef bool(MANGOS_IMPORT * scriptCallItemQuestAccept)(Player *player, Item *, Quest const*);
54 typedef bool(MANGOS_IMPORT * scriptCallGOQuestAccept)(Player *player, GameObject *, Quest const*);
55 typedef bool(MANGOS_IMPORT * scriptCallGOChooseReward)(Player *player, GameObject *, Quest const*, uint32 opt );
56 typedef bool(MANGOS_IMPORT * scriptCallReceiveEmote) ( Player *player, Creature *_Creature, uint32 emote );
57 typedef bool(MANGOS_IMPORT * scriptCallItemUse) (Player *player, Item *_Item, SpellCastTargets const& targets);
58 typedef CreatureAI* (MANGOS_IMPORT * scriptCallGetAI) ( Creature *_Creature );
59 typedef InstanceData* (MANGOS_IMPORT * scriptCallCreateInstanceData) (Map *map);
61 typedef struct
63 scriptCallScriptsInit ScriptsInit;
64 scriptCallScriptsFree ScriptsFree;
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;
86 MANGOS_LIBRARY_HANDLE hScriptsLib;
87 }_ScriptSet,*ScriptsSet;
89 extern ScriptsSet Script;
90 #endif