mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 15:39:25 +02:00
feat(Core/RPG): Path to elevated quest giver from POI marker
This commit is contained in:
parent
1d638682e1
commit
0be4cc256d
@ -531,8 +531,29 @@ bool NewRpgDoQuestAction::DoCompletedQuest(NewRpgInfo::DoQuest& data)
|
||||
botAI->rpgInfo.ChangeToIdle();
|
||||
return true;
|
||||
}
|
||||
// waiting for SearchQuestGiverAndAcceptOrReward to pick up the NPC;
|
||||
// wander instead of false so we don't fall through to grind
|
||||
// At the POI marker but quest giver still out of interact range
|
||||
// (typical when the marker is at ground level and the NPC is
|
||||
// elevated — e.g. Tenaron at the top of Aldrassil). Try pathing
|
||||
// to the NPC's actual position so MoveFarTo can invoke travelnodes
|
||||
// for routes the marker-anchored mmap probe can't find.
|
||||
if (ObjectGuid qgGuid = ChooseNpcOrGameObjectToInteract(true, 200.0f))
|
||||
{
|
||||
if (WorldObject* qg = ObjectAccessor::GetWorldObject(*bot, qgGuid))
|
||||
{
|
||||
if (!bot->CanInteractWithQuestGiver(qg))
|
||||
{
|
||||
WorldPosition npcPos(qg->GetMapId(),
|
||||
qg->GetPositionX(),
|
||||
qg->GetPositionY(),
|
||||
qg->GetPositionZ());
|
||||
if (MoveFarTo(npcPos))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// No quest giver reachable — wander instead of false so we don't
|
||||
// fall through to grind.
|
||||
return MoveRandomNear(15.0f);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user