Attempt to fix players getting stuck after dying caused by a hack that calls SetControlled(true, UNIT_STATE_ROOT) by calling the opposite when a dead player leaves the instance, i.e. on releasing.
Close#24458
(cherry picked from commit dc21ac342e)
Add a second parameter to SetCorpseDelay() that specifies if Rate.Corpse.Decay.Looted setting should be ignored, false by default (aka don't ignore by default).
Add a second parameter to SMART_ACTION_SET_CORPSE_DELAY to specify if Rate.Corpse.Decay.Looted should be included, false by default (aka ignore by default).
(cherry picked from commit d5fc86af8b)
* Core/SAI: Add new action SMART_ACTION_SET_HEALTH_PCT
Add new action SMART_ACTION_SET_HEALTH_PCT (142) with one single parameter "percent" to set the Unit health.
Close#25317
* Do not allow 0%
(cherry picked from commit 7d6f7e4d19)
* Core/Creature: Add new db field InteractionPauseTimer
Add new db field InteractionPauseTimer to allow to define different interaction pause timers for each creature (the previous system was a global setting in worldserver.conf Creature.MovingStopTimeForPlayer)
* Set all columns in creature_template_movement as optional (can be NULL, default NULL). Fill only the columns that should override the default C++ value
* Use the InteractionPauseTimer value throughout the code instead of Creature.MovingStopTimeForPlayer
* Handle InteractionPauseTimer set to 0 as "don't stop at all"
* Implement InteractionPauseTimer in creature_movement_override
creature_movement_override allows NULL values, in which case the values from creature_template_movement will be used for those columns that are NULL, falling back to default C++ values if creature_template_movement has NULL values too (or no rows for the creature)
* Read default InteractionPauseTimer from worldserver.conf
* Rename 2021_99_99_99_world.sql to 2021_01_22_00_world.sql
(cherry picked from commit a22bc236eb)
* Core/Unit: Allow to define Units which can enter water but cannot swim
Allow to define Units which can enter water but cannot swim, i.e. crabs walking at the bottom of a sea.
* Add UNIT_FLAG_SWIMMING to creatures when entering combat
* Fix charmed creatures not entering water
* Always allow Creatures controlled by players to enter water
* Add swimming flag when possessing a unit and remove it properly at the end, even if the creature engaged combat before and after.
When adding/removing UNIT_FLAG_SWIMMING manually calling Creature::RefreshSwimmingFlag(true) might be required.
(cherry picked from commit fc1a0d9368)
* Scripts/Svala SorrowGrave - Fix broken intro event and Ritual of the Sword
* Added missing header for non-PCH build.
* Added error checking for Svala's targeting, and tightened up the timing on the intro event.
* Update WorldDB\Creature_Template_Movement for Svala
* Fix movement during intro and ritual event
* Rename SQL file for merge
Co-authored-by: Carbenium <carbenium@outlook.com>
(cherry picked from commit a225717b99)
* Core/SAI: Fix SMART_EVENT_FLAG_NOT_REPEATABLE flag being ignored when specifying a chance
Fix SMART_EVENT_FLAG_NOT_REPEATABLE flag being ignored when specifying a chance, always making the action trigger.
* Fix SMART_ACTION_CAST with SMART_EVENT_FLAG_NOT_REPEATABLE not casting the spell at all if rolled chance was successful but creature couldn't cast the spell
* Prevent linked actions if SMART_ACTION_CAST couldn't be completed and will be retried later
(cherry picked from commit 96b289cadb)
Use the same logic of (CENTER_GRID_ID - x / SIZE_OF_GRIDS) in GridMap::getMinHeight() as Map::GetGrid() to avoid coord grid mismatches caused by floating point precision, i.e. getting the wrong grid.
Replace defines with constexpr in grids to make debugging easier.
Closes#25652
(cherry picked from commit 0c69316714)
Turned out almost all spells from BM were copied to create Violet Hold. Not only serverside spells and not only their effects but also attributes and icons. The scripts were also copied, possibly unchanged
(cherry picked from commit 8ca575ed52)