From 8a239a6c20c61d28a330fe52059a8b97760d1abc Mon Sep 17 00:00:00 2001 From: Anonomit Date: Sat, 16 Mar 2024 16:30:51 -0400 Subject: [PATCH] Fix issue with range checking update in Era --- Windows/ServerWindow.xml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Windows/ServerWindow.xml b/Windows/ServerWindow.xml index 96015dc..61525b1 100644 --- a/Windows/ServerWindow.xml +++ b/Windows/ServerWindow.xml @@ -732,12 +732,16 @@ end if LootReserve:IsRangeCheckRestricted(unit) and not angle then - if min <= 15 then + if not (max or min) then + return self:SetState(UnitIsVisible(unit) and "Approach" or "Travel", false, false); + end + if min <= 10 then return self:SetState(format("%s: %s", "Open trade", distText), true, false); end + return self:SetState(format("%s: %s", UnitIsVisible(unit) and "Approach" or "Travel", distText), false, false); end - if not LootReserve:IsRangeCheckRestricted(unit) and not LootReserve:CheckInteractDistance(unit, 2) then + if LootReserve:CanLocate() or not LootReserve:IsRangeCheckRestricted(unit) and not LootReserve:CheckInteractDistance(unit, 2) then if not (max or min) then return self:SetState(UnitIsVisible(unit) and "Approach" or "Travel", false, false); end @@ -755,7 +759,11 @@ end if (max or min) <= 9 then - return self:SetState(format("%s: %s", "Above/Below", distText), false, false); + if not LootReserve:CanLocate() then + return self:SetState(format("%s: %s", "Above/Below", distText), false, false); + else + return self:SetState(format("%s: %s", "Open trade", distText), true, true); + end end local prefix = "Travel"