Skip to content

Commit 614ae7a

Browse files
committed
Update UI.lua
* Fixed how things show up in the dungeon journal
1 parent 0147c66 commit 614ae7a

1 file changed

Lines changed: 32 additions & 1 deletion

File tree

UI.lua

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8397,9 +8397,40 @@ end
83978397
do
83988398
local OVERLAY_KEY = "MR_DungeonIDLabel"
83998399

8400+
local function HideOverlay(btn)
8401+
local label = btn and btn[OVERLAY_KEY]
8402+
if label then
8403+
label:Hide()
8404+
end
8405+
end
8406+
8407+
local function IsLootFrame(frame)
8408+
if not frame then return false end
8409+
8410+
local current = frame
8411+
while current do
8412+
local name = current.GetName and current:GetName() or nil
8413+
if type(name) == "string" and name:find("Loot", 1, true) then
8414+
return true
8415+
end
8416+
current = current.GetParent and current:GetParent() or nil
8417+
end
8418+
8419+
return frame.itemID ~= nil
8420+
or frame.itemLink ~= nil
8421+
or frame.lootID ~= nil
8422+
end
8423+
84008424
local function ApplyOverlayToButton(btn)
84018425
if not btn then return end
8402-
if not btn.encounterID or btn.encounterID <= 0 then return end
8426+
if not btn.encounterID or btn.encounterID <= 0 then
8427+
HideOverlay(btn)
8428+
return
8429+
end
8430+
if IsLootFrame(btn) then
8431+
HideOverlay(btn)
8432+
return
8433+
end
84038434

84048435
local journalEncounterID = btn.encounterID
84058436
local _, _, _, _, _, _, dungeonEncounterID = EJ_GetEncounterInfo(journalEncounterID)

0 commit comments

Comments
 (0)