mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Fix move npc action (#1087)
This commit is contained in:
@@ -242,12 +242,13 @@ bool NewRpgMoveNpcAction::Execute(Event event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
WorldObject* object = ObjectAccessor::GetWorldObject(*bot, info.near_npc.npcOrGo);
|
WorldObject* object = ObjectAccessor::GetWorldObject(*bot, info.near_npc.npcOrGo);
|
||||||
if (object && bot->CanInteractWithQuestGiver(object))
|
if (object && bot->GetDistance(object) <= INTERACTION_DISTANCE)
|
||||||
{
|
{
|
||||||
if (!info.near_npc.lastReach)
|
if (!info.near_npc.lastReach)
|
||||||
{
|
{
|
||||||
info.near_npc.lastReach = getMSTime();
|
info.near_npc.lastReach = getMSTime();
|
||||||
InteractWithNpcOrGameObjectForQuest(info.near_npc.npcOrGo);
|
if (bot->CanInteractWithQuestGiver(object))
|
||||||
|
InteractWithNpcOrGameObjectForQuest(info.near_npc.npcOrGo);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user