From 087e558047c0494179e21f3ce7300f78741624b5 Mon Sep 17 00:00:00 2001 From: shagu Date: Tue, 2 Jan 2018 13:04:13 +0100 Subject: [PATCH] rangecheck: always update current target --- modules/rangecheck.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/rangecheck.lua b/modules/rangecheck.lua index 804557cd..a427e309 100644 --- a/modules/rangecheck.lua +++ b/modules/rangecheck.lua @@ -63,8 +63,6 @@ pfUI:RegisterModule("rangecheck", function () this.tick = GetTime() + interval end - unitdata["target"] = IsActionInRange(pfUI.rangecheck.slot) - -- skip invalid units while not this:NeedRangeScan(units[this.id]) and this.id <= numunits do this.id = this.id + 1 @@ -136,6 +134,11 @@ pfUI:RegisterModule("rangecheck", function () function pfUI.rangecheck:UnitInSpellRange(unit) if not pfUI.rangecheck.slot then return nil end + + if UnitIsUnit("target", unit) then + return IsActionInRange(pfUI.rangecheck.slot) == 1 and 1 or nil + end + local unit = pfUI.rangecheck:GetRealUnit(unit) if unitdata[unit] and unitdata[unit] == 1 then