From 9276d3e0216725c15306f63dd290103d8f5f2350 Mon Sep 17 00:00:00 2001 From: Logan Payton Date: Tue, 20 Feb 2018 10:12:49 -0500 Subject: [PATCH 1/2] GetItemInfo was returning nil, not empty string --- !Compatibility/api/wowAPI.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/!Compatibility/api/wowAPI.lua b/!Compatibility/api/wowAPI.lua index 40173d4..ffda18b 100644 --- a/!Compatibility/api/wowAPI.lua +++ b/!Compatibility/api/wowAPI.lua @@ -386,7 +386,7 @@ function GetItemInfoByName(itemName) for itemID = 1, LAST_ITEM_ID do name = GetItemInfo(itemID) - if name ~= "" then + if name ~= "" and name ~= nil then itemInfoDB[name] = itemID if name == itemName then From b4f8cad7d03dfcb5a73636bea650347b33afc61e Mon Sep 17 00:00:00 2001 From: Logan Payton Date: Tue, 20 Feb 2018 11:18:16 -0500 Subject: [PATCH 2/2] Fix vendoring grays - still no sell value check --- ElvUI/Modules/Bags/Bags.lua | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/ElvUI/Modules/Bags/Bags.lua b/ElvUI/Modules/Bags/Bags.lua index 39a4f6d..45cf59f 100644 --- a/ElvUI/Modules/Bags/Bags.lua +++ b/ElvUI/Modules/Bags/Bags.lua @@ -697,7 +697,7 @@ function B:GetGraysValue() local c = 0 for b = 0, NUM_BAG_FRAMES do - for s = 0, GetContainerNumSlots(b) do + for s = 1, GetContainerNumSlots(b) do local l = GetContainerItemLink(b, s) if l and find(l,"ff9d9d9d") then -- local p = LIP:GetSellValue(l) * select(2, GetContainerItemInfo(b, s)) @@ -724,24 +724,19 @@ function B:VendorGrays(delete, _, getValue) local l = GetContainerItemLink(b, s) if l and find(l,"ff9d9d9d") then -- local p = LIP:GetSellValue(l) * select(2, GetContainerItemInfo(b, s)) - if delete then - if find(l,"ff9d9d9d") then - if not getValue then - PickupContainerItem(b, s) - DeleteCursorItem() - end - c = c + p - count = count + 1 + if not getValue then + PickupContainerItem(b, s) + DeleteCursorItem() end + -- c = c + p + count = count + 1 else - if select(3, GetItemInfo(l)) == 0 and p > 0 then - if not getValue then - UseContainerItem(b, s) - PickupMerchantItem() - end - c = c + p + if not getValue then + UseContainerItem(b, s) + PickupMerchantItem() end + -- c = c + p end end end @@ -758,11 +753,12 @@ function B:VendorGrays(delete, _, getValue) end function B:VendorGrayCheck() - local value = B:GetGraysValue() + -- local value = B:GetGraysValue() - if value == 0 then - E:Print(L["No gray items to delete."]) - elseif not MerchantFrame or not MerchantFrame:IsShown() then + -- if value == 0 then + -- E:Print(L["No gray items to delete."]) + -- else + if not MerchantFrame or not MerchantFrame:IsShown() then E.PopupDialogs["DELETE_GRAYS"].Money = value E:StaticPopup_Show("DELETE_GRAYS") else