* 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
(cherry picked from commit e8b2be3527)
* 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.
* Scripts/ScarletMonastery: Fix wrong emote during Headless Horseman encounter
* Scripts/HoR: Fix wrong emote during escape event
* Core/Unit: Make improve type safety of HandleEmoteCommand
Change argument type to the expected enum type Emote
* Scripts/CoS: Use SetUInt32Value to set UNIT_NPC_EMOTESTATE
UNIT_NPC_EMOTESTATE is no flag field
Adapt InstanceScript into newer structure and style
Adapt existing boss scripts into newer structure and style
Improve existing boss related definitions
Should make each boss more functionally reliable, but nothing new has been added
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)
- Replace NULL uses in new code with nullptr
- Fix wrong (accumulated) load time log when loading calendar invites
- Make Creature::CanRegenerateHealth const as its just a getter
- Mark OnlyOnceAreaTriggerScript::OnTrigger as final in case someone wants to override that (you are supposed to use protected _OnTrigger hook)
- True blizzlike creature spawn/respawn behavior - new creature = new object
- Toggleable spawn groups (with C++/SAI/command options to use them)
- Custom feature: dynamic spawn rate scaling. Accelerates respawn rate based on players in the zone.
- Backward compatibility mode (set via group and for summons)
to support creatures/gos that currently don't work well with this
(this should be removed once the exceptions are fixed)
Fixes and closes#2858
Tags #8661 as fixable.
Fixes and closes#13787Fixes#15222.
- Changed self-accessor on GameObjectAI to "me", like UnitAI
- Moved all related functions to AI, now Unit and GameObject have the same function names with identical behaviour
- Remove "OnUpdate" from CreatureScript/GameObjectScript, was never used and we already have AI Update method
- Quest methods no longer return a bool, the return value was used to call the AI version if the ScriptMgr one returned false
- Implemented GameObjectAI::Destroyed hook (was never called), implemented Damaged method
- Rename OnStateChanged to OnLootStateChanged to reflect when it's really called, and created a new hook OnStateChanged that only gets called on GOState change
- Since the functions are now only getting called from AI, made GetAI methods full virtual. (CanSpawn method is anyways going to be used on creatures with AI)
- Duplicated logic never used, sometimes only ScriptMgr version was called, sometimes only AI
- They only encourage bad scripting practices
- You can still use OnSpellHit or a SpellScript
* Delay unloading of shared libraries to the next update tick
to prevent crashes in the destructor of the last referenced
script instance.
* Closes#17557
* Finally this commit enables dynamic script hotswapping
and finished the PR #15671.
* Split the storage layout to use optimized storages
for database bound and unbound scripts.
* Add several unload workers to reload scripts correctly
-> Requires further investigation.
* Fixes memory leaks in ScriptMgr when dropping invalid scripts.
* Fixes VehicleScripts
* Makes OutdoorPvP scripts reloadable
* Makes InstanceMapScripts reloadable
* Makes CommandScripts reloadable
(cherry picked from commit 9cc97f226d)
* is responsible for registering plain modules.
* requires compilation with the `WITH_DYNAMIC_LINKING` flag.
* requires further support of the ScriptMgr.
(cherry picked from commit bc0f2b6e5a)