Commit 022a7cbd authored by Blazeflack's avatar Blazeflack

Initial upload

parents
local E = unpack(ElvUI)
local B = E:GetModule("Bags")
local function UpdateSlot(self, bagID, slotID)
if (self.Bags[bagID] and self.Bags[bagID].numSlots ~= GetContainerNumSlots(bagID)) or not self.Bags[bagID] or not self.Bags[bagID][slotID] then
return;
end
local slot = self.Bags[bagID][slotID]
local link = GetContainerItemLink(bagID, slotID);
if link then
local id = tonumber(strmatch(link, 'item:(%d+)'))
if Scrap:IsJunk(id, bagID, slotID) then
return slot.JunkIcon:SetShown(Scrap_Icons)
end
end
slot.JunkIcon:Hide()
end
hooksecurefunc(B, "UpdateSlot", UpdateSlot)
-- Update Bags
local function UpdateBags()
for _, bagFrame in pairs(B.BagFrames) do
if bagFrame.UpdateAllSlots then
bagFrame:UpdateAllSlots()
end
end
end
hooksecurefunc(Scrap, 'SettingsUpdated', UpdateBags)
hooksecurefunc(Scrap, 'ToggleJunk', UpdateBags)
Scrap.HasSpotlight = true
\ No newline at end of file
## Interface: 60200
## Title: |cff1784d1ElvUI|r Scrap
## Notes: Adds the junk icon on ElvUI bagslot items which are considered junk by Scrap.
## Author: Blazeflack
## Dependencies: Scrap, ElvUI
## Version: 1.0
ElvUI_Scrap.lua
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment