Send metrics in smaller intervals to reduce the chances of triggering HTTP status "413 Payload Too Large" from InfluxDB.
Another way to avoid this is to set max-body-size to 0 in InfluxDB config.
For more information see https://docs.influxdata.com/influxdb/v1.8/administration/config/#max-body-size--25000000
(cherry picked from commit 055dffaa7129b22f37d9afec4ab68e03a4f8a71f)
Implement using ScheduledChangeAI instead of nullptr to signal a required AI change
(cherry picked from commit 19e99db821ba5975e88ec160df3f4ff78ed562b0)
Fix the error message about valid range values for SMART_ACTION_ACTIVATE_GAMEOBJECT
(cherry picked from commit 5b9acbded12c6f68acd514642e1c940404c4b312)
* Script/Commands: Remove sync db queries from ".account onlinelist"
* Add additional "account onlinelist" commands
- "account onlinelist ip" to filter by ip address
- "account onlinelist limit" to limit the output rows
- "account onlinelist map" to filter by map id
- "account onlinelist zone" to filter by zone id
* Update src/server/scripts/Commands/cs_account.cpp
(cherry picked from commit e3591b25a55d1d4dc642a5a35f851b19586a0110)
* Script/Commands: Allow to specify the target player in .additem command
New syntax: .additem <required item id> <optional item count> <optional player name>
Close#25875
* Move target player to new command ".additem to <player> <item> <count>"
(cherry picked from commit bebf1876ab506851a56e1619444e57d0f0b4b128)
* Core/SAI: Show a clear error for no longer supported SAI actions
* Core/SAI: Show a warning for deprecated SAI events, still loading them.
Disable log "sql.sql.deprecation" in config if you want to ignore the warning
(cherry picked from commit 3af4d17188dc0b7cb84ccd50bb9bb9d6cb193e00)
Change error to warning for unused parameters and load the scripts instead of skipping them
(cherry picked from commit cb764a932d640698ed7cd92dd1e02d08243a8ad3)
* Core/DB: Improve MySQL version check messages
* Make it more clear that any version above the required one is supported
* Implement feedback
(cherry picked from commit d9a0db79a8f74254afa31bbc26ab506fa00203c1)
Add config option AllowLoggingIPAddressesInDatabase to authserver and worldserver to specify if IP addresses can be logged or not to the database
(cherry picked from commit 68bf7e6d12e1689d688db32c05066b8832922c67)
* Core/DBLayer: Add QueueSize() method
Add QueueSize() method to database objects (Login, Character and World) that returns how many tasks are queued.
Include the queue size of the 3 databases in ".server debug" command
* Make the code less threadsafe
* Send data to InfluxDB
* Update grafana dashboard
(cherry picked from commit 96dc110f4a353871ac74c82ff4b1bcc4c34156f3)
Add more logs to try spotting the cause of #26325 . It might be that a minion is added to a owner that is not in world.
Report any issue with minions/pets that contain the log.
(cherry picked from commit 3f08c16749984252e657d46cfaa1ef50cd3f5a15)
* Core/SAI: Warn when an unused parameter is set in the database
* Warn when an unused parameter is set in the database as all unused parameters are supposed to be set to 0.
* Remove unused struct from union.
* Add a new struct simpleTalk for SMART_ACTION_SIMPLE_TALK instead of reusing only some fields of struct talk from SMART_ACTION_TALK
* Add addAura and flag structs to be used instead of generic ones to match the parameters used by actions
* Add randRangeTimedActionList struct to be used instead of generic ones to match the parameters used by actions.
* Remove unused action structs.
(cherry picked from commit aa7279df095d086f7223a1fa13d11a0e58f1cf10)
* 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)