Commit Graph
100 Commits
Author SHA1 Message Date
Giacomo Pozzoni 71c2f0af46 Core/AI: Add DamageEffectType and SpellInfo parameters to UnitAI::DamageTaken (#26787)
* Core/AI: Add DamageEffectType and SpellInfo parameters to UnitAI::DamageTaken

* Update scripts

(cherry picked from commit 0800ab20a8039620fd271a43c173c008af68c22a)
2022-03-12 14:45:04 +01:00
jackpoz aaa7596e01 Core/Misc: Fix build on systems where size_t is not defined as uintXX_t, i.e. Mac
(cherry picked from commit 8fcf59f9db929e94b1a6d2c75c1905f0a51dcddd)
2022-03-12 00:25:49 +01:00
jackpoz 84d327617a Core/SOAP: Fix memory leak on shutdown reported by ASan
(cherry picked from commit de4ccc7f2785f61ea1f6eb514d948b73a8ddfb98)
2022-03-11 21:20:26 +01:00
jackpoz 4f14cef5f3 Core/SOAP: Fix new/free mismatch reported by ASan
(cherry picked from commit 2a12e96d1739a12c5ecfe375eabf5343557cb592)
2022-03-11 21:20:17 +01:00
Giacomo Pozzoni 5afa32e9a7 Core/Network: Add option to allow/disallow saving IP addresses to database (#26723)
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)
2022-03-11 20:50:36 +01:00
jackpoz b420ef8ea9 Core/Misc: Fix static analysis issues
(cherry picked from commit f127f959179a69ec335c5031417e7b366e685373)
2022-03-11 19:33:13 +01:00
Giacomo Pozzoni 51f0294c18 Core/DBLayer: Add QueueSize() method (#26733)
* 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)
2022-03-11 19:32:22 +01:00
jackpoz 98e4bc2d3d Core/Unit: Add more logs for #26325
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)
2022-03-11 19:09:40 +01:00
jackpoz fc3e26fdfe Core/SAI: Temporarily allow SMART_ACTION_WP_START to specify parameter value 3 for reactState
(cherry picked from commit 60379cf2c15d9cee1414fbaec2b217b89b8dc67e)
2022-03-11 19:03:36 +01:00
jackpoz c2b8c13a98 Scripts/Commands: Fix ".server debug" crashing in some special conditions
(cherry picked from commit 5094363a9432966b00b9fa79c0a353746cd24378)
2022-03-11 18:37:13 +01:00
Giacomo Pozzoni 6fd7cd9dc9 Core/Pet: Don't allow to tame pets that have already a owner (#26674)
(cherry picked from commit 8c42b3bd88fe7bd3e959664312e818e25996873a)
2022-03-11 18:37:02 +01:00
Giacomo Pozzoni c9e685bd9a Core/SAI: Warn when an unused parameter is set in the database (#26628)
* 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)
2022-03-11 18:35:58 +01:00
jackpoz 779053ab90 Core/Unit: Include m_Controlled in crashlogs
(cherry picked from commit 40f4b141bd602d6285c3d2d21315a29b2ab3cce1)
2022-03-11 15:23:48 +01:00
Giacomo Pozzoni 9c3dc31a37 Core/Pools: Fix pools with 1 member never spawning anything anymore (#26620)
* 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)
2022-03-11 13:39:15 +01:00
Giacomo Pozzoni 8b1be7bbfc CI/CircleCI: Force ccache directory (#26625)
(cherry picked from commit 6c5b641dd44a8d174d9bb8da36200e81b16f9ae8)
2022-03-11 13:31:18 +01:00
Giacomo Pozzoni a85e77b47a Core/SAI: Add a warning when a boolean value is outside of [0,1] range (#26608)
* 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)
2022-03-11 13:30:59 +01:00
jackpoz c7bf84e8ae SQL: Update auth_database.sql with latest updates
(cherry picked from commit 13f1a9f117a1d2b16103079d07dc1bce39240312)
2022-03-11 12:14:24 +01:00
Giacomo Pozzoni 2bc1bbd91d Common/Misc: Replace old macros with modern C++ attributes (#26613)
(cherry picked from commit 5ae2a0f47d323fadcfebf44c7b6ec11a3f91c75a)
2022-03-11 11:48:31 +01:00
jackpoz d0fe16b787 Core/Misc: Fix issues reported by static analysis
(cherry picked from commit 33dace231c5a169375523ffa89a2cc3fa48737bd)
2022-03-11 11:48:18 +01:00
jackpoz 92609b4e34 DB/Creature: Convert 27353 to spawn summons with 1 action instead of 30 linked actions
Thanks @Jinnai for the sql update.
Close #26605

(cherry picked from commit a7fa9f28db87403ce2c19d86364bfe93b6c96aa4)
2022-03-11 10:44:43 +01:00
jackpoz 40416d62f3 Core/SAI: Allow SMART_ACTION_SUMMON_CREATURE to summon more than 1 creature
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)
2022-03-11 10:43:08 +01:00
jackpoz cc38710adb Core/Misc: Fix issues reported by static analysis
(cherry picked from commit 32fd44d2aa6b1386922df07bc4b803e2d0aeaba1)
2022-03-11 01:52:04 +01:00
jackpoz e8ea10a6a2 Scripts/Misc: Fix issues reported by static analysis
(cherry picked from commit 4b9465e1f91adbc139afe5f86ac84eb5f14b62b4)
2022-03-11 01:50:09 +01:00
Giacomo Pozzoni 9d4c57074f Core/Loot: Allow master looter to see all quest items (#26584)
(cherry picked from commit 8d92f6f2b483dffa7127614de3c41f3f596743fb)
2022-03-11 01:49:51 +01:00
jackpoz f0d8df8909 Scripts/UBRS: Fix crash
Fix crash triggered during Dragonspire Hall event caused by having more than 5 mobs near a rune.
Crash added in 7c19fb8d0e
Fix #26589

(cherry picked from commit e9a8cea018591334ce3807e2eb2fc2d6ce079252)
2022-03-11 01:48:32 +01:00
Giacomo Pozzoni 76c470fb32 Core/SAI: Add support to friendly+hostile to SMART_EVENT_OOC_LOS and SMART_EVENT_IC_LOS (#26579)
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)
2022-03-11 01:04:48 +01:00
jackpoz 67541c58ba Core/SAI: Fix typo
(cherry picked from commit 483f24c5ed8238a9b3a1747f49191b7ba6f3c90e)
2022-03-10 23:57:14 +01:00
Giacomo Pozzoni 8111f50d03 Core/Movement: Add new flag MOVEMENTGENERATOR_FLAG_PERSIST_ON_DEATH (#26549)
* 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)
2022-03-10 23:57:14 +01:00
jackpoz 89ea13ed46 Core/Player: Log more information when Player::StopCastingCharm() fails
(cherry picked from commit af815e991d3dc407846fcd05000b4e356d7336ed)
2022-03-10 23:57:13 +01:00
jackpoz 9a17ac108c Scripts/Commands: Fix crashes with ".group revive" and ".group repair"
Close #26575

(cherry picked from commit 105c70802ded53b49621a92ee8fa136e57d0c717)
2022-03-10 23:54:25 +01:00
Giacomo Pozzoni 83ca66cd40 CI/CircleCI: Switch to Ubuntu 21.04 (#26476)
(cherry picked from commit 5991dcb12b638a0ef483fddeeda3e5744012dda6)
2022-03-09 12:22:32 +01:00
Giacomo Pozzoni 8d7e152d28 Scripts/Commands: Add ".list auras id <aura id>" and ".list auras name <name part>" subcommands (#26346)
Add ".list auras id <aura id>" and ".list auras name <name part>" subcommands to allow filtering the auras

(cherry picked from commit 9aff21b3d520cdd580f065f2965442af1bebc81c)
2022-03-07 22:46:00 +01:00
jackpoz 1039f166de Scripts/Commands: Restore ".character level" command behavior
Restore ".character level" command behavior by setting the level instead of adding the level

(cherry picked from commit 2cea7d000c2205ed06ca3263e61dee51b11a5b0b)
2022-03-07 22:25:50 +01:00
Giacomo Pozzoni 72bb73b246 Push docker images to DockerHub (#26177)
* 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)
2022-03-06 23:59:14 +01:00
jackpoz c6c0baa25c Scripts/Ulduar: Apply renames of #25529
Apply renames of #25529 to review that PR easier

(cherry picked from commit 7635f3f948b8cdc0c9992f741cb163f204749c59)
2022-03-06 23:08:53 +01:00
Giacomo Pozzoni e0ad19dc96 CMake: Add WITH_BOOST_STACKTRACE option to use libbacktrace (#26119)
* 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)
2022-03-06 22:24:18 +01:00
Giacomo Pozzoni 9bcff210f9 Core/Maps: Use a fixed offset instead of full collision height when retrieving floor Z (#26092)
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)
2022-03-06 22:24:01 +01:00
jackpoz c93d6856c7 Core/Unit: Fix crash when exiting a vehicle
Ref #25649

(cherry picked from commit b84b92506354fc37017cb687aac263218265cf06)
2022-03-06 20:01:38 +01:00
jackpoz 730a8da9e9 Core/Unit: Set stand state on damage only to players
(cherry picked from commit 4cc1f850670b868a1d16833a2cf5c60715f749ef)
2022-03-06 20:01:25 +01:00
jackpoz 4b91670ed6 CI/CircleCI: Show at the end of the build ccache stats of current build
(cherry picked from commit 0dee695f3bf1e7eea8082f84e1c552c03a137dab)
2022-03-06 19:39:34 +01:00
jackpoz 3886c82d0f Scripts/EoE: Attempt to fix players getting stuck after dying
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)
2022-03-06 19:00:26 +01:00
Giacomo Pozzoni a4a3e2e759 Core/Creature: Allow to skip Rate.Corpse.Decay.Looted when calling SetCorpseDelay() (#25989)
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)
2022-03-06 18:59:38 +01:00
Giacomo Pozzoni 1ec33095e6 Core/Warden: Send Lua checks only when ingame (#25977)
(cherry picked from commit 3e6b3f88b0169600e9e09281723d82476e08fae7)
2022-03-06 18:54:04 +01:00
Giacomo Pozzoni 4c30b2a182 Core/SAI: Add new action SMART_ACTION_SET_HEALTH_PCT (#25932)
* 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)
2022-03-06 01:43:57 +01:00
Giacomo Pozzoni a66b968f91 Core/Misc: Fix static analysis issues (#25924)
* Core/Misc: Fix static analysis issues

* Fix infinite loop in ".debug send opcode"
Fix using uninitialized memory in ".debug send opcode"

(cherry picked from commit 661f554b9e08a3721227f1e4a4fe6fd74e43a1f4)
2022-03-06 01:35:01 +01:00
jackpoz 4e3d23188e Scripts/Commands: Improve ".debug objectcount"
Include the number of SetActive objects in ".debug objectcount" command

(cherry picked from commit d0231c5a8fdea9704be442cbd8840079caf47a6d)
2022-03-06 01:23:14 +01:00
Giacomo Pozzoni 5180abfb19 Core/Creature: Add new db field InteractionPauseTimer (#25880)
* 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)
2022-03-06 00:56:46 +01:00
Giacomo Pozzoni c2068bd423 CI/CircleCI: Expose binaries built on Circle CI as docker images in the Circle CI artifacts (#25832)
Co-authored-by: Shauren <[email protected]>
(cherry picked from commit 9af6bf15aa2fe836c3ebba306eaaa8971f00fac4)
2022-03-06 00:24:04 +01:00
Giacomo Pozzoni 6b242eee13 Core/Unit: Fix movement hiccups in water (#24020)
* 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)
2022-03-05 23:04:24 +01:00
jackpoz f32a7ed27d CI/Circle CI: Add codestyle check
Don't leave 2 blank lines, 1 is enough.

(cherry picked from commit ed975ef4c0e614addc069785f23c1b7f522f3b8e)
2022-03-05 21:13:38 +01:00
Giacomo Pozzoni da0d9ee283 Core/SAI: Fix SMART_EVENT_FLAG_NOT_REPEATABLE flag being ignored when specifying a chance (and other SMART_ACTION_CAST fixes) (#25778)
* 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)
2022-03-05 17:11:58 +01:00
jackpoz abbac041bf Scripts/ICC: Fix teleporter not removing players from Gunship
A more generic solution might be better, maybe depending on spell flags

Ref #25652

(cherry picked from commit 0ad1854d1c6a3b6ff93e71272c919f1f5f11d5ed)
2022-03-05 17:03:54 +01:00
Giacomo Pozzoni 30ebecc0de Core/Maps: Attempt to fix picking the wrong min height (#25771)
Close #25652

(cherry picked from commit aabd2b49e2710e00c39c4b4f22fef08aa029d4db)
2022-03-05 17:03:14 +01:00
jackpoz 90a05037cf Core/Maps: Partially revert 0c69316714d0558e32462f5401197fe1e803ae75
Revert define to constexpr as this also broke some calculations

(cherry picked from commit ed1c0b6ec9232cc638fa242ea839c4645bb4be07)
2022-03-05 17:03:02 +01:00
jackpoz bea8894bce Core/Maps: Partially revert 0c69316714d0558e32462f5401197fe1e803ae75
The development will continue in a PR

(cherry picked from commit 1e3d85e2839c5ee3170223f4d985eecd527c5533)
2022-03-05 17:02:38 +01:00
jackpoz 26962127a5 COre/Misc: Remove whitespace
(cherry picked from commit 01b1f20d3ea1f1dca3d614396634c85646b77ff8)
2022-03-05 17:02:30 +01:00
jackpoz c14f4dc835 Core/Maps: Use the same logic to calculate grid coords to avoid mismatches
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)
2022-03-05 17:02:19 +01:00
jackpoz 13bf0e71b9 Scripts/Commands: Include map min height in ".gps" command
(cherry picked from commit 9994459bd197d5555cfa16ab3d35d9c362a563fd)
2022-03-05 17:01:36 +01:00
jackpoz 362a1c32c2 Core/Movement: Add a debug log when a player falls below the map
(cherry picked from commit 1c08395e8acf0ecebcc3fcaf24201b2ad44ed2dd)
2022-03-05 00:56:56 +01:00
jackpoz 20e96eead4 Core/Player: Adjust fall damage log
Move fall damage log to "entities.player.falldamage" category and include the usual debug info

(cherry picked from commit 5270ff58daf31ce10919d9da53e09f494956a5f2)
2022-03-01 22:49:22 +01:00
Giacomo Pozzoni 2e70d6b45f CI/GitHub: Install GCC 8 (#26341)
(cherry picked from commit 39bd263c72757acb7facd27cc12b0230866a8f25)
2022-03-01 11:37:35 +01:00
jackpoz 1ba5e17c95 Core/AI: Fix CorpseRemoved() and SMART_EVENT_CORPSE_REMOVED not being called for creatures without m_respawnCompatibilityMode
Fixes #24958

(cherry picked from commit 28a1132211aaf8d43e3459a7dc8ee093df1bcfa0)
2022-02-28 23:14:37 +01:00
Giacomo Pozzoni b7a3124156 CI/GitHub: Switch to GCC 8 (#25610)
* 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)
2022-02-28 23:13:59 +01:00
Giacomo Pozzoni a7473f1a91 CI/CircleCI: Authenticate to DockerHub when pulling the docker image (#25581)
For more information see the following links:
- https://www.docker.com/blog/scaling-docker-to-serve-millions-more-developers-network-egress/
- https://docs.docker.com/docker-hub/download-rate-limit/
- https://circleci.com/docs/2.0/private-images/

Add DOCKERHUB_USERNAME and DOCKERHUB_PASSWORD secrets to CircleCI Environment Variables. DOCKERHUB_PASSWORD can be either the password or an access token.

(cherry picked from commit e3da1ed2455676cfe31757cbd816d92ee1d93a3c)
2022-02-28 21:47:38 +01:00
jackpoz eb17e94b2e Core/SAI: Fix SMART_ACTION_WP_RESUME actually pausing next waypoint if the current path was not paused
Fixes #25519

(cherry picked from commit 5be7c2ad4f7cd561951e1285227211e03886703f)
2022-02-28 14:42:53 +01:00
jackpoz b059f2f8ee Core/SAI: Allow to debug SmartAI methods
(cherry picked from commit 59bb822f78291c3b0d7b5811478637729569e07d)
2022-02-28 14:42:40 +01:00
jackpoz e7fc68d74b Core/Commands: Enable .debug loadcells on console and allow to load a specific tile
Specify the tile as XY. Note that this is not Grid XY

(cherry picked from commit 6f6cec89e598a046e73d48df14be26b053875470)
2022-02-28 12:18:19 +01:00
jackpoz f3787c6559 Core/Commands: Fix typo in .mmap loc command
The displayed "tileloc" value is a "swapped" Tile XY, not to be confused with Grid XY.

(cherry picked from commit 34af088c9b381db5b5212075f0df486a8593fae3)
2022-02-28 12:09:19 +01:00
jackpoz df94ce0f68 Core/Creature: Ignore combat reach when looking for assisting creatures
Fixes #25487

(cherry picked from commit 24018b7a74ec8e68e43895e0e57f6397f59ea890)
2022-02-27 23:26:54 +01:00
jackpoz 2bd7d00e56 Core/Pet: Fix GetDebugInfo() output
(cherry picked from commit 16292f9d94ebbc69ccfff547cb14f78d4deb4423)
2022-02-27 23:15:47 +01:00
Giacomo Pozzoni bfdabb8c37 Core/Quest: Fix wrong feedback sent to the quest sharing sender with auto-accept quests. (PR #25477) Closes #25474.
Co-authored-by: Treeston <[email protected]>
(cherry picked from commit e2d643f5518d256e17851243896985b2773db281)
2022-02-27 23:03:06 +01:00
jackpoz 7a2c3af988 CI/AppVeyor: Add artifact without symbols for smaller download size
(cherry picked from commit a724903b8b307516780474dd23977d2a9b502eb5)
2022-02-27 20:08:41 +01:00
Giacomo Pozzoni a65b3493a7 Core/SAI: Add orientation and delay columns to waypoints table (#25472)
* 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)
2022-02-27 20:08:41 +01:00
Giacomo Pozzoni 60519e947f Core/SAI: Fix SMART_ACTION_WP_PAUSE with 0 delay pausing the path only for 1 world loop update (#25471)
* 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)
2022-02-27 20:08:41 +01:00
jackpoz d06c93185a Core/Loot: Raise max number of loot items from 16 to 18
Fixes #23948

(cherry picked from commit 5491cb51a25b6e3c465e97b3c57ba67a8ea0bcce)
2022-02-27 20:08:41 +01:00
Giacomo Pozzoni d02ee9de37 Script/Commands: Add ".pdump copy" command (#25455)
* 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)
2022-02-27 00:28:25 +01:00
Giacomo Pozzoni 6734a70aa8 Core/Warden: Attempt to fix random ingame Lua errors with Warden enabled
(cherry picked from commit cd1858b04010fe790f9db45f629a8e81e367b7a4)
2022-02-06 00:18:17 +01:00
jackpoz 8cbc21120f Core/Characters: Replace 2 database statements with 1
Replace DELETE + INSERT with REPLACE when updating realmcharacters table

(cherry picked from commit a33ff74d92bde847b051da9fe483676fa1228c5b)
2022-02-06 00:15:31 +01:00
jackpoz a439dab179 Core/PlayerDump: Update realmcharacters table when importing a character with ".pdump load"
Fixes #24517

(cherry picked from commit 69831d2a97baf98caa82d2689e6d323af35931fe)
2022-02-06 00:15:08 +01:00
jackpoz d1bea3e8b3 Core/LFG: Handle vote kick as failed if there cannot be 3 votes agreeing
i.e: 4 players, vote kick starts, 1 rejects, vote is considered as failed.

(cherry picked from commit f0f0de01fad0bc7bdfda215ec1a0f5b58d4a0ebf)
2022-02-06 00:05:38 +01:00
jackpoz 0441f3ea5e Core/LFG: Restore ".lfg queue" command argument handling
(cherry picked from commit a46c835ed1b498d4670c149a9f3ca31ea44eb35f)
2022-02-05 22:59:46 +01:00
Giacomo Pozzoni 7bb03fab51 CI/CircleCI: Attempt using cache from master in PRs
(cherry picked from commit 6ed1810abcf212b2cf04e5c6325e185ec4f3c05a)
2022-02-05 22:28:03 +01:00
Giacomo Pozzoni ca498ffab2 Core/Maps: Always update the grid of player summons even if far away (#25406)
* 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)
2022-02-05 13:46:49 +01:00
jackpoz 2942d06664 Core/PathFinding: Enable pathfinding (MMaps) by default
(cherry picked from commit 5498f3be96ecf09c35622c3ba5e9abb8c8b96e13)
2022-02-05 13:43:16 +01:00
jackpoz c2d2df96db Core/SAI: Fix SMART_EVENT_WAYPOINT_START not being called at every waypoint checking wrong path id parameter
Remove multiple calls to SMART_EVENT_WAYPOINT_START for the 1st waypoint.
Closes #24760

(cherry picked from commit b3694bf47bfdab8ee9c074ac4a22d8f389e1cfc1)
2022-02-05 13:31:00 +01:00
Giacomo Pozzoni b45277f1cf Core/Unit: Fix units on vehicles not dismounting on death (#25404)
* 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)
2022-02-05 13:08:34 +01:00
jackpoz 341ef2c0dd Core/Arena: Fix Arena.ArenaStartPersonalRating setting not having effect if the player didn't do any arena match before next server restart
Ref #16609

(cherry picked from commit cc64762f068749bbee0ef96580614f5a8cdfc867)
2022-02-05 13:08:08 +01:00
jackpoz ae6f8bc4f5 Core/SAI: Do not allow SMART_EVENT_RESET to call SMART_ACTION_CALL_SCRIPT_RESET
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)
2022-02-05 12:08:58 +01:00
jackpoz d561a69122 Scripts/Obsidian Sanctum: Fix portals not being visible
Change NearestGameObjectEntryInObjectRangeCheck to allow returning GameObject not spawned.
Fixes other occurrences where a similar issue exists.

(cherry picked from commit ca2159bf405fb96a8eba9f1e58bda7ee6c7eb247)
2022-02-05 12:04:35 +01:00
Giacomo Pozzoni 4dff5bd09b Core/SAI: Reduce the chance of infinite loops/stack overflows (#25398)
Fixes #24092

(cherry picked from commit a58aeb41f466fd916cdc12e805f7a8130c8ccdf5)
2022-02-05 11:51:54 +01:00
Giacomo Pozzoni c66bcc4c0e Core/Spell: Fix name clashing between local variables and class member fields (#25352)
(cherry picked from commit 8a48ece5732a47fc36fadc63d0620072ef47f8fe)
2022-02-04 13:00:08 +01:00
jackpoz 4051ccd1bd Core/AHBot: Warn about different AHBot behavior when AllowTwoSide.Interaction.Auction is enabled
Closes #18243

(cherry picked from commit 92f9abab0607609ff7e6b7434bab66cc809084ca)
2022-02-04 12:19:15 +01:00
Giacomo Pozzoni 99ee958e0a Core/Misc: Fix issues reported by static analysis (#25351)
* Core/Misc: Fix issues reported by static analysis

* Core/Vmaps: Code cleanup after e777161888

(cherry picked from commit cfc8f7b442a9dba07b198fcebe2c02ab89cf0a8b)
2022-02-04 12:18:15 +01:00
Giacomo Pozzoni 902ed74c2a Core/SAI: Implement SMART_TARGET_ACTION_INVOKER in SMART_EVENT_FRIENDLY_HEALTH_PCT (#25318)
* 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)
2022-02-04 00:27:13 +01:00
jackpoz 1f34964df4 Core/Movement: Fix RandomMovementGenerator for swimming creatures
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)
2022-02-04 00:27:12 +01:00
jackpoz 0150828841 DB/Misc: Add new view vw_conditions_with_labels that shows labels instead of numbers from conditions table
(cherry picked from commit 7cdc4b46bb6ce63ae3830fb1f8e0464093e1a015)
2022-02-04 00:27:12 +01:00
jackpoz 27405870e0 DB/Misc: Add new view vw_disables_with_labels that shows labels instead of numbers from disables table
(cherry picked from commit 6d295629cf01cc23e9c6c521c767a4fa6fd0eb41)
2022-02-04 00:27:12 +01:00
jackpoz 1f2c48f8bb Core/SAI: Remove completed timed action lists even while evading
Fixes #25294

(cherry picked from commit 03eb0886a8b0e192d3c299d72ef223d30495c534)
2022-02-04 00:27:12 +01:00
Giacomo Pozzoni f8b6137a4c Build/GCC: Raise required version to 8.3.0 (#25297)
Even when building with Clang, make sure to have libstdc++ >= 8

(cherry picked from commit 41d70a5905c152d26217cc152a1748c337cfd81e)
2022-02-04 00:27:11 +01:00
Giacomo Pozzoni a4ee8855c0 CI/GitHub: Build on GCC (#25288)
* CI/GitHub: Build on GCC

* Mark warnings as errors

(cherry picked from commit f4dc3cbd65f42f9f144c6718d717ac003fa2edc9)
2022-02-04 00:27:11 +01:00