Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions DandersFrames/ClickCasting/Bindings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2080,7 +2080,7 @@ function CC:GetSlotItemInfo(slotId)
local itemId = GetInventoryItemID("player", slotId)
if itemId then
local itemName, _, _, _, _, _, _, _, _, itemIcon = C_Item.GetItemInfo(itemId)
local spellName = GetItemSpell(itemId)
local spellName = C_Item.GetItemSpell(itemId)
return {
itemId = itemId,
name = itemName,
Expand All @@ -2097,7 +2097,7 @@ function CC:GetItemInfoById(itemId)
if not itemId then return nil end
local itemName, _, _, _, _, _, _, _, _, itemIcon = C_Item.GetItemInfo(itemId)
if itemName then
local spellName = GetItemSpell(itemId)
local spellName = C_Item.GetItemSpell(itemId)
return {
itemId = itemId,
name = itemName,
Expand All @@ -2112,7 +2112,7 @@ end
-- Get item count in bags
function CC:GetItemCount(itemId)
if not itemId then return 0 end
return C_Item.GetItemCount(itemId) or GetItemCount(itemId) or 0
return C_Item.GetItemCount(itemId) or 0
end

-- Build macro text for a single binding
Expand Down
21 changes: 19 additions & 2 deletions DandersFrames/ClickCasting/Frames.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1334,8 +1334,25 @@ end
-- need to handle clicks independently.
function CC:PropagateMouseOnChildren(frame)
if not frame or not frame.GetChildren then return end

local children = {frame:GetChildren()}

-- ☠☠ GUARD THE FUNCTION YOU CALL. The line above tests that the METHOD EXISTS; it
-- says nothing about whether CALLING it is permitted, and this call is the one place
-- in this function that was not pcall'd — despite the comment below promising
-- "everything here is pcall'd". GetChildren REFUSES to hand forbidden children to
-- tainted code and throws doing it:
-- bad argument #1 to '?' (Attempt to access forbidden object from code tainted by
-- an AddOn - Usage: local (scriptObject)* = self:GetChildren())
-- ⚠ The IsForbidden check below cannot prevent this. A child can pass it and still
-- have forbidden children OF ITS OWN, so the throw happens one level down, on the
-- recursion at the end of the loop.
-- ☠ And per the note below, a throw here does not skip one child — it abandons the
-- whole PLAYER_ENTERING_WORLD settle callback, taking ApplyGlobalBindings,
-- RunBindingRepair("zone-in") and ResolveColdStartProfile with it. Reported 126x in
-- one session (mist, live 5.3.1), i.e. click-casting recovery failing on every
-- zone-in that frame set was touched.
local ok, children = pcall(function() return { frame:GetChildren() } end)
if not ok or type(children) ~= "table" then return end

for _, child in ipairs(children) do
-- Everything here is pcall'd, and anything unreadable counts as "leave it
-- alone". This walk recurses over EVERY child of every Blizzard frame we
Expand Down
57 changes: 56 additions & 1 deletion DandersFrames/Features/Auras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1295,6 +1295,34 @@ function DF:BuildDebuffFilterRecords(dbLike, claimed)
return BuildDirectDebuffFilters(dbLike, claimed)
end

-- ☠ HOW MANY GROUPS THE DEBUFF ROW WILL BUILD — i.e. what "Max Debuffs" actually
-- multiplies by. Blizzard caps at maxFrameCount PER AURA GROUP and the engine has NO
-- container-level cap (checked against Blizzard_AuraContainerGroups: maxFrameCount is
-- group state, nothing sums across groups), so a row built from N records can render up
-- to N x max. The row is split whenever the config needs per-group STYLING or mutually
-- exclusive category records — Show All with the Important Debuffs highlight on is THREE
-- groups, and that highlight is ON BY DEFAULT, so the stock configuration already has a
-- ceiling of 3x. Category mode reaches five or six.
--
-- ⚠ THIS CANNOT BE FIXED BY BUDGETING THE GROUPS. Sharing one budget would need to know
-- how many auras each group will actually match, and the ALL-mode records are separated
-- only by candidate BOOLEANS (isBossOrRoleAura / isPriorityAura) which
-- C_UnitAuras.GetUnitAuraInstanceIDs cannot evaluate — all three carry the same filter
-- string, so a count would be identical for each. Dividing blindly under-shows the
-- common case (a unit with only ordinary debuffs would get max/3), and collapsing the
-- split to honour the cap silently deletes the highlight. Krathe's call, 2026-09-02:
-- never lose debuffs or functionality — SAY SO INSTEAD.
--
-- Claims are deliberately NOT passed: an Aura Designer claim only ever REMOVES records,
-- so ignoring them yields the worst case, which is what a ceiling should report. Nil
-- records mean the show-all fallback, which is a single group.
function DF:GetDebuffRowGroupCount(dbLike)
if not dbLike then return 1 end
local ok, recs = pcall(BuildDirectDebuffFilters, dbLike, nil)
if not ok or type(recs) ~= "table" then return 1 end
return math.max(1, #recs)
end

-- Build defensive filter table (BIG_DEFENSIVE + EXTERNAL_DEFENSIVE, nil if unavailable)
-- Assigned to the forward-declared local at the top of the file so it is
-- visible to code defined above this point.
Expand Down Expand Up @@ -2807,7 +2835,17 @@ function DF:BuildAuraRowConfig(db, prefix, opts)
-- while the colorblindMode CVar is on (test mode previews it regardless).
local dispel
if prefix == "debuff" then
local colorByType = db.debuffBorderColorByType
-- ☠ THE COLOUR RING IS A BORDER, SO IT OBEYS THE BORDER TOGGLE. This read the
-- by-type flag on its own, so a user with Show Border OFF still got a coloured
-- ring on every dispellable debuff — green on poison, brown on bleed — with no
-- visible setting to turn it off, because the by-type checkbox lives INSIDE the
-- Border section and is out of reach while that section is off. The only escape
-- was to re-enable the border, untick by-type, and disable the border again
-- (undëe, live 5.3.1).
-- ⚠ THE SYMBOL IS DELIBERATELY NOT GATED. The colourblind dispel letter is text,
-- not border art, and shipped decoupled on purpose — someone running without
-- borders should still get it. Only the RING answers to debuffShowBorder.
local colorByType = db.debuffBorderColorByType and db.debuffShowBorder ~= false
local showSymbol = db.debuffDispelSymbolEnabled == true
if colorByType or showSymbol then
dispel = { showWhenHarmful = true }
Expand Down Expand Up @@ -3134,6 +3172,23 @@ end
-- is "false" a re-parse that should have happened and did not.
local function confirmRetarget(h, label, unit)
if not (h and h.Refresh) then return end
-- ★ CONFIRM THE BINDING, NOT JUST THE PARSE. This only ever checked whether a
-- re-parse ran, which says nothing about WHICH UNIT it parsed. The container's
-- GetUnit returns a plain readable string (AuraContainerSharedMixin.unitToken), so
-- the one question that matters — is this row actually pointed at the player whose
-- frame it sits on — is answerable, and was simply never asked.
-- ⚠ Reported shape: a row or indicator showing a THIRD player's aura after roster
-- churn, healed only by /reload. A mismatch here names it outright instead of
-- leaving it to look like a filter fault.
local c = h.backend and h.backend.container
if c and c.GetUnit then
local okU, bound = pcall(c.GetUnit, c)
if okU and type(bound) == "string" and unit and bound ~= unit then
DF:DebugWarn("AURAROW", "%s: retarget MISMATCH - asked for %s, container is"
.. " bound to %s; this row is showing %s's auras",
label, tostring(unit), tostring(bound), tostring(bound))
end
end
local reparsed = h:Refresh()
if reparsed then
DF:Debug("AURAROW", "%s: retarget re-parsed on %s", label, tostring(unit))
Expand Down
Loading