mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
fix stack overflow on some ui and syntax errors
This commit is contained in:
@@ -11,17 +11,26 @@ local CleveRoids = _G.CleveRoids or {}
|
||||
local Extension = CleveRoids.RegisterExtension("XPerl")
|
||||
Extension.RegisterEvent("ADDON_LOADED", "OnLoad")
|
||||
|
||||
-- Re-entrancy guard to prevent stack overflow
|
||||
local isProcessing = false
|
||||
|
||||
-- X-Perl uses XPerl_PlayerTip(unitid) for OnEnter and XPerl_PlayerTipHide() for OnLeave
|
||||
-- We hook these functions to track mouseover
|
||||
|
||||
function Extension.OnEnter(unitid)
|
||||
if isProcessing then return end
|
||||
if unitid and unitid ~= "" then
|
||||
isProcessing = true
|
||||
CleveRoids.SetMouseoverFrom("xperl", unitid)
|
||||
isProcessing = false
|
||||
end
|
||||
end
|
||||
|
||||
function Extension.OnLeave()
|
||||
if isProcessing then return end
|
||||
isProcessing = true
|
||||
CleveRoids.ClearMouseoverFrom("xperl")
|
||||
isProcessing = false
|
||||
end
|
||||
|
||||
function Extension.OnLoad()
|
||||
|
||||
Reference in New Issue
Block a user