Added method to override displayed Bag of Crafting results; BoC MCM page now always shows bag of crafting descriptions, even if you dont own BoC; Renamed some BoC related variables for code consistency

This commit is contained in:
Wofsauge committed 2022-08-15 00:22:26 +02:00
1 parent c5809cf9e4
commit 27434748e1
4 files changed
+105 -80

No files matched your search

+4 -2
View File
@@ -1220,7 +1220,8 @@ end
function EID:bagContainsItem(itemID, itemCount, checkExactAmount)
local foundCount = 0
for _, bagItem in ipairs(EID.BagItems) do
local bagItems = EID.BoC.BagItemsOverride or EID.BoC.BagItems
for _, bagItem in ipairs(bagItems) do
if bagItem == itemID then
foundCount = foundCount + 1
end
@@ -1236,7 +1237,8 @@ function EID:bagContainsCount(craftTable)
for _, id in ipairs(craftTable) do
ingredCount[id] = ingredCount[id] + 1
end
for _, bagItem in ipairs(EID.BagItems) do
local bagItems = EID.BoC.BagItemsOverride or EID.BoC.BagItems
for _, bagItem in ipairs(bagItems) do
if ingredCount[bagItem] > 0 then
count = count + 1
ingredCount[bagItem] = ingredCount[bagItem] - 1