Skip to content

Commit

Permalink
Merge pull request #508 from eelldlleed/master
Browse files Browse the repository at this point in the history
Maybe a fix to the C stack overflow
  • Loading branch information
jordonwow authored Dec 20, 2022
2 parents e34b3e3 + 6cb5b66 commit 83a70b0
Showing 1 changed file with 17 additions and 28 deletions.
45 changes: 17 additions & 28 deletions BigDebuffs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1311,21 +1311,23 @@ local function checkFrame(frame)
end
end


for _, frame in ipairs(ActionBarButtonEventsFrame.frames) do
hooksecurefunc(frame, "UpdateAction", checkFrame);
end
hooksecurefunc("CompactUnitFrame_UpdateAll", function(frame)
for _, f in ipairs(ActionBarButtonEventsFrame.frames) do
if f.UpdateAction then hooksecurefunc(f, "UpdateAction", checkFrame) end
end
if not BigDebuffs.db.profile then return end
if not BigDebuffs.db.profile.raidFrames then return end
if not BigDebuffs.db.profile.raidFrames.enabled then return end
if frame:IsForbidden() then return end
local name = frame:GetName()
if not name or not name:match("^Compact") then return end
if InCombatLockdown() and not frame.BigDebuffs then
if not pending[frame] then pending[frame] = true end
else
BigDebuffs:AddBigDebuffs(frame)
end
if not BigDebuffs.db.profile then return end
if not BigDebuffs.db.profile.raidFrames then return end
if not BigDebuffs.db.profile.raidFrames.enabled then return end
if frame:IsForbidden() then return end
local name = frame:GetName()
if not name or not name:match("^Compact") then return end
if InCombatLockdown() and not frame.BigDebuffs then
if not pending[frame] then pending[frame] = true end
-- if not IsInGroup() or GetNumGroupMembers() > 5 then return end
else
BigDebuffs:AddBigDebuffs(frame)
end
end)

if WOW_PROJECT_ID == WOW_PROJECT_MAINLINE then
Expand Down Expand Up @@ -1465,9 +1467,6 @@ end

if LibClassicDurations then
hooksecurefunc("CompactUnitFrame_UtilSetBuff", function(buffFrame, unit, index, filter)
for _, frame in ipairs(ActionBarButtonEventsFrame.frames) do
if frame.UpdateAction then hooksecurefunc(frame, "UpdateAction", checkFrame) end
end
if not LibClassicDurations then return end
local name, icon, count, debuffType, duration, expirationTime, unitCaster,
canStealOrPurge, _, spellId, canApplyAura = UnitBuff(unit, index, filter);
Expand Down Expand Up @@ -1543,10 +1542,6 @@ if WOW_PROJECT_ID == WOW_PROJECT_MAINLINE then
end

hooksecurefunc("CompactUnitFrame_UpdateAuras", function(frame, unitAuraUpdateInfo)
for _, f in ipairs(ActionBarButtonEventsFrame.frames) do
if f.UpdateAction then hooksecurefunc(f, "UpdateAction", checkFrame) end
end

if (not frame) or frame:IsForbidden() then return end

if (not UnitIsPlayer(frame.displayedUnit)) then return end
Expand Down Expand Up @@ -1694,7 +1689,7 @@ if WOW_PROJECT_ID == WOW_PROJECT_MAINLINE then

CompactUnitFrame_HideAllDispelDebuffs(frame, frameNum);
end

BigDebuffs:ShowBigDebuffs(frame)
end)
else
Expand Down Expand Up @@ -1814,9 +1809,6 @@ else
end

hooksecurefunc("CompactUnitFrame_UpdateDebuffs", function(frame)
for _, f in ipairs(ActionBarButtonEventsFrame.frames) do
if f.UpdateAction then hooksecurefunc(f, "UpdateAction", checkFrame) end
end
if (not frame.debuffFrames or not frame.optionTable.displayDebuffs) then
CompactUnitFrame_HideAllDebuffs(frame);
return;
Expand Down Expand Up @@ -1914,9 +1906,6 @@ else

-- Show extra buffs
hooksecurefunc("CompactUnitFrame_UpdateBuffs", function(frame)
for _, f in ipairs(ActionBarButtonEventsFrame.frames) do
if f.UpdateAction then hooksecurefunc(f, "UpdateAction", checkFrame) end
end
if (not frame.buffFrames or not frame.optionTable.displayBuffs) then
CompactUnitFrame_HideAllBuffs(frame);
return;
Expand Down

0 comments on commit 83a70b0

Please sign in to comment.