Skip to content

Commit

Permalink
fix #588
Browse files Browse the repository at this point in the history
  • Loading branch information
derfloh205 committed Oct 8, 2024
1 parent 68a2481 commit 1c0e186
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Classes/CraftQueue.lua
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ function CraftSim.CraftQueue:RestoreFromDB()
end

function CraftSim.CraftQueue:FilterSortByPriority()
local claimedOrder = C_CraftingOrders.GetClaimedOrder()
-- first append all recipes of the current crafter character that do not have any subrecipes
local characterRecipesNoAltDependency, restRecipes = GUTIL:Split(self.craftQueueItems, function(cqi)
local noActiveSubRecipes = not cqi.hasActiveSubRecipes
Expand All @@ -263,6 +264,16 @@ function CraftSim.CraftQueue:FilterSortByPriority()
end)
local sortedCharacterRecipes = GUTIL:Sort(characterRecipesNoAltDependency,
function(a, b)
if claimedOrder and claimedOrder.isFulfillable then
local aSubmittable = a.recipeData.orderData and a.recipeData.orderData.orderID == claimedOrder.orderID
local bSubmittable = b.recipeData.orderData and b.recipeData.orderData.orderID == claimedOrder.orderID
if aSubmittable and not bSubmittable then
return true
elseif not aSubmittable and bSubmittable then
return false
end
end

if a.allowedToCraft and not b.allowedToCraft then
return true
elseif not a.allowedToCraft and b.allowedToCraft then
Expand Down
2 changes: 1 addition & 1 deletion CraftSim.toc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Title: CraftSim
## Notes: Calculates the average profit based on your profession stats and other tools for the war within gold making
## Author: genju
## Version: 18.3.0
## Version: 18.3.1
## X-Curse-Project-ID: 705015
## X-Wago-ID: 0mNwaPKo
## X-WoWI-ID: 26519
Expand Down
2 changes: 2 additions & 0 deletions Data/News.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ function CraftSim.NEWS:GET_NEWS(itemMap)
local news = {
f.bb(" Hello and thank you for using CraftSim!\n"),
f.bb(" ( You are awesome! )"),
newP("18.3.1"),
f.p .. "Fixed 'Submittable' queued patron orders not being on top of queue",
newP("18.3.0"),
f.s .. f.bb("CraftQueue Patron Orders"),
f.a .. "- Added a temporary option to ignore warbank reagents",
Expand Down

0 comments on commit 1c0e186

Please sign in to comment.