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
* Clean up Player::ResetTalents() from unnecessary logic, such as withdrawing money. Move it to more suitable places.
* Implemented SMSG_TALENTS_INVOLUNTARILY_RESET and use it instead of old trinity_string.
* Do not reset the accumulated talent reset cost if CONFIG_NO_RESET_TALENT_COST is enabled.
(cherry picked from commit ca1560f043df275d9241055adbf61a393666a533)
* Replace std::enable_if with concept constraints
* Move code not dependent on template arguments out of template function bodies
* Reduce number of ChatCommandResult copies made during parsing
* Changed ChatCommandTable subcommands argument from std::vector<> const& to std::span<> and convert command definitions to arrays
* Allow ChatHandler arguments to be const
* Add missing choice properties to database (InfiniteRange, ShowChoicesAsList)
* Allow limiiting the number of responses sent at the same time
* Fixed duration sent in SMSG_DISPLAY_PLAYER_CHOICE
* Remove dynamically generated response identifiers from database
* Remove auto rewarding choice responses
* Change response scripts to be bound to scriptname
* Devirtualize calls to Read and Update by marking concrete implementations as final
* Removed derived class template argument
* Specialize boost::asio::basic_stream_socket for boost::asio::io_context instead of type-erased any_io_executor
* Make socket initialization easier composable (before entering Read loop)
* Remove use of deprecated boost::asio::null_buffers and boost::beast::ssl_stream
* Introduce new BattlegroundScript class for map/bg specific scripts
* Remove all sub, zone specific, battleground classes except Arena
* Move all bg zone scripts to new BattlegroundScripts class in script folder
* Remove ZoneScript from Battleground class
* Remove some unused hooks from Battleground
* No TaxiPathNode row is skipped anymore (events/delays on first node now work)
* Fixed transport animation synchronization with client
* Fixed stoppable transports randomly resuming their path after relogging
Closes#27985
uint64 CalculateTime(uint64 t_offset) has been replaced with Milliseconds CalculateTime(Milliseconds t_offset).
Also add the std::chrono-ified overload void AddEvent(BasicEvent*, Milliseconds, bool)
(cherry picked from commit 92a02a5c8750913f596d7e3b58bf8439cb770c28)
Remove UnitScript from PlayerScript and CreatureScript classes as that's how the original system that was PR'd worked, see https://github.com/TrinityCore/TrinityCore/pull/7867 for reference.
Please note these are used as global hooks and should really just invoke stateless functions.
If you need to hook methods from PlayerScript/CreatureScript and UnitScript, just define 2 different scripts (this is how the original system worked and how it was designed to work)
(cherry picked from commit 5b7ead65bb116195f4336934bcff830e1b2af5bb)
Also remove CreatureScript::CanSpawn since nobody uses it, and spawn groups do the same thing.
(cherry picked from commit 94b5d9bfa1195ad7c32cf51a665b55514dac0938)