Commit Graph
1 Commits
Author SHA1 Message Date
Advocaite 3873938985 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
2026-10-13 16:52:49 +08:00