OnConfigLoad(true) fires part way through a config reload and nothing
fires after a table reload, so a module (bots) keeps stale copies of
config values or reloaded tables until restart. WorldScript::OnAfterReload
now runs once a .reload command (in game, console or remote) finished
without error, with the full command path such as "reload config" or
"reload creature_template". Nothing listens to it in the core, so no
behaviour change.
Brings forever up to date with our 0.1.34 code for the WoW Forever client 1.60.1.70862.
Blizzlike only: fixes from real game data (packet captures, live hotfixes, player caches, Wowhead and Questie data,
VMaNGOS for the vanilla world) and server fixes. No custom items or custom content; every rate and option defaults
to Blizzard's behaviour.
What is new since 2ae1313e, in short:
- Clients 70790, 70840 and 70862: message numbers, mail, guild window, charters, contact list, add-on whispers.
- Crash and exploit fixes: guild ranks, loot of emptied veins, quest lookups, taxi mask, battleground templates,
vendor free buys, item sell price, auction house, falling out of the world, bnetserver request limit.
- Classes, talents, pets and buffs from the live game data and Blizzard's hotfixes of November.
- Quests, NPCs, spawns, trainers, loot, fishing, events, Merchant's Favor crates and writs, sealed crate turn-ins.
- Dungeon and raid scripts (Molten Core, Blackwing Lair, Zul'Gurub, Ahn'Qiraj, Shadowfang Keep, Deadmines ...).
- Pathing fixes that help pets and NPCs.
- Russian creature names, quest titles and quest texts.
- README: Blizzlike stance, branches, repack.
Why: UnitScript::OnDamage gives a script the damage but not where it came from. A script that keeps a table of what hits the raid (which boss spell did how much) can not tell the spells apart.
What: one virtual UnitScript hook, empty by default, called just before OnDamage in Unit::DealDamage with the spell (null for a melee swing). Damage is passed by value, so a script can not change it. No change for scripts that do not override it.
Why: a script can not see the pings a player sends to the group. Pings are the one way a player points at a target or a spot without chat, so a module that reacts to a player's orders (for example an "attack this" or "come here" ping) has no way to get them.
What: two virtual PlayerScript hooks, empty by default, and one ScriptMgr call each at the end of HandleSendPingUnit and HandleSendPingWorldPoint, after the packet went to the group. Nothing changes for the packets or for any script that does not override them.
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)