Skip to content

Commit

Permalink
Fix issue with range checking update in Era
Browse files Browse the repository at this point in the history
  • Loading branch information
Anonomit committed Mar 16, 2024
1 parent 425f92a commit 8a239a6
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Windows/ServerWindow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit 8a239a6

Please sign in to comment.