fix stack overflow on some ui and syntax errors

This commit is contained in:
Jrc13245
2026-01-10 09:48:18 -05:00
parent d89853396b
commit 5ae45b3406
4 changed files with 53 additions and 13 deletions
+16 -5
View File
@@ -14,6 +14,9 @@ Extension.RegisterEvent("PLAYER_ENTERING_WORLD", "DelayedInit")
local hookedFrames = {}
-- Re-entrancy guard to prevent stack overflow
local isProcessing = false
function Extension.HookFrame(frame, unit)
if not frame or hookedFrames[frame] then return end
@@ -21,15 +24,23 @@ function Extension.HookFrame(frame, unit)
local onLeave = frame:GetScript("OnLeave")
frame:SetScript("OnEnter", function()
local u = unit or this.unit
if u then
CleveRoids.SetMouseoverFrom("df3", u)
if not isProcessing then
local u = unit or this.unit
if u then
isProcessing = true
CleveRoids.SetMouseoverFrom("df3", u)
isProcessing = false
end
end
if onEnter then onEnter() end
end)
frame:SetScript("OnLeave", function()
CleveRoids.ClearMouseoverFrom("df3")
if not isProcessing then
isProcessing = true
CleveRoids.ClearMouseoverFrom("df3")
isProcessing = false
end
if onLeave then onLeave() end
end)
@@ -84,7 +95,7 @@ function Extension.HookAllFrames()
-- Try mods directory structure (Dragonflight3 uses /mods/)
if DF.mods then
for modName, mod in pairs(DF.mods) do
for _, mod in pairs(DF.mods) do
if mod.frames then
for unit, frame in pairs(mod.frames) do
Extension.HookFrame(frame, unit)