Core/Scripting: optional modules in src/modules and generic ScriptMgr hooks (#31)
Modules: every folder in src/modules with a CMakeLists.txt is added. A module registers its library, script loader and config files with trinity_add_module(); worldserver links the generated `modules` library, whose AddModuleScripts() runs after AddScripts(). With no module it is empty and the server behaves as before. Module configs are copied to worldserver.conf.d. See src/modules/README.md. New hooks (called where nothing ran before; no cost without scripts): - WorldScript: OnWorldInitialized (world loaded, before the network starts), OnBeforeMapsUpdate (every tick, before the maps), CanCreateBattleground - PlayerScript: OnChatSent (say/yell, whisper, group, guild; after the message was sent), OnAddonMessageSent (whisper, group), OnLootItem, OnBattlegroundQueueJoin, OnBattlegroundInvite, OnBattlegroundPortFailed, OnLfgJoin (only when the join was accepted), OnLfgProposal - UnitScript: OnUnitDeath - GroupScript: OnSubgroupChange
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// This file was created automatically from src/modules/ModuleLoader.cpp.in.cmake
|
||||
|
||||
@TRINITY_MODULE_LOADER_DECLARATIONS@
|
||||
void AddModuleScripts()
|
||||
{
|
||||
@TRINITY_MODULE_LOADER_CALLS@}
|
||||
Reference in New Issue
Block a user