* Core/Pools: Fix pools with 1 member never spawning anything anymore
Attempts to fix a 6 years old bug and never fixed by the original author.
* Remove respawn times from db once a respawn has been handled
* Allow to specify if Despawn1Object() should save or not the respawn time. We don't need to do that when respawning an object.
* Apply the same fix to GameObjects too
(cherry picked from commit c8ca48823d45dadb042a80637eff954483dd5328)
* Core/SAI: Add a warning when a boolean value is outside of [0,1] range
* Replace boolean fields in SAI with SAIBool (from uint32)
(cherry picked from commit 84c8d21ad38ade64444e2394f090b49d2ffb5c51)
Add 6th parameter "count" to SMART_ACTION_SUMMON_CREATURE action to summon more than 1 creature. For backward compatibility, a value of 0 will be treated as 1.
(cherry picked from commit 5628ca7f7cf2fdc053551d3f5e90ad466f3db2e6)
Fix crash triggered during Dragonspire Hall event caused by having more than 5 mobs near a rune.
Crash added in 7c19fb8d0eFix#26589
(cherry picked from commit e9a8cea018591334ce3807e2eb2fc2d6ce079252)
Change SMART_EVENT_OOC_LOS and SMART_EVENT_IC_LOS first parameter to have 3 values:
- 0 : Hostile
- 1 : Not hostile (not that Friendly and Not hostile have different meanings)
- 2 : Any, as in both Hostile and Not hostile
Close#24789
* Add validation on startup for allowed values.
Code cleanup.
* Fix errors
(cherry picked from commit 9e7cdb02d290e85f27e3e463922cd4cfac46129a)
* Core/Movement: Add new flag MOVEMENTGENERATOR_FLAG_PERSIST_ON_DEATH
Add new flag MOVEMENTGENERATOR_FLAG_PERSIST_ON_DEATH to keep movement generators even after death.
Fixes#23095
Could replace ff26027453179448bb972d88a51e565d71e95f3f
* Core/Movement: reorder new method MotionMaster::StopOnDeath
* Core/Movement: reorder new method MotionMaster::StopOnDeath
* Keep MoveJump movement generator after death
Co-authored-by: ccrs <[email protected]>
(cherry picked from commit 9fe9dc087b4dc52af7897942a83c1f880d3a4ef8)
Add ".list auras id <aura id>" and ".list auras name <name part>" subcommands to allow filtering the auras
(cherry picked from commit 9aff21b3d520cdd580f065f2965442af1bebc81c)
Restore ".character level" command behavior by setting the level instead of adding the level
(cherry picked from commit 2cea7d000c2205ed06ca3263e61dee51b11a5b0b)
* CI/CircleCI: Push docker images to DockerHub
Push docker image to DockerHub is DOCKERHUB_PUSH_IMAGES environmental variable is set to "TRUE".
* Build in Release only if pushing the images to dockerhub
* Move branch from repository name to tag name
* Update docker readme
Co-authored-by: Trond B. Krokli <[email protected]>
(cherry picked from commit 84ad438d15cffd7dca0e67d540cd41946b946bed)
* CMake: Add WITH_BOOST_STACKTRACE option to use libbacktrace
* Allow to specify where backtrace.h header is with cmake option -DBOOST_STACKTRACE_BACKTRACE_INCLUDE_FILE="/usr/lib/gcc/x86_64-linux-gnu/10/include/backtrace.h"
Co-authored-by: Trond B. Krokli <[email protected]>
(cherry picked from commit dc78b5a6a7410092df7ac426fbb2f2551072c889)
Use a fixed offset 0.5f instead of full collision height when retrieving floor Z as a full collision height ended up on the floor above a few times. It makes more sense to cast the ray just a bit higher up than using a full collision height (which by default is 2.0f)
(cherry picked from commit f96aab2186d17ddd286fa42913f3f14e9562c4eb)
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 dc21ac342ec3293ecf37b6a87244c46a39ff687f)
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 d5fc86af8b22fed5b054e51349eb3ab47b06b784)
* 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 7d6f7e4d19b298632deeb27830b876b12c490a03)
* 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 a22bc236ebc038c723774e5b38cd93e814ccc43d)
* 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 fc1a0d936888395f114028af3337e7d674e0a43c)
* 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 96b289cadbf304e427ddbd281d1a6f592af612a7)
A more generic solution might be better, maybe depending on spell flags
Ref #25652
(cherry picked from commit 0ad1854d1c6a3b6ff93e71272c919f1f5f11d5ed)
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 0c69316714d0558e32462f5401197fe1e803ae75)
Move fall damage log to "entities.player.falldamage" category and include the usual debug info
(cherry picked from commit 5270ff58daf31ce10919d9da53e09f494956a5f2)
* CI/GitHub: Switch to GCC 8
Build on GitHub Actions using GCC 8 as it's the oldest supported GCC
* Core/Misc: Attempt to fix GCC 8 build
(cherry picked from commit d7459cccedc7ca9ba85e209dfeef61969fc78d9a)
The displayed "tileloc" value is a "swapped" Tile XY, not to be confused with Grid XY.
(cherry picked from commit 34af088c9b381db5b5212075f0df486a8593fae3)
* Core/SAI: Add orientation and delay columns to waypoints table
* Rename 2020_99_99_99_world.sql to 2020_09_19_00_world.sql
(cherry picked from commit 4b7d19c91bde2cabb8498809dee935c7efb2660a)
* Core/SAI: Fix SMART_ACTION_WP_PAUSE with 0 delay pausing the path only for 1 world loop update
* Add code comments
* Remove special handling of SMART_ACTION_WP_PAUSE in SMART_EVENT_WAYPOINT_REACHED
(cherry picked from commit 7dd51ae6d98cf6dd8ac71412aa689f888c7bf369)
* Script/Commands: Add ".pdump copy" command
Syntax: .pdump copy $playerNameOrGUID $account [$newname] [$newguid]
Copy character with name/guid $playerNameOrGUID into character list of $account with $newname, with first free or $newguid guid.
* Add missing return
* Restore eof check
* Fix sql
* Use forward declaration header
Co-authored-by: Shauren <[email protected]>
* Remove buffer when reading a line
* Rename sql files
Co-authored-by: Shauren <[email protected]>
(cherry picked from commit 6215da0d640bd86a7c2bc144859c1542f09fc1a6)
* Core/Maps: Always update the grid of player summons even if far away
* Code cleanup
* Use a vector instead of unordered_set
(cherry picked from commit c68faf108edf50ae8a2ff4a341eff1e0d4269cbc)
Remove multiple calls to SMART_EVENT_WAYPOINT_START for the 1st waypoint.
Closes#24760
(cherry picked from commit b3694bf47bfdab8ee9c074ac4a22d8f389e1cfc1)
* Core/Unit: Fix units on vehicles not dismounting on death
Closes#23095
Issue added in 982643cd96790ffc54e7a3e507469649f3b074d2
* Remove leftovers from previous tries
(cherry picked from commit ff26027453179448bb972d88a51e565d71e95f3f)
There might be cases where this should be allowed (i.e. if the SMART_TARGET_* is another object) but for now we'll just never allow it.
(cherry picked from commit 28921f191de2269dd90b50ac99dd0d29ba90d0c4)
Change NearestGameObjectEntryInObjectRangeCheck to allow returning GameObject not spawned.
Fixes other occurrences where a similar issue exists.
(cherry picked from commit ca2159bf405fb96a8eba9f1e58bda7ee6c7eb247)
* Core/SAI: Implement SMART_TARGET_ACTION_INVOKER in SMART_EVENT_FRIENDLY_HEALTH_PCT
* Require radius (5th parameter) to be set
(cherry picked from commit cbed1039c47f0e3487cea555bb8552a4e6445f5a)
Fix RandomMovementGenerator for swimming creatures not moving at all due to PATHFIND_FARFROMPOLY being handled as wrong path.
Fixes#25236
(cherry picked from commit 1aceb413495c18e5840112d6ada0c4c71cc03c7b)
* Core/Pet: Attempt to fix an assertion triggered when re-summoning the current pet
* Core/Pet: Attempt to fix an assertion triggered when stabling a pet while in a vehicle
* Core/Pet: Attempt to fix an assertion triggered when stabling a pet and casting spell 6962
* Core/Pet: Attempt to fix an assertion triggered when casting spell 6962 while being dead
* Core/Pet: Attempt to fix an assertion triggered when summoning a pet while on vehicle 34775
* Handle cases in a generic way
* Code cleanup
* Core/Pet: Attempt to fix an assertion triggered when summoning a pet while on vehicle 34775 with a new character
(cherry picked from commit e203ecda88a327c4e93588f39cc4ffdcf99b30f7)
* Core/SAI: Spell casts that cannot be executed because the unit is currently casting another spell will be retried asap with priority over other events
* Core/SAI: Re-sort the events only when needed
* Fix some priority reset and wrong mEventSortingRequired handling
* Code cleanup.
Sort only events loaded from db (not stored events, not timed action list).
* Code cleanup.
Raise priority of failed casts so they are retried before other spells
* Keep priority of the action fails and is rescheduled on next update
* Don't try recasting a spell in SMART_ACTION_CAST if there are multiple targets and at least 1 was successful
(cherry picked from commit ca25e8d0199730c0976ebc37317e9407aceccc34)
* Core/AI: Remove code that removed UNIT_DYNFLAG_LOOTABLE from possessed units
* Update PassiveAI.cpp
Restored logic that removes loot flag while being possessed
* Restored logic that removes loot flag while being possessed
(cherry picked from commit 298d7994850dfc777c56a7672042d78074b67f3d)
* Core/SAI: Fix creatures casting with flag SMARTCAST_COMBAT_MOVE not switching to melee when the school of the spell they are trying to cast gets silenced (and other cases of spell failure)
* Core/SAI: Retry casting after 500ms if a cast failed
Fixes#24914
(cherry picked from commit 63a6e1e0480df659e773a3df5e1acc2027ebcf15)