Skip to content

Commit f3138ca

Browse files
committed
Fixed shopping list bug
1 parent 3c29a06 commit f3138ca

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

CraftSim.toc

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
## Title: CraftSim
55
## Notes: Calculates the average profit based on your profession stats and other tools for dragonflight gold making
66
## Author: genju
7-
## Version: 17.1.4
7+
## Version: 17.1.5
88
## X-Curse-Project-ID: 705015
99
## X-Wago-ID: 0mNwaPKo
1010
## X-WoWI-ID: 26519

Data/News.lua

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ function CraftSim.NEWS:GET_NEWS(itemMap)
1515
local news = {
1616
f.bb(" Hello and thank you for using CraftSim!\n"),
1717
f.bb(" ( You are awesome! )"),
18+
newP("17.1.5"),
19+
f.p .. "Fixed a bug with",
20+
f.a .. f.bb("CraftQueue Auctionator Shopping List Creation"),
1821
newP("17.1.4"),
1922
f.P .. "Implemented " .. f.g("TWW Craft Buffs"),
2023
f.p .. "Spec Info Update",

Modules/CraftQueue/CraftQueue.lua

+5
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ function CraftSim.CRAFTQ.CreateAuctionatorShoppingListAll()
480480
if reagent.hasQuality then
481481
for qualityID, reagentItem in pairs(reagent.items) do
482482
local itemID = reagentItem.item:GetItemID()
483+
print("Shopping List Creation: Item: " .. (reagentItem.item:GetItemLink() or ""))
483484
local isSelfCrafted = craftQueueItem.recipeData:IsSelfCraftedReagent(itemID)
484485
if not isSelfCrafted then
485486
reagentMap[itemID] = reagentMap[itemID] or {
@@ -529,6 +530,8 @@ function CraftSim.CRAFTQ.CreateAuctionatorShoppingListAll()
529530
return cqi.recipeData:GetCrafterUID()
530531
end)
531532

533+
local crafterUIDs = GUTIL:ToSet(crafterUIDs)
534+
532535
--- convert to Auctionator Search Strings and deduct item count (of all crafters total)
533536
local searchStrings = GUTIL:Map(reagentMap, function(info, itemID)
534537
itemID = CraftSim.CRAFTQ:GetNonSoulboundAlternativeItemID(itemID)
@@ -541,6 +544,8 @@ function CraftSim.CRAFTQ.CreateAuctionatorShoppingListAll()
541544
return itemCount + itemCountForCrafter
542545
end)
543546

547+
print("total item count " .. itemID .. "-> " .. totalItemCount)
548+
544549
local searchTerm = {
545550
searchString = info.itemName,
546551
tier = info.qualityID,

0 commit comments

Comments
 (0)