partial revert

This commit is contained in:
Crum
2018-10-09 19:39:09 -05:00
parent 4044259cc9
commit 6c6ddfcc10
+4 -11
View File
@@ -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,16 +813,9 @@ 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)
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) this:UpdateBagSlots(-1)
end end
end end
end
function B:UpdateGoldText() function B:UpdateGoldText()
self.BagFrame.goldText:SetText(E:FormatMoney(GetMoney(), E.db["bags"].moneyFormat)) self.BagFrame.goldText:SetText(E:FormatMoney(GetMoney(), E.db["bags"].moneyFormat))