2 * Copyright (C) 2005-2010 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"
32 class SpellCastTargets
;
36 bool LoadScriptingModule(char const* libName
= "");
37 void UnloadScriptingModule();
39 typedef void(MANGOS_IMPORT
* scriptCallScriptsInit
) (const ObjectMgr::ScriptNameMap
&scriptNames
);
40 typedef void(MANGOS_IMPORT
* scriptCallScriptsFree
) ();
41 typedef char const* (MANGOS_IMPORT
* scriptCallScriptsVersion
) ();
43 typedef bool(MANGOS_IMPORT
* scriptCallGossipHello
) (Player
*player
, Creature
*_Creature
);
44 typedef bool(MANGOS_IMPORT
* scriptCallGOGossipHello
) (Player
*player
, GameObject
*_GO
);
45 typedef bool(MANGOS_IMPORT
* scriptCallQuestAccept
) (Player
*player
, Creature
*_Creature
, Quest
const *);
46 typedef bool(MANGOS_IMPORT
* scriptCallGossipSelect
)(Player
*player
, Creature
*_Creature
, uint32 sender
, uint32 action
);
47 typedef bool(MANGOS_IMPORT
* scriptCallGOGossipSelect
)(Player
*player
, GameObject
*_GO
, uint32 sender
, uint32 action
);
48 typedef bool(MANGOS_IMPORT
* scriptCallGossipSelectWithCode
)( Player
*player
, Creature
*_Creature
, uint32 sender
, uint32 action
, const char* sCode
);
49 typedef bool(MANGOS_IMPORT
* scriptCallGOGossipSelectWithCode
)( Player
*player
, GameObject
*_GO
, uint32 sender
, uint32 action
, const char* sCode
);
50 typedef bool(MANGOS_IMPORT
* scriptCallQuestSelect
)( Player
*player
, Creature
*_Creature
, Quest
const* );
51 typedef bool(MANGOS_IMPORT
* scriptCallQuestComplete
)(Player
*player
, Creature
*_Creature
, Quest
const*);
52 typedef uint32(MANGOS_IMPORT
* scriptCallNPCDialogStatus
)( Player
*player
, Creature
*_Creature
);
53 typedef uint32(MANGOS_IMPORT
* scriptCallGODialogStatus
)( Player
*player
, GameObject
* _GO
);
54 typedef bool(MANGOS_IMPORT
* scriptCallChooseReward
)( Player
*player
, Creature
*_Creature
, Quest
const*, uint32 opt
);
55 typedef bool(MANGOS_IMPORT
* scriptCallItemHello
)( Player
*player
, Item
*, Quest
const*);
56 typedef bool(MANGOS_IMPORT
* scriptCallGOHello
)( Player
*player
, GameObject
* );
57 typedef bool(MANGOS_IMPORT
* scriptCallAreaTrigger
)( Player
*player
, AreaTriggerEntry
const* );
58 typedef bool(MANGOS_IMPORT
* scriptCallItemQuestAccept
)(Player
*player
, Item
*, Quest
const*);
59 typedef bool(MANGOS_IMPORT
* scriptCallGOQuestAccept
)(Player
*player
, GameObject
*, Quest
const*);
60 typedef bool(MANGOS_IMPORT
* scriptCallGOChooseReward
)(Player
*player
, GameObject
*, Quest
const*, uint32 opt
);
61 typedef bool(MANGOS_IMPORT
* scriptCallItemUse
) (Player
*player
, Item
*_Item
, SpellCastTargets
const& targets
);
62 typedef bool(MANGOS_IMPORT
* scriptCallEffectDummyGameObj
) (Unit
*caster
, uint32 spellId
, SpellEffectIndex effIndex
, GameObject
*gameObjTarget
);
63 typedef bool(MANGOS_IMPORT
* scriptCallEffectDummyCreature
) (Unit
*caster
, uint32 spellId
, SpellEffectIndex effIndex
, Creature
*crTarget
);
64 typedef bool(MANGOS_IMPORT
* scriptCallEffectDummyItem
) (Unit
*caster
, uint32 spellId
, SpellEffectIndex effIndex
, Item
*itemTarget
);
65 typedef bool(MANGOS_IMPORT
* scriptCallEffectAuraDummy
) (const Aura
* pAura
, bool apply
);
66 typedef CreatureAI
* (MANGOS_IMPORT
* scriptCallGetAI
) ( Creature
*_Creature
);
67 typedef InstanceData
* (MANGOS_IMPORT
* scriptCallCreateInstanceData
) (Map
*map
);
71 scriptCallScriptsInit ScriptsInit
;
72 scriptCallScriptsFree ScriptsFree
;
73 scriptCallScriptsVersion ScriptsVersion
;
75 scriptCallGossipHello GossipHello
;
76 scriptCallGOGossipHello GOGossipHello
;
77 scriptCallGOChooseReward GOChooseReward
;
78 scriptCallQuestAccept QuestAccept
;
79 scriptCallGossipSelect GossipSelect
;
80 scriptCallGOGossipSelect GOGossipSelect
;
81 scriptCallGossipSelectWithCode GossipSelectWithCode
;
82 scriptCallGOGossipSelectWithCode GOGossipSelectWithCode
;
83 scriptCallQuestSelect QuestSelect
;
84 scriptCallQuestComplete QuestComplete
;
85 scriptCallNPCDialogStatus NPCDialogStatus
;
86 scriptCallGODialogStatus GODialogStatus
;
87 scriptCallChooseReward ChooseReward
;
88 scriptCallItemHello ItemHello
;
89 scriptCallGOHello GOHello
;
90 scriptCallAreaTrigger scriptAreaTrigger
;
91 scriptCallItemQuestAccept ItemQuestAccept
;
92 scriptCallGOQuestAccept GOQuestAccept
;
93 scriptCallItemUse ItemUse
;
94 scriptCallEffectDummyGameObj EffectDummyGameObj
;
95 scriptCallEffectDummyCreature EffectDummyCreature
;
96 scriptCallEffectDummyItem EffectDummyItem
;
97 scriptCallEffectAuraDummy EffectAuraDummy
;
98 scriptCallGetAI GetAI
;
99 scriptCallCreateInstanceData CreateInstanceData
;
101 MANGOS_LIBRARY_HANDLE hScriptsLib
;
102 }_ScriptSet
,*ScriptsSet
;
104 extern ScriptsSet Script
;