Commit Graph
1 Commits
Author SHA1 Message Date
Advocaite af808e1492 Modules: load optional modules through ScriptMgr, bots start/tick/stop as a WorldScript
src/modules: every folder with a CMakeLists.txt is added; a module registers its
library, script loader and configs with trinity_add_module(). worldserver links
the generated `modules` library, whose AddModuleScripts() runs after AddScripts()
and is empty when no module is built. Module configs go to worldserver.conf.d.

New WorldScript hooks: OnBeforeMapsUpdate (each tick, before the maps update)
and OnWorldInitialized (world loaded, before the network starts). The bot module
uses them instead of direct calls from World.cpp and Main.cpp. The world script
update is back at its place after the maps, as in forever.

Removed the unused ModuleManager, modules/Common and TestModule, and the bot
freeze dump and settings log from Main.cpp (the settings line moved into the
module).
2026-10-13 10:20:15 +08:00