root/trunk/src/bindings/interface/Scripts/sc_default.cpp

Revision 44, 3.6 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#include "sc_defines.h"
22
23bool GossipHello_default(Player* /*player*/, Creature* /*_Creature*/)
24{
25    return false;
26}
27
28bool GossipSelect_default(Player* /*player*/, Creature* /*_Creature*/, uint32 /*sender*/, uint32 /*action*/ )
29{
30    return false;
31}
32
33bool GossipSelectWithCode_default( Player* /*player*/, Creature* /*_Creature*/, uint32 /*sender*/, uint32 /*action*/, const char* /*sCode*/ )
34{
35    return false;
36}
37
38bool QuestAccept_default(Player* /*player*/, Creature* /*_Creature*/, Quest const* /*_Quest*/ )
39{
40    return false;
41}
42
43bool QuestSelect_default(Player* /*player*/, Creature* /*_Creature*/, Quest const* /*_Quest*/ )
44{
45    return false;
46}
47
48bool QuestComplete_default(Player* /*player*/, Creature* /*_Creature*/, Quest const* /*_Quest*/ )
49{
50    return false;
51}
52
53bool ChooseReward_default(Player* /*player*/, Creature* /*_Creature*/, Quest const* /*_Quest*/, uint32 /*opt*/ )
54{
55    return false;
56}
57
58uint32 NPCDialogStatus_default(Player* /*player*/, Creature* /*_Creature*/ )
59{
60    return 128;
61}
62
63uint32 GODialogStatus_default(Player* /*player*/, GameObject* /*_Creature*/ )
64{
65    return 128;
66}
67
68bool ItemHello_default(Player* /*player*/, Item* /*_Item*/, Quest const* /*_Quest*/ )
69{
70    return false;
71}
72
73bool ItemQuestAccept_default(Player* /*player*/, Item* /*_Item*/, Quest const* /*_Quest*/ )
74{
75    return false;
76}
77
78bool GOHello_default(Player* /*player*/, GameObject* /*_GO*/ )
79{
80    return false;
81}
82
83bool GOQuestAccept_default(Player* /*player*/, GameObject* /*_GO*/, Quest const* /*_Quest*/ )
84{
85    return false;
86}
87
88bool GOChooseReward_default(Player* /*player*/, GameObject* /*_GO*/, Quest const* /*_Quest*/, uint32 /*opt*/ )
89{
90    return false;
91}
92
93bool AreaTrigger_default(Player* /*player*/, AreaTriggerEntry* /*atEntry*/ )
94{
95    return false;
96}
97
98void AddSC_default()
99{
100    Script *newscript;
101
102    newscript = new Script;
103    newscript->Name="default";
104    newscript->pGossipHello          = &GossipHello_default;
105    newscript->pQuestAccept          = &QuestAccept_default;
106    newscript->pGossipSelect         = &GossipSelect_default;
107    newscript->pGossipSelectWithCode = &GossipSelectWithCode_default;
108    newscript->pQuestSelect          = &QuestSelect_default;
109    newscript->pQuestComplete        = &QuestComplete_default;
110    newscript->pNPCDialogStatus      = &NPCDialogStatus_default;
111    newscript->pGODialogStatus       = &GODialogStatus_default;
112    newscript->pChooseReward         = &ChooseReward_default;
113    newscript->pItemHello            = &ItemHello_default;
114    newscript->pGOHello              = &GOHello_default;
115    newscript->pAreaTrigger          = &AreaTrigger_default;
116    newscript->pItemQuestAccept      = &ItemQuestAccept_default;
117    newscript->pGOQuestAccept        = &GOQuestAccept_default;
118    newscript->pGOChooseReward       = &GOChooseReward_default;
119
120    m_scripts[nrscripts++] = newscript;
121}
Note: See TracBrowser for help on using the browser.