In Dragonflight I make a personal addon that place a custom texture over one or multiple bag slots that contains a specific equippable item. In The War Within no icon is visualized anymore inside my bags because the way how the bag slot are identified is changed... I think...
This was the piece of the code that worked in Dragonflight:
Code:
-- Function to highlight a specific bag slot
local function HighlightBagSlot(bag, slot, iconPath)
local bagFrame = _G["ContainerFrame"..(bag + 1)]
if bagFrame then
local slotsPerBag = C_Container.GetContainerNumSlots(bag)
local index = (slotsPerBag + 1) - slot
local button = _G[bagFrame:GetName().."Item"..index]
if button and C_Container.GetContainerItemLink(bag, slot) then
button:SetHighlightTexture(iconPath or "Interface\\AddOns\\MyAddons\\MyImage\\Image.tga")
local highlightTexture = button:GetHighlightTexture()
if highlightTexture then
highlightTexture:SetBlendMode("BLEND") -- Set the blend mode to "BLEND"
highlightTexture:SetPoint("TOPLEFT", button, "TOPLEFT", -3, 3)
highlightTexture:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", 3, -3)
highlightTexture:SetVertexColor(1, 1, 1, 1) -- Ensure the texture is fully opaque
button:LockHighlight()
end
end
end
end
Maybe there is a simple way to do that? I know is possible, the Zygor Guide is able to do that but is a quite complex addon.
I tried everything, even AI. ...so.... help???