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
23 #include "ObjectMgr.h"
31 class SpellCastTargets
;
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
* scriptCallReceiveEmote
) ( Player
*player
, Creature
*_Creature
, uint32 emote
);
58 typedef bool(MANGOS_IMPORT
* scriptCallItemUse
) (Player
*player
, Item
*_Item
, SpellCastTargets
const& targets
);
59 typedef CreatureAI
* (MANGOS_IMPORT
* scriptCallGetAI
) ( Creature
*_Creature
);
60 typedef InstanceData
* (MANGOS_IMPORT
* scriptCallCreateInstanceData
) (Map
*map
);
64 scriptCallScriptsInit ScriptsInit
;
65 scriptCallScriptsFree ScriptsFree
;
66 scriptCallScriptsVersion ScriptsVersion
;
68 scriptCallGossipHello GossipHello
;
69 scriptCallGOChooseReward GOChooseReward
;
70 scriptCallQuestAccept QuestAccept
;
71 scriptCallGossipSelect GossipSelect
;
72 scriptCallGossipSelectWithCode GossipSelectWithCode
;
73 scriptCallQuestSelect QuestSelect
;
74 scriptCallQuestComplete QuestComplete
;
75 scriptCallNPCDialogStatus NPCDialogStatus
;
76 scriptCallGODialogStatus GODialogStatus
;
77 scriptCallChooseReward ChooseReward
;
78 scriptCallItemHello ItemHello
;
79 scriptCallGOHello GOHello
;
80 scriptCallAreaTrigger scriptAreaTrigger
;
81 scriptCallItemQuestAccept ItemQuestAccept
;
82 scriptCallGOQuestAccept GOQuestAccept
;
83 scriptCallReceiveEmote ReceiveEmote
;
84 scriptCallItemUse ItemUse
;
85 scriptCallGetAI GetAI
;
86 scriptCallCreateInstanceData CreateInstanceData
;
88 MANGOS_LIBRARY_HANDLE hScriptsLib
;
89 }_ScriptSet
,*ScriptsSet
;
91 extern ScriptsSet Script
;