mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-21 23:26:56 +00:00
actionbar: update usable on range change
This commit is contained in:
+15
-15
@@ -368,21 +368,6 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function ()
|
||||
end
|
||||
end
|
||||
|
||||
local function ButtonRangeUpdate(self)
|
||||
local self = self or this
|
||||
|
||||
-- update range display
|
||||
if C.bars.glowrange == "1" and self.bar ~= 11 and self.bar ~= 12 and HasAction(self.id) and ActionHasRange(self.id) and IsActionInRange(self.id) == 0 then
|
||||
if not self.outofrange then
|
||||
self.outofrange = true
|
||||
updatecache[self.slot] = true
|
||||
end
|
||||
elseif self.outofrange then
|
||||
self.outofrange = nil
|
||||
updatecache[self.slot] = true
|
||||
end
|
||||
end
|
||||
|
||||
local function ButtonDrag(self)
|
||||
local self = self or this
|
||||
|
||||
@@ -524,6 +509,21 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function ()
|
||||
end
|
||||
end
|
||||
|
||||
local function ButtonRangeUpdate(self)
|
||||
local self = self or this
|
||||
|
||||
-- update range display
|
||||
if C.bars.glowrange == "1" and self.bar ~= 11 and self.bar ~= 12 and HasAction(self.id) and ActionHasRange(self.id) and IsActionInRange(self.id) == 0 then
|
||||
if not self.outofrange then
|
||||
self.outofrange = true
|
||||
ButtonUpdateUsable(self)
|
||||
end
|
||||
elseif self.outofrange then
|
||||
self.outofrange = nil
|
||||
ButtonUpdateUsable(self)
|
||||
end
|
||||
end
|
||||
|
||||
local function ButtonUpdateCooldown(button)
|
||||
if not button then return end
|
||||
local start, duration, enable
|
||||
|
||||
Reference in New Issue
Block a user