mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-14 01:10:48 +00:00
librange: disable target frame events during scan
This commit is contained in:
@@ -132,6 +132,9 @@ librange:SetScript("OnEvent", function()
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
local target_event = TargetFrame_OnEvent
|
||||||
|
local target_nop = function() return end
|
||||||
|
|
||||||
librange:SetScript("OnUpdate", function()
|
librange:SetScript("OnUpdate", function()
|
||||||
if ( this.tick or 1) > GetTime() then
|
if ( this.tick or 1) > GetTime() then
|
||||||
return
|
return
|
||||||
@@ -158,10 +161,17 @@ librange:SetScript("OnUpdate", function()
|
|||||||
_G.PlaySound = SoundOff
|
_G.PlaySound = SoundOff
|
||||||
pfScanActive = true
|
pfScanActive = true
|
||||||
|
|
||||||
|
-- save and disable target frame events
|
||||||
|
target_event = TargetFrame_OnEvent
|
||||||
|
_G.TargetFrame_OnEvent = target_nop
|
||||||
|
|
||||||
TargetUnit(unit)
|
TargetUnit(unit)
|
||||||
unitdata[unit] = IsActionInRange(librange.slot)
|
unitdata[unit] = IsActionInRange(librange.slot)
|
||||||
TargetLastTarget()
|
TargetLastTarget()
|
||||||
|
|
||||||
|
-- restore target events
|
||||||
|
_G.TargetFrame_OnEvent = target_event
|
||||||
|
|
||||||
_G.PlaySound = SoundOn
|
_G.PlaySound = SoundOn
|
||||||
pfScanActive = false
|
pfScanActive = false
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user