mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
partial revert
This commit is contained in:
@@ -495,14 +495,14 @@ function B:Layout(isBank)
|
|||||||
if not f.ContainerHolder[i] then
|
if not f.ContainerHolder[i] then
|
||||||
if isBank then
|
if isBank then
|
||||||
f.ContainerHolder[i] = CreateFrame("CheckButton", "ElvUIBankBag"..bagID - 4, f.ContainerHolder, "BankItemButtonBagTemplate")
|
f.ContainerHolder[i] = CreateFrame("CheckButton", "ElvUIBankBag"..bagID - 4, f.ContainerHolder, "BankItemButtonBagTemplate")
|
||||||
f.ContainerHolder[i]:SetScript("OnClick", function(holder)
|
f.ContainerHolder[i]:SetScript("OnClick", function()
|
||||||
local inventoryID = holder:GetInventorySlot()
|
local inventoryID = this:GetInventorySlot()
|
||||||
PutItemInBag(inventoryID) --Put bag on empty slot, or drop item in this bag
|
PutItemInBag(inventoryID) --Put bag on empty slot, or drop item in this bag
|
||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
f.ContainerHolder[i] = CreateFrame("CheckButton", "ElvUIMainBag"..bagID.."Slot", f.ContainerHolder, "BagSlotButtonTemplate")
|
f.ContainerHolder[i] = CreateFrame("CheckButton", "ElvUIMainBag"..bagID.."Slot", f.ContainerHolder, "BagSlotButtonTemplate")
|
||||||
f.ContainerHolder[i]:SetScript("OnClick", function(holder)
|
f.ContainerHolder[i]:SetScript("OnClick", function()
|
||||||
local id = holder:GetID()
|
local id = this:GetID()
|
||||||
PutItemInBag(id) --Put bag on empty slot, or drop item in this bag
|
PutItemInBag(id) --Put bag on empty slot, or drop item in this bag
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
@@ -813,14 +813,7 @@ function B:OnEvent()
|
|||||||
if not this:IsShown() then return end
|
if not this:IsShown() then return end
|
||||||
this:UpdateCooldowns()
|
this:UpdateCooldowns()
|
||||||
elseif event == "PLAYERBANKSLOTS_CHANGED" then
|
elseif event == "PLAYERBANKSLOTS_CHANGED" then
|
||||||
local slot = unpack(arg)
|
this:UpdateBagSlots(-1)
|
||||||
print(event, slot)
|
|
||||||
local bagID = (slot <= NUM_BANKGENERIC_SLOTS) and -1 or (slot - NUM_BANKGENERIC_SLOTS)
|
|
||||||
if bagID > -1 then
|
|
||||||
B:Layout(true)
|
|
||||||
else
|
|
||||||
this:UpdateBagSlots(-1)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user