* Shared/Metric: Allow to specify tags in metrics
* Core/Metric: Log number of Creatures and GameObject per map
* Apply feedback
* Codestyle changes
* Codestyle changes
* Remove whitespace
* Update Grafana dashboards to v7.0.3
* Fix missing filter on realm
* Include Creatures and Gameobjects in Maps dashboard
* Show instances with a different color
(cherry picked from commit 4e1dbd1cf808c9cf1f310b6d498f7e304dfb4147)
Add .debug objectcount <optional map id> chat command to show the number of Creatures and GameObjects
(cherry picked from commit cd37a17103b88a56ec1fde2156c4325b74989e08)
* Tools/MMAPs: Show an error when running mmaps_generator built in Debug mode
* Fix GCC build
(cherry picked from commit 8c80f28581646af110c4d2b316209ef291a95587)
Reduce chances of breaking tile connections caused by floating point rounding issues.
(cherry picked from commit e615e2ddefd2c18b6dec8e08fb3d17580b64ea99)
* Build/Misc: Add a few *San CMake flags
Add the following flags for the related tools:
- MSAN for Memory Sanitizer
- UBSAN for Undefined Behavior Sanitizer
- TSAN for Thread Sanitizer
* Remove unused parameter
* Fix UBSan reported issue
* Disable G3D buffer pools when using Thread Sanitizer as it has its custom locking mechanisms
* Code cleanup
* Move threads from maps to tiles
* Move tile building logic to TileBuilder class
* Fix memory leak in TileBuilder
* Fix build
* Store TileBuilder as raw pointer for now, it will be changed later on to use modern C++ constructs
* Fix crash on shutdown
* Revert pvs-studio change
* Fix generating 1 single tile not closing the program
(cherry picked from commit a4e93d779c9638bc0a61cb4405ef28cb935d1065)
Re-generating MMAPs IS required.
Partially reverts 995a443da219ec773febd7dd29d18f3cefaa1f3b .
Having 2 different slope angles of 55° and 85° created too many polygons to fit in the current mmtile structure. This caused some polygons to become disconnected from each other, creating the old "invisible walls" effect. Because of this and because of the performance hit when loading a mmtile caused by the increase of polygon numbers, this commit reverts the recent changes and sets by default the slope angle to 55°.
Feel free to restore the previous behaviour by running .\mmaps_generator --maxAngle 85 --maxAngleNotSteep 55 , specifying the map id as number if a single map should have different slope values.
This is the last commit that will change MMAPs version to force re-generating them. Any future change that will affect only the generation settings will be optional (but recommended).
(cherry picked from commit 3947e4cb57d4c6adb78cd3cb52718bb88add91fc)
* Some research about mmaps load performances
* Tools/MMapsGenerator: Add some more input parameters
Add some more input parameters which affect the resulting mmaps:
- --smallOutputSize: sets both walkableSlopeAngle and walkableSlopeAngleNotSteep to 55°, reducing by a lot the .mmtile size and the number of polys. A rcFilterLedgeSpans() call is included too to filter out some polys. Default to false.
- --maxAngle: Restore this parameter removed some commits ago. Specifies the max walkable angle of a Creature when in combat. Default to 85
- --maxAngleNotSteep: Max walkable angle of a Player and of a Creature out of combat. Must be less or equal than --maxAngle. Default to 55.
A performance profiling comparison highlighted that .mmtile load grows exponential with the number of polys. A small server with GridUnload enabled and without preloading all grids on startup will be more affected than a big server with GridUnload disabled and preloading grids on startup.
(cherry picked from commit b6e205f7ef32f7b82644043d82a808e67cc9acb2)
* Tools/MMAPs: Remove input argument --maxAngle
Remove input argument --maxAngle . This should be just hardcoded in MapBuilder::GetMapSpecificConfig() so all settings are easily found in the same place instead of being spread around.
* Tools/MMAPs: Add new area type NAV_AREA_GROUND_STEEP
Add new area type NAV_AREA_GROUND_STEEP for ground with slope in the range (55, 70] .
NAV_AREA_GROUND is used for ground with range [0, 55] .
NAV_AREA_GROUND_STEEP takes priority over NAV_AREA_GROUND.
* Tools/MMAPs: Fix NAV_GROUND_STEEP flag not being saved in the mmtile
* Core/PathFinding: Implement NAV_GROUND_STEEP flag
Implement NAV_GROUND_STEEP flag, used only by Creatures that are in combat or evading.
* Distinguish between RC_WALKABLE_AREA and NAV_AREA_GROUND.
* Allow mobs in combat to walk on steeps up to 80°
* Allow mobs in combat to walk on steeps up to 85°.
Disable rcFilterLedgeSpans() filter as it removed long steep spans.
* Increase cost of steep spans to try making creatures walk around obstacles instead of walking on them
* Revert last commit
(cherry picked from commit 995a443da219ec773febd7dd29d18f3cefaa1f3b)
* Core/Auras: Attempt to fix infinite loop with aura 18950 on map unload
* Core/Auras: Log a detailed error and assert when failing to remove all auras after a few tries
* Code cleanup
* Fix build warnings
* Fix more build warnings
(cherry picked from commit bd2d60c2676a1d7e843a2a5673b8216bad0768c7)
* Core/MMAPs: Adjust walkable climb
Adjust walkable climb as recast using walkableClimb also to find the poly from a position, giving priority to polys that are below the position but closer than walkableClimb.
* Temporarily disable static collision (the whole check should be removed)
* Core/Spells: removed deprecated mmap path check for TARGET_DEST_CASTER_FRONT_LEAP
* Core/Objects: allow flying units to use the helper as well (flying units casting radius based spells)
* Code refactor
* Handle raycasts that end in a point with no height in the mmap mesh as PATHFIND_NOPATH
* Walk back a bit from raycast hitpoints as sometime the 2D result point is outside of the polygons due to floating point errors.
* Remove whitespace
* Revert 4a197ba22a as a raycast point path should have the Z retrieved with getPolyHeight(). Raycast will only return a 2-point path with Start and Hitpoint/End
* Cleanup PathGenerator raycast case
* Fix PathGenerator raycast broken if start and end are on same poly.
Fix PathGenerator raycast broken if no wall is hit.
Remove unused case of using raycast with an existing previous path (can be added back properly if needed).
Remove forcing poly length to 2 when we actually have already the right number.
* Use closestPointOnPolyBoundary on the second try of finding a point on poly for raycast.
Note that in this case the mesh height is not used which might cause issues. The poly boundary height will be used instead.
* Handle cases where getPolyHeight() fails because the point is on polygon border (and caused by floating point imprecision)
* Add far from poly flags
* Set PATHFIND_INCOMPLETE in raycast case if startFarFromPoly or endFarFromPoly
* Fix blink close to walls with no valid polygon behind the wall
* Require to re-extract mmaps
Co-authored-by: Ovah <[email protected]>
(cherry picked from commit c0b75bf40da8b447a2f3533dabbfad9eba7c6ea1)
* Core/Pooling: Remove respawn times from the database when despawning a pool
Remove respawn times from the database when despawning a pool. This is needed when a Game Event ends but there are still some respawn times saved in the database.
* Remove respawn time of active pool objects even if they are not spawned
(cherry picked from commit 4f33fd3932d362466ee017111895bf14fcc79c88)
* Core/SAI: Allow SMART_TARGET_ACTION_INVOKER to target GameObjects
* Include new Coalesce(..) template by @Shauren
(cherry picked from commit 90b00288c24dfefccb338bd33b025cf85e82076d)
ObjectGuid::GetCounter() should not be called in logs, use ObjectGuid::ToString().c_str() instead
(cherry picked from commit af1260c40e333e0d2d506128099f8263f5f2304f)
Don't start a spline with just 1 point in FlightPathMovementGenerator. This happens when teleporting to a BG while on a taxi after second last node but closer to last node.
In this case the Player will be teleported to the last node.
(cherry picked from commit ec495764918506193a51f00247adb432b1ba6646)
Improve log when starting a spline with invalid arguments, for example when starting a spline with just 1 point.
(cherry picked from commit 296f6aab402407a2798f3a300b256cc75d59fec4)
* Core/AI: Make critters flee as soon as engaged in combat and make them evade after they stop running in fear
* Warning and no-pch build fix
(cherry picked from commit 6fde051e4e52d98d1a6cf31b8ad3fcf95e0e83fd)
Add a new ABORT_MSG macro that allows to show a formatted message before stopping the executable
(cherry picked from commit 0ddee8a4a03fb5c7ee8d18144ca21cd2baad6f01)
Stop combat when a Player moves to a Sanctuary area only if there is any PvP combat (it would be nice to keep PvE combat but that's still an issue)
(cherry picked from commit c7974bdf909ceb34821fa3953ef4cb090282fcdf)
* Core/Objects: MovePositonToFirstCollision will now use detour raycasts to determine terrain obstacles
* Added missing includes
* Update Object.cpp
Co-authored-by: Giacomo Pozzoni <[email protected]>
(cherry picked from commit d1080af8db63c78986a7fcc94fcfb2fdfe817734)
Update Z coordinate of end position when casting a mmap raycast that doesn't hit the target
(cherry picked from commit 16ccc17621313e5c954f26ad23b15392fe06e763)
Make creatures evade when a charming expires and they cannot attack the charmer (i.e. charmer with .gm on)
(cherry picked from commit 69809d12031d055d8d0cffb5a187d9af09dd0efe)
* Core/AI: Allow creatures to evade
Revert changes that didn't allow creatures to evade anymore no matter how hard a script would try
* PArtially revert 163f44c1b08cc043b114585922bd08664434bf92
(cherry picked from commit 817ae5bca6db14c9b3db7d5268511525e0cb4105)
* Core/AI: Make charmed creatures follow their owner
* Follow the charmer only when applying the charm
* Make SmartAI follow the charmer
(cherry picked from commit ddf2f60c1317f0ce728d5894064f51251cf71c72)
Increase the agent height by x2 to reduce the chance of having underground mmap layers wrongly picked by recast.
(cherry picked from commit 3b0a89a2ea76157156c03262bc86f024a1d4ca57)
GenericMovementGenerator sets the _duration to the return value of spline.Launch(). For cyclic splines, this is the duration of 1 single cycle, while the spline itself never ends.
To support this edge case in GenericMovementGenerator we just never update the _duration timer for cyclic splines.
(cherry picked from commit 7a57029d8fd46c0966eb32b17019291785e61f37)
* Build: Enable and require c++17
* Build: Raise Visual Studio version from 2017 15.2 to 2017 15.9
* Build: Raise GCC version from 6.3.0 to 7.1.0
* Reduce branch differences
* Fix build after latest merge
* Cleanup after latest merge
(cherry picked from commit 726d5e91b55d4742dcbd6b0a82d84788dbb117b7)
Fix WaypointMovementGenerator ignoring EscortAI::SetEscortPaused() when talking to a NPC, scheduling a 3 minutes pause on the WaypointMovementGenerator even if it was already disabled with no timer, waiting for the player to select a gossip entry to resume the movement.
(cherry picked from commit a9e534762f2517a37d595cdfef527ab55b6339ba)
* Core/PathGenerator: Fix path generator returning shortcuts when start and end are on the same polygon
Second try of handling paths on same poly in a better way than just building a shortcut
* Fix movement generators using paths with start/end positions far from mmap polygons
* Include flag PATHFIND_FARFROMPOLY even with a normal path if start or end were far away from mmap poly
(cherry picked from commit 67d9d04d63cc74196059646b2e57f50a4a4fd2ca)
Temporarily revert 29bf280e3496cf13c24ccb20e37da29d3bfa74d9 since our recast implementation always expects a path to have different polygons.
A proper fix will be implemented later on, splitting a path with 1 single polygons in smaller steps in a similar way of how FindSmoothPath() works
(cherry picked from commit 9f8477cd112bf0f52e23afc9cdee4adfcf540de5)
Fix Ominous Clouds being only clockwise, now they move both clock and counter-clock wise.
Add a workaround for GenericMovementGenerator not handling correctly cyclic splines started by MoveCirclePath(), stopping the movement after a single round. The workaround code can be removed once the bug in GenericMovementGenerator is fixed.
(cherry picked from commit c1df161e1ddf95584030480d3dcb15149aacd7a6)
* Core/PathGenerator: Fix path generator returning shortcuts when start and end are on the same polygon
Fix path generator returning shortcuts when start and end are on the same polygon by handling this case as if start and end were on 2 different polygons. This will ensure BuildPointPath() gets called which calls FindSmoothPath(), making sure each step is not longer than SMOOTH_PATH_STEP_SIZE (4 yards)
* Change ingame cast error message to SPELL_FAILED_NOPATH from SPELL_FAILED_OUT_OF_RANGE if the generated path is too long
(cherry picked from commit 29bf280e3496cf13c24ccb20e37da29d3bfa74d9)
* Core/Movement: Fix fleeing speed to 66% run speed
Fix fleeing speed to 66% run speed until the creature starts returning home
* Fix build
* Don't check speed type
* Don't apply speed reduction twice
* Fix no-pch (1st try)
* Make sure every spell focus is interrupted when seeking assistance
(cherry picked from commit 4ccf01de3947f50629c20192da3f99cb8c693b35)
* Core/MMaps: Fix charge underwater
Fix charge sometimes returning "no path available" when swimming/underwater.
Fix charge selecting a destination point 4 yards above swimming/underwater targets
* Allow falling units to charge targets that are below (lower Z coordinate)
* Disable "raycast" pathfinding as it's not blizzlike.
This might show some strange paths when charging with a target in front.
It also fixes some falling undermap issues.
This Reverts 272009ebee
* Remove Z offset when charging a target as it never made sense
(cherry picked from commit 88a14251e2765880e90cb41be7919cd39e3308e2)
* Core/Movement: Fix wrong orientation set when pausing movement
* Update MoveSpline.h
* Update Unit.cpp
(cherry picked from commit e698c17a2688385e62744cdf5eb37b12b9e304fa)
Fix AssistanceMovementGenerator using 100% MOVE_RUN speed instead of 66% . Please note that the fleeing mechanic still has some open issues that this single commit doesn't fix
(cherry picked from commit 862d47394b8c879f42902f03ecd112b65ff631c2)
Ensure to load the grid of TempSummons owned by Players when the relocate to another cell
(cherry picked from commit afbc47891965f9c31c4b31c66931a2dbc9846f93)
* Core/GameObjects: Skip LoS checks for traps
* Core/GameObjects: Fix spells cast by traps missing always
* Scripts/Spells: Fix WSG heal buff not healing
The WSG green heal buff is now cast by a GameObject so the spell target should be used to calculate the healing, not the GameObject.
(cherry picked from commit 909941e1b44250b0fa646d363af817f40ca48355)
Enable MaxCoreStuckTime setting by default to force worldserver to exit in case of infinite loops.
Note that this will not affect existing setups with the setting MaxCoreStuckTime set to 0 in the local worldserver.conf .
(cherry picked from commit 00703ee238729a8d5b3d17edf8dc16d6c6c6b601)
Allow to enable/disable Address Sanitizer in Clang and GCC from CMake flag "ASAN" of type Boolean. It can be enabled passing -DASAN=TRUE to CMake.
(cherry picked from commit 580f40769c6c446284dd1f5738f67fb3ee802956)
Fix battleground flags not displaying the typical burning animation when they "despawn" (they don't actually despawn, they just change state)
(cherry picked from commit 90bb10aa3a490fc701e6f98b32310687af80dea5)
Fix players stuck in combat with NPC_ARM_SWEEP_STALKER and/or both arms after killing the boss.
(cherry picked from commit fed030da190c9c53ad013d3e460ba1afbe1f02a2)
Fix an issue that wouldn't allow to re-queue after joining a dungeon, having 1 member leave/get kicked, queue, leave, queue.
In this case a message "One or more dungeons was not valid" would be displayed because LFG would try to queue the group as "continue dungeon" but the current group was not marked as "in dungeon" state anymore.
(cherry picked from commit abcad7cda5375478f475bb9624c578169e84c559)