Guest User

Untitled

a guest
Oct 18th, 2019
79
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Bags:UpdateSlots()
  2.     local Slot
  3.    
  4.     for i = 1, 5 do
  5.         NumSlots = GetContainerNumSlots((i-1))
  6.        
  7.         if (NumSlots > 0) then
  8.             for j = 1, NumSlots do
  9.                 Slot = _G["ContainerFrame" .. i .. "Item" .. j]
  10.                
  11.                 local Texture, ItemCount, Locked, Quality, Readable, _, _, IsFiltered, NoValue, ItemID = GetContainerItemInfo((i-1), Slot:GetID())
  12.                
  13.                 SetItemButtonTexture(Slot, Texture)
  14.                 SetItemButtonQuality(Slot, Quality, ItemID)
  15.                 SetItemButtonCount(Slot, ItemCount)
  16.                 SetItemButtonDesaturated(Slot, Locked)
  17.             end
  18.         end
  19.     end
  20. end
RAW Paste Data