TrinityCore
world_script_loader.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "World.h"
19
20// This is where scripts' loading functions should be declared:
21// world
25void AddSC_go_scripts();
26void AddSC_npc_guard();
33void AddSC_xp_boost();
34// player
35void AddSC_chat_log();
36void AddSC_duel_reset();
37
38// The name of this function should match:
39// void Add${NameOfDirectory}Scripts()
41{
51 AddSC_chat_log(); // location: scripts\World\chat_log.cpp
53
54 // FIXME: This should be moved in a script validation hook.
55 // To avoid duplicate code, we check once /*ONLY*/ if logging is permitted or not.
56 if (sWorld->getBoolConfig(CONFIG_IP_BASED_ACTION_LOGGING))
57 AddSC_action_ip_logger(); // location: scripts\World\action_ip_logger.cpp
59 if (sWorld->getIntConfig(CONFIG_XP_BOOST_DAYMASK) != 0)
61}
#define sWorld
Definition: World.h:931
@ CONFIG_XP_BOOST_DAYMASK
Definition: World.h:383
@ CONFIG_IP_BASED_ACTION_LOGGING
Definition: World.h:174
void AddSC_conversation_scripts()
void AddSC_go_scripts()
void AddSC_item_scripts()
void AddSC_npc_professions()
void AddSC_achievement_scripts()
void AddSC_action_ip_logger()
void AddWorldScripts()
void AddSC_areatrigger_scripts()
void AddSC_emerald_dragons()
void AddSC_npcs_special()
void AddSC_scene_scripts()
void AddSC_xp_boost()
Definition: boosted_xp.cpp:48
void AddSC_npc_guard()
Definition: npc_guard.cpp:235
void AddSC_chat_log()
Definition: chat_log.cpp:144
void AddSC_duel_reset()
Definition: duel_reset.cpp:131