From d6a4fc3872e1f4e54d38eacb1490d984531f7392 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Mon, 15 Apr 2024 17:06:00 +0800 Subject: [PATCH] Distance check --- conf/playerbots.conf.dist | 1 - src/strategy/actions/MovementActions.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index c3afc2a3..4820efb3 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -313,7 +313,6 @@ AiPlayerbot.AlmostFullHealth = 85 AiPlayerbot.LowMana = 15 AiPlayerbot.MediumMana = 40 - # Enable healer bot save mana # Default: 1 (enable) AiPlayerbot.AutoSaveMana = 1 diff --git a/src/strategy/actions/MovementActions.cpp b/src/strategy/actions/MovementActions.cpp index 185b7848..d0c3b659 100644 --- a/src/strategy/actions/MovementActions.cpp +++ b/src/strategy/actions/MovementActions.cpp @@ -1517,7 +1517,7 @@ bool AvoidAoeAction::AvoidAuraWithDynamicObj() return false; } float radius = dynOwner->GetRadius(); - if (bot->GetExactDist(dynOwner) > radius) { + if (bot->GetDistance(dynOwner) > radius) { return false; } Unit* currentTarget = AI_VALUE(Unit*, "current target");