* Additionally he PathGenerator will now check for realtime movement flags instead of creature based template data only so scripted flying movement and players will now correctly get their path calculated
(cherry picked from commit fdcb7388a6)
* 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 bd2d60c267)
* 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 <dreadkiller@gmx.de>
(cherry picked from commit c0b75bf40d)
actually port back the previous implementation, now correctly
this implies that a unit that has a different victim than the one its chasing will stand still till either:
- a new movement replaces the current, for w/e reason
- the chase target is again the current victim
probably a pause implementation on the generator is a more elegant solution...
updates #24600
(cherry picked from commit 472e1fd8ae)
* Core/Objects: further improvements for MovePositionToFirstCollision
* the PathGenerator will now normalize incomplete destinations as well
* normalize destination positions before launching detour raycasts to get better direction data
* exclude unwanted pathfinding results from further use to avoid unintended behaivior
* Core/PathFinding: Split PATHFIND_FARFROMPOLY into PATHFIND_FARFROMPOLY_START and PATHFIND_FARFROMPOLY_END for start and end position
Handle PATHFIND_FARFROMPOLY_END as valid in MovePositionToFirstCollision
Co-authored-by: jackpoz <giacomopoz@gmail.com>
(cherry picked from commit 6485422c61)
* removed redundant static LOS checks as they are covered by the mmap raycast prior to the check
* removed unnecessary VMap height lookups to determine rapid falloffs as they are covered by the mmap raycast as well
(cherry picked from commit cf849df50a)
* Core/Player: add helper methods for PLAYER_FLAGS_DEVELOPER. Update .dev command to new command model
* Rename _player -> player
(cherry picked from commit 8128bb97db)
* Reuse code that removes non-stackable auras at apply to check before casting the spell to keep reagents/cast item
(cherry picked from commit 43d9ffd1bc)
* Game/AI: Implement new targettype SMART_TARGET_CLOSEST_UNSPAWNED_GAMEOBJECT which allows to search for closest unspawned gameobjects
* updates: https://github.com/TrinityCore/TrinityCore/issues/24067
* Game/AI: Implement new targettype SMART_TARGET_CLOSEST_UNSPAWNED_GAMEOBJECT which allows to search for closest unspawned gameobjects
(cherry picked from commit 2d948d3366)
* Game/SmartScripts: Reset counter in SAI only on Initialize.
* Game/SmartScripts: Reset counter in SAI only on Initialize.
(cherry picked from commit 4f52f7d7c9)