From 9f61db5d69f586ff7da4209b4ba8532b700f3dfe Mon Sep 17 00:00:00 2001 From: antony Date: Thu, 29 Aug 2024 11:40:38 +0200 Subject: [PATCH] Fix double squar --- src/strategy/actions/AcceptQuestAction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/strategy/actions/AcceptQuestAction.cpp b/src/strategy/actions/AcceptQuestAction.cpp index fcbd2438..259e31db 100644 --- a/src/strategy/actions/AcceptQuestAction.cpp +++ b/src/strategy/actions/AcceptQuestAction.cpp @@ -51,7 +51,7 @@ bool AcceptQuestAction::Execute(Event event) guid = unit->GetGUID().GetRawValue(); break; } - if (unit && text == "*" && sqrt(bot->GetDistance(unit)) <= INTERACTION_DISTANCE) + if (unit && text == "*" && bot->GetDistance(unit) <= INTERACTION_DISTANCE) hasAccept |= QuestAction::ProcessQuests(unit); } GuidVector gos = AI_VALUE(GuidVector, "nearest game objects no los"); @@ -63,7 +63,7 @@ bool AcceptQuestAction::Execute(Event event) guid = go->GetGUID().GetRawValue(); break; } - if (go && text == "*" && sqrt(bot->GetDistance(go)) <= INTERACTION_DISTANCE) + if (go && text == "*" && bot->GetDistance(go) <= INTERACTION_DISTANCE) hasAccept |= QuestAction::ProcessQuests(go); } }