mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 15:39:25 +02:00
refactor(Core/Movement): Drop dead StartTravelPlan + UpdateTravelPlan + debug node lookup
This commit is contained in:
parent
5552398e2d
commit
b1dc9c787a
@ -162,22 +162,6 @@ void MovementAction::EmitDebugMove(char const* method, char const* generator, fl
|
||||
default: break;
|
||||
}
|
||||
|
||||
// Travel-plan override: when actively routing through the node
|
||||
// graph, prefer the next-hop node name over any RPG-level target.
|
||||
if (info.HasActiveTravelPlan())
|
||||
{
|
||||
TravelPlan const& plan = info.travelPlan;
|
||||
if (plan.stepIdx < plan.steps.GetPathRef().size())
|
||||
{
|
||||
PathNodePoint const& pnt = plan.steps.GetPathRef()[plan.stepIdx];
|
||||
if (pnt.type == PathNodeType::NODE_NODE || pnt.type == PathNodeType::NODE_PATH)
|
||||
{
|
||||
if (TravelNode* n = sTravelNodeMap.getNode(pnt.point, nullptr, 5.0f))
|
||||
targetName = "node:" + n->getName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float dis = bot->GetExactDist(x, y, z);
|
||||
std::ostringstream out;
|
||||
out << "[M] | " << method
|
||||
|
||||
@ -306,24 +306,6 @@ bool NewRpgBaseAction::DispatchPathPoints(WorldPosition const& dest,
|
||||
return true;
|
||||
}
|
||||
|
||||
void NewRpgBaseAction::StartTravelPlan(WorldPosition dest)
|
||||
{
|
||||
TravelPlan& plan = botAI->rpgInfo.travelPlan;
|
||||
GetTravelPlan(plan, dest);
|
||||
}
|
||||
|
||||
bool NewRpgBaseAction::UpdateTravelPlan()
|
||||
{
|
||||
TravelPlan& plan = botAI->rpgInfo.travelPlan;
|
||||
|
||||
bool result = ExecuteTravelPlan(plan);
|
||||
|
||||
if (!plan.IsActive())
|
||||
botAI->rpgInfo.ClearTravel();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool NewRpgBaseAction::MoveWorldObjectTo(ObjectGuid guid, float distance)
|
||||
{
|
||||
WorldObject* object = botAI->GetWorldObject(guid);
|
||||
|
||||
@ -83,9 +83,6 @@ protected:
|
||||
bool CheckRpgStatusAvailable(NewRpgStatus status);
|
||||
|
||||
private:
|
||||
void StartTravelPlan(WorldPosition dest);
|
||||
bool UpdateTravelPlan();
|
||||
|
||||
// Centralized dispatch helper. Applies underwater fixup, ClipPath
|
||||
// (truncate at first hostile in attack range with LOS, level+5 cap),
|
||||
// inactive-bot teleport (with self-bot carve-out), masterWalking
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user