The-Cataclysm-Preservation-Project / TrinityCore

Archived repository for WoW 4.3.4.15595. The project will be reworked for Cataclysm Classic as an official new branch of TrinityCore at https://github.com/TrinityCore/TrinityCore
GNU General Public License v2.0
239 stars 97 forks source link

Core/Movement: Fixed issue with waypoint movements generator #423

Closed sanctum32 closed 9 months ago

sanctum32 commented 9 months ago

Fixes issues with non repeatable waypoints Also this fixed script related hooks

Changes proposed:

Issues addressed: Fixes #

This fixes issue where waypoint may could be repeated several times even when waypoints is set to not be repeatable

Tests performed: (Does it build, tested in-game, etc)

This mainly can be tested with https://gist.github.com/sanctum32/3eda5c5841cf9be69ad08f6ff0138013, i'm still developing this quest and grandma SAI script is missing but mainly testing with lucius, test results could be seen before and after.

Known issues and TODO list:

None

sanctum32 commented 9 months ago

This issue mainly is triggered because when https://github.com/The-Cataclysm-Preservation-Project/TrinityCore/blob/master/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp#L286 is called, it sets path as done but https://github.com/The-Cataclysm-Preservation-Project/TrinityCore/blob/master/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp#L306 is missing check for _done variable, so it still attempts to continue step anyways

Ovahlord commented 9 months ago

c783cf7d0f8673001db124743c624ddb5f19db0c