Commit Graph
100 Commits
Author SHA1 Message Date
Giacomo Pozzoni b82dc03cbf License: Restore long lost OpenSSL exception (#29250)
Restore long lost OpenSSL exception accidentally removed in 4559e99e0d and include it in the COPYING license file.
2023-08-19 15:55:46 +02:00
Giacomo Pozzoni 3bc9825b0d Revert "MMAP: Build ADT floor just like WMO floor below liquid (#27503)" (#28392)
This reverts commit 8a779268b601db28005a8348f3c21255718d4526.

(cherry picked from commit b69870630d816da60e75f40f0e8852c9d88591b9)
2023-01-12 22:55:16 +01:00
Giacomo Pozzoni c80d7696c3 Core/World: Include more details about MaxCoreStuckTime asserts (#28188)
* Core/World: Include more details about MaxCoreStuckTime asserts

Include more details about MaxCoreStuckTime asserts that might help find why FreezeDetector gets triggered with idle MapThreads

* Codestyle fix

(cherry picked from commit de4920de81a495ed8d6b04cf68f3912c74921f48)
2022-09-29 22:00:08 +02:00
jackpoz 3bedbf6596 Core/PacketIO: Continue processing packets even if player is not in world
(cherry picked from commit aee4f0350ea5610b663cb07fb097f2fad256809e)
2022-06-10 16:58:19 +02:00
jackpoz ce4916ec79 Core/Metric: Sync default Metric.Interval value
Sync default Metric.Interval value in C++ with the value in worldserver.conf

(cherry picked from commit c83d00a645a310c48abd454b68402d366773c4d1)
2022-06-10 16:57:35 +02:00
jackpoz 7d9483cfe4 Core/Metric: Send metrics in smaller intervals
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)
2022-06-10 16:22:24 +02:00
Giacomo Pozzoni 8c25abca72 Core/AI: Fix crashes caused by charmed Creatures having null AI for 1 map update tick (#27434)
Implement using ScheduledChangeAI instead of nullptr to signal a required AI change

(cherry picked from commit 19e99db821ba5975e88ec160df3f4ff78ed562b0)
2022-03-24 22:35:05 +01:00
jackpoz ccf8cf3bbf Core/SAI: Fix error message
Fix the error message about valid range values for SMART_ACTION_ACTIVATE_GAMEOBJECT

(cherry picked from commit 5b9acbded12c6f68acd514642e1c940404c4b312)
2022-03-22 00:16:03 +01:00
Giacomo Pozzoni 791b759332 Core/SAI: Add SMART_ACTION_ACTIVATE_GAMEOBJECT action (#27216)
Closes #27196

(cherry picked from commit 0817be8f76dead48e2c0eeb7d5a7434a452f0dcf)
2022-03-21 22:59:21 +01:00
Giacomo Pozzoni 64a91288d6 Scripts/Commands: account onlinelist (#27004)
* 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)
2022-03-19 23:04:42 +01:00
Giacomo Pozzoni a4b1cda2c0 Script/Commands: Allow to specify the target player in .additem command (#26997)
* 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)
2022-03-19 23:00:41 +01:00
Giacomo Pozzoni 318e0e2406 Handle deprecated SAI actions and events (#26846)
* 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)
2022-03-14 00:09:26 +01:00
Giacomo Pozzoni a19c71a770 Core/SAI: Change error to warning for unused parameters (#26848)
Change error to warning for unused parameters and load the scripts instead of skipping them

(cherry picked from commit cb764a932d640698ed7cd92dd1e02d08243a8ad3)
2022-03-13 23:43:28 +01:00
Giacomo Pozzoni b7addbafe8 Core/DB: Improve MySQL version check messages (#26866)
* 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)
2022-03-13 22:37:07 +01:00
jackpoz 015b4e4578 Scripts/Commands: Fix ".wp show info" showing wrong event chance values
(cherry picked from commit b64ef1a39adfc37380aba59de506eb394e9c664d)
2022-03-13 19:31:14 +01:00
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