From 0a3353be71bffdc42b990b0ba8ff80f8ee0b6a5a Mon Sep 17 00:00:00 2001 From: Spit <19otari98@gmail.com> Date: Sun, 28 Sep 2025 11:23:57 +0300 Subject: [PATCH] use actual item texture if available --- Core/AtlasLoot.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Core/AtlasLoot.lua b/Core/AtlasLoot.lua index 8beae6f..0b40458 100644 --- a/Core/AtlasLoot.lua +++ b/Core/AtlasLoot.lua @@ -1230,23 +1230,23 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame) local border = _G["AtlasLootItem_"..i.."Border"] local iconData = dataSource[dataID][i][2] -- If there is no data on the texture an item should have, show a big red question mark - if ( iconData == "?" ) then - iconFrame:SetTexture("Interface\\Icons\\INV_Misc_QuestionMark"); - elseif ( iconData == "" ) then - local _, _, _, _, _, _, _, _, itemTexture1 = GetItemInfo(dataSource[dataID][i][1]) - iconFrame:SetTexture(itemTexture1); + if ( strsub(iconData, 1, 5) == "CLASS" ) then + iconFrame:SetTexture("Interface\\AddOns\\AtlasLoot\\Images\\"..strsub(iconData, 6)) + elseif ( isItem and type(dataSource[dataID][i][1]) == "number" ) then + local _, _, _, _, _, _, _, _, texture = GetItemInfo(dataSource[dataID][i][1]) + if ( not texture and type(iconData) == "string" ) then + texture = "Interface\\Icons\\"..iconData + end + iconFrame:SetTexture(texture); elseif ( not isItem and spellIcon ) then if ( type(iconData) == "number" ) then - local _, _, _, _, _, _, _, _, itemTexture2 = GetItemInfo(iconData) - iconFrame:SetTexture(itemTexture2); + local _, _, _, _, _, _, _, _, texture = GetItemInfo(iconData) + iconFrame:SetTexture(texture); elseif ( type(iconData) == "string" ) then iconFrame:SetTexture("Interface\\Icons\\"..iconData); else iconFrame:SetTexture(spellIcon); end - elseif ( strfind(iconData, "^CLASS") ) then - local class = gsub(iconData, "CLASS", "") - iconFrame:SetTexture("Interface\\AddOns\\AtlasLoot\\Images\\"..class) else iconFrame:SetTexture("Interface\\Icons\\"..iconData); end