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

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

[svn] * Merge Temp dev SVN with Assembla.
* Changes include:

  • Implementation of w12x's Outdoor PvP and Game Event Systems.
  • Temporary removal of IRC Chat Bot (until infinite loop when disabled is fixed).
  • All mangos -> trinity (to convert your mangos_string table, please run mangos_string_to_trinity_string.sql).
  • Improved Config cleanup.
  • And many more changes.

Original author: Seline
Date: 2008-10-14 11:57:03-05:00

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