Skip to content

Commit 880fbcf

Browse files
committed
fix salvage crafting cost
1 parent b7886bc commit 880fbcf

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

Classes/PriceData.lua

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ function CraftSim.PriceData:Update()
9393
self.craftingCosts = self.craftingCosts +
9494
reagentPriceInfo.itemPrice * reagentData.salvageReagentSlot.requiredQuantity
9595
self.craftingCostsRequired = self.craftingCosts
96+
self.craftingCostsNoOrderReagents = self.craftingCosts
9697

9798
if reagentPriceInfo.priceInfo.isExpectedCost then
9899
tinsert(self.selfCraftedReagents, itemID)

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 the war within gold making
66
## Author: genju
7-
## Version: 19.6.0
7+
## Version: 19.6.1
88
## X-Curse-Project-ID: 705015
99
## X-Wago-ID: 0mNwaPKo
1010
## X-WoWI-ID: 26519

Data/News.lua

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ function CraftSim.NEWS:GET_NEWS(itemMap)
1717
local news = {
1818
f.bb(" Hello and thank you for using CraftSim!\n"),
1919
f.bb(" ( You are awesome! )"),
20+
newP("19.6.1"),
21+
f.p .. "Fixed " .. f.bb("Craft Log") .. " not account for salvage crafting cost",
2022
newP("19.6.0"),
2123
f.P .. f.e("New Scrollbar Design") .. " for all lists!",
2224
f.P .. "Refactored " .. f.bb("Craft Results") .. " into " .. f.g("Craft Log"),

Modules/TopGear/TopGear.lua

+4-6
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,9 @@ end
211211
---@return CraftSim.ProfessionGearSet[] topGearSets
212212
function CraftSim.TOPGEAR:GetProfessionGearCombinations(recipeData)
213213
local equippedGear = CraftSim.ProfessionGearSet(recipeData)
214-
if recipeData:IsCrafter() then
215-
equippedGear:LoadCurrentEquippedSet()
216-
else
217-
equippedGear:LoadCurrentEquippedSet(recipeData.crafterData)
218-
end
214+
215+
equippedGear:LoadCurrentEquippedSet()
216+
219217
local inventoryGear = CraftSim.TOPGEAR:GetProfessionGearFromInventory(recipeData)
220218

221219
local equippedGearList = GUTIL:Filter(equippedGear:GetProfessionGearList(),
@@ -355,7 +353,7 @@ function CraftSim.TOPGEAR:OptimizeTopGear(recipeData, topGearMode)
355353
local relativeConcentrationValue = concentrationValue - concentrationValuePreviousGear
356354
local relativeStats = professionGearSet.professionStats:Copy()
357355
local expectedQuality = recipeData.resultData.expectedQuality
358-
local expectedQualityUpgrade = recipeData.resultData.expectedQualityUpgrade
356+
local expectedQualityUpgrade = recipeData.resultData.expectedQualityUpgrade -- TODO: Remove or change
359357
relativeStats:subtract(previousGear.professionStats)
360358
local result = CraftSim.TopGearResult(professionGearSet, averageProfit, relativeProfit, concentrationValue,
361359
relativeConcentrationValue, relativeStats,

0 commit comments

Comments
 (0)