From cf0bdf13fc3e931bc37b341f8caad913f5c1eaa8 Mon Sep 17 00:00:00 2001 From: bash Date: Sat, 30 May 2026 23:01:50 +0200 Subject: [PATCH] refactor(Core/Movement): Rename stale TravelPlan:* labels + drop unused lastdelayTime --- .claude/settings.json | 39 +++++++++++++++++++- src/Ai/Base/Actions/MovementActions.cpp | 4 +- src/Ai/Base/Value/LastMovementValue.cpp | 2 - src/Ai/Base/Value/LastMovementValue.h | 1 - src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp | 2 +- 5 files changed, 41 insertions(+), 7 deletions(-) diff --git a/.claude/settings.json b/.claude/settings.json index dd377dfde..81d8fb574 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -40,7 +40,44 @@ "Bash(git -C \"C:/Users/Admin/git/main/azerothcore-wotlk\" rebase origin/fix/mmaps-config-overrides-and-aliases)", "Bash(git -C \"C:/Users/Admin/git/main/azerothcore-wotlk\" log --oneline -3)", "Bash(grep -v \"//\")", - "Bash(grep -v \"^//\")" + "Bash(grep -v \"^//\")", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk push --force-with-lease)", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots push --force-with-lease)", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk diff --stat)", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk add src/server/game/Movement/MovementGenerators/PathGenerator.h src/server/game/Movement/MovementGenerators/PathGenerator.cpp)", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk commit -m \"feat\\(Core/Movement\\): Apply bot filter rules in PathGenerator::CreateFilter\")", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots commit -m \"refactor\\(Core/Movement\\): Drop redundant bot filter setters at PathGenerator sites\")", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk log --all --oneline -- src/server/game/Movement/MovementGenerators/PathGenerator.cpp)", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk show 82a544b03 -- src/server/game/Movement/MovementGenerators/PathGenerator.cpp)", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk log --all --oneline -- src/tools/mmaps_generator/MapBuilder.cpp)", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk log --all --oneline -S \"modAlmostUnwalkableTriangles\")", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots log --oneline --since=\"2026-05-25\" -- src/Ai/Base/Actions/LootAction.cpp src/Mgr/Item/LootObjectStack.cpp src/Mgr/Item/LootObjectStack.h src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp)", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots log --oneline -20)", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots log --oneline 82a92f62 d0ba99f3 --not 82a92f62~30 -- src/Ai/Base/Actions/LootAction.cpp src/Mgr/Item/)", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots log --oneline d0ba99f3..82a92f62 -- src/Ai/ src/Mgr/Item/)", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots show c7b4b9aa --stat)", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots log --oneline 82a92f62..origin/test-staging)", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk rev-parse origin/test-staging)", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots commit -m \"fix\\(Core/RPG\\): Drop over-strict MoveFarTo and MoveWorldObjectTo guards\")", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots show 3269d1a4 --stat)", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots commit -m \"fix\\(Core/RPG\\): Align MoveFarTo, MoveWorldObjectTo, MoveRandomNear with cmangos\")", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk commit -m \"feat\\(Core/Movement\\): Double MAX_PATH_LENGTH to 148 under MOD_PLAYERBOTS\")", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots commit -m \"fix\\(Core/RPG\\): Drop chained probe and waypoint dispatch in MoveFarTo\")", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots revert 3384fa4f --no-edit)", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots add src/Mgr/Travel/TravelMgr.cpp)", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots commit -m \"fix\\(Core/Travel\\): Soft-bias STEEP at regen PathGenerator sites\")", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk add src/server/game/Movement/MovementGenerators/PathGenerator.cpp)", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk commit -m \"fix\\(Core/Movement\\): Bot filter uses cost bias for STEEP, not hard exclude\")", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots commit -m \"feat\\(Core/Travel\\): K-nearest node search, cropPathTo reuse, cross-map pathToEnd\")", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots add src/Mgr/Travel/TravelNode.cpp src/Mgr/Travel/TravelNode.h src/Ai/Base/Actions/MovementActions.cpp)", + "Bash(git -C c:/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots commit -m \"feat\\(Core/Travel\\): Re-enable area-trigger, static-portal, and teleport-spell nodes\")", + "Bash(git -C /c/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots add src/Ai/Base/Actions/FollowActions.cpp src/Ai/Base/Actions/MovementActions.cpp src/Ai/Base/Actions/MovementActions.h src/Ai/Raid/Ulduar/Action/RaidUlduarActions.cpp src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp src/Ai/World/Rpg/Action/NewRpgOutdoorPvP.cpp)", + "Bash(git -C /c/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots commit -m \"refactor\\(Core/Movement\\): Drop IsWaitingForLastMove throttle\")", + "Bash(git -C /c/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots push)", + "Bash(git -C /c/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots diff --stat)", + "Bash(grep -v \"EmitDebugMove\\\\|//\")", + "Bash(git -C /c/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots add src/Mgr/Travel/TravelNode.h src/Mgr/Travel/TravelNode.cpp src/Ai/Base/Actions/MovementActions.cpp src/Ai/World/Rpg/NewRpgInfo.h src/Ai/World/Rpg/NewRpgInfo.cpp)", + "Bash(git -C /c/Users/Admin/git/main/azerothcore-wotlk/modules/mod-playerbots commit -m \"refactor\\(Core/Travel\\): Drop TravelPlan struct; GetFullPath returns TravelPath\")" ], "additionalDirectories": [ "C:\\Users\\Admin\\git\\main\\azerothcore-wotlk\\src\\common\\Collision\\Maps", diff --git a/src/Ai/Base/Actions/MovementActions.cpp b/src/Ai/Base/Actions/MovementActions.cpp index 8cf3320d7..4ba7279b9 100644 --- a/src/Ai/Base/Actions/MovementActions.cpp +++ b/src/Ai/Base/Actions/MovementActions.cpp @@ -3337,7 +3337,7 @@ bool MovementAction::BoardTransport(Transport* transport) { transport->AddPassenger(bot, true); bot->StopMovingOnCurrentPos(); - EmitDebugMove("TravelPlan:transport-board", "teleport", transport->GetPositionX(), + EmitDebugMove("Transport:board", "teleport", transport->GetPositionX(), transport->GetPositionY(), transport->GetPositionZ()); return true; } @@ -3363,7 +3363,7 @@ bool MovementAction::BoardTransport(Transport* transport) bot->SetStandState(UNIT_STAND_STATE_STAND); mm->MovePoint(0, destX, destY, destZ, FORCED_MOVEMENT_NONE, 0.0f, 0.0f, false, false); - EmitDebugMove("TravelPlan:transport-walk", "spline", destX, destY, destZ); + EmitDebugMove("Transport:walk", "spline", destX, destY, destZ); } return false; diff --git a/src/Ai/Base/Value/LastMovementValue.cpp b/src/Ai/Base/Value/LastMovementValue.cpp index b0766fdb9..45d43c5c4 100644 --- a/src/Ai/Base/Value/LastMovementValue.cpp +++ b/src/Ai/Base/Value/LastMovementValue.cpp @@ -41,7 +41,6 @@ void LastMovement::clear() lastFlee = 0; nextTeleport = 0; msTime = 0; - lastdelayTime = 0; priority = MovementPriority::MOVEMENT_NORMAL; lastTransportEntry = 0; } @@ -64,7 +63,6 @@ void LastMovement::Set(uint32 mapId, float x, float y, float z, float ori, float lastFollow = nullptr; lastMoveShort = WorldPosition(mapId, x, y, z, ori); msTime = getMSTime(); - lastdelayTime = delayTime; priority = pri; } diff --git a/src/Ai/Base/Value/LastMovementValue.h b/src/Ai/Base/Value/LastMovementValue.h index 15b6e8502..07973f2ef 100644 --- a/src/Ai/Base/Value/LastMovementValue.h +++ b/src/Ai/Base/Value/LastMovementValue.h @@ -61,7 +61,6 @@ public: float lastMoveToY; float lastMoveToZ; float lastMoveToOri; - float lastdelayTime; WorldPosition lastMoveShort; uint32 msTime; MovementPriority priority; diff --git a/src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp b/src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp index bd4df746a..a8f915ebd 100644 --- a/src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp +++ b/src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp @@ -383,7 +383,7 @@ bool NewRpgBaseAction::TakeFlight(std::vector const& taxiNodes, Creature LOG_DEBUG("playerbots", "[New RPG] Bot {} taking flight ({} nodes, {} to {})", bot->GetName(), taxiNodes.size(), taxiNodes.front(), taxiNodes.back()); - EmitDebugMove("TravelPlan:flight", "taxi", flightMaster->GetPositionX(), flightMaster->GetPositionY(), + EmitDebugMove("Flight:taxi", "taxi", flightMaster->GetPositionX(), flightMaster->GetPositionY(), flightMaster->GetPositionZ()); return true; }