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

Revision 149, 4.2 kB (checked in by yumileroy, 17 years ago)

[svn] *Implement new player conditions CONDITION_NO_AURA, CONDITION_ACTIVE_EVENT
* Default behaviour of pets for creatures changed to REACT_DEFENSIVE
* Disallowed sending wrapped items as COD
* Prevent loading and saving single target auras for pet in same way as already implemented for player
* Correctly limit use some flask types to zones.
* Fixed extracting common.MPQ under *nix
* Many small xleanups and fixes.
** mangos merge rev.

TEST REV so be careful of creepy crawly bugs!

Original author: KingPin?
Date: 2008-11-02 16:53:46-06:00

Line 
1/*
2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
3 *
4 * Copyright (C) 2008 Trinity <http://www.trinitycore.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) ();
42typedef char const* (TRINITY_IMPORT * scriptCallScriptsVersion) ();
43
44typedef bool(TRINITY_IMPORT * scriptCallGossipHello) (Player *player, Creature *_Creature );
45typedef bool(TRINITY_IMPORT * scriptCallQuestAccept) (Player *player, Creature *_Creature, Quest const *);
46typedef bool(TRINITY_IMPORT * scriptCallGossipSelect)(Player *player, Creature *_Creature, uint32 sender, uint32 action);
47typedef bool(TRINITY_IMPORT * scriptCallGossipSelectWithCode)( Player *player, Creature *_Creature, uint32 sender, uint32 action, const char* sCode );
48typedef bool(TRINITY_IMPORT * scriptCallQuestSelect)( Player *player, Creature *_Creature, Quest const* );
49typedef bool(TRINITY_IMPORT * scriptCallQuestComplete)(Player *player, Creature *_Creature, Quest const*);
50typedef uint32(TRINITY_IMPORT * scriptCallNPCDialogStatus)( Player *player, Creature *_Creature);
51typedef uint32(TRINITY_IMPORT * scriptCallGODialogStatus)( Player *player, GameObject * _GO);
52typedef bool(TRINITY_IMPORT * scriptCallChooseReward)( Player *player, Creature *_Creature, Quest const*, uint32 opt );
53typedef bool(TRINITY_IMPORT * scriptCallItemHello)( Player *player, Item *, Quest const*);
54typedef bool(TRINITY_IMPORT * scriptCallGOHello)( Player *player, GameObject * );
55typedef bool(TRINITY_IMPORT * scriptCallAreaTrigger)( Player *player, AreaTriggerEntry const* );
56typedef bool(TRINITY_IMPORT * scriptCallItemQuestAccept)(Player *player, Item *, Quest const*);
57typedef bool(TRINITY_IMPORT * scriptCallGOQuestAccept)(Player *player, GameObject *, Quest const*);
58typedef bool(TRINITY_IMPORT * scriptCallGOChooseReward)(Player *player, GameObject *, Quest const*, uint32 opt );
59typedef bool(TRINITY_IMPORT * scriptCallReceiveEmote) ( Player *player, Creature *_Creature, uint32 emote );
60typedef bool(TRINITY_IMPORT * scriptCallItemUse) (Player *player, Item *_Item, SpellCastTargets const& targets);
61typedef CreatureAI* (TRINITY_IMPORT * scriptCallGetAI) ( Creature *_Creature );
62typedef InstanceData* (TRINITY_IMPORT * scriptCallCreateInstanceData) (Map *map);
63
64typedef struct
65{
66    scriptCallScriptsInit ScriptsInit;
67    scriptCallScriptsFree ScriptsFree;
68        scriptCallScriptsVersion ScriptsVersion;
69
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    scriptCallReceiveEmote ReceiveEmote;
86    scriptCallItemUse ItemUse;
87    scriptCallGetAI GetAI;
88    scriptCallCreateInstanceData CreateInstanceData;
89
90    TRINITY_LIBRARY_HANDLE hScriptsLib;
91}_ScriptSet,*ScriptsSet;
92
93extern ScriptsSet Script;
94#endif
Note: See TracBrowser for help on using the browser.