Skip to content

Commit

Permalink
fix salvage crafting cost
Browse files Browse the repository at this point in the history
  • Loading branch information
derfloh205 committed Nov 19, 2024
1 parent b7886bc commit 880fbcf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions Classes/PriceData.lua
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ function CraftSim.PriceData:Update()
self.craftingCosts = self.craftingCosts +
reagentPriceInfo.itemPrice * reagentData.salvageReagentSlot.requiredQuantity
self.craftingCostsRequired = self.craftingCosts
self.craftingCostsNoOrderReagents = self.craftingCosts

if reagentPriceInfo.priceInfo.isExpectedCost then
tinsert(self.selfCraftedReagents, itemID)
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: 19.6.0
## Version: 19.6.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("19.6.1"),
f.p .. "Fixed " .. f.bb("Craft Log") .. " not account for salvage crafting cost",
newP("19.6.0"),
f.P .. f.e("New Scrollbar Design") .. " for all lists!",
f.P .. "Refactored " .. f.bb("Craft Results") .. " into " .. f.g("Craft Log"),
Expand Down
10 changes: 4 additions & 6 deletions Modules/TopGear/TopGear.lua
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,9 @@ end
---@return CraftSim.ProfessionGearSet[] topGearSets
function CraftSim.TOPGEAR:GetProfessionGearCombinations(recipeData)
local equippedGear = CraftSim.ProfessionGearSet(recipeData)
if recipeData:IsCrafter() then
equippedGear:LoadCurrentEquippedSet()
else
equippedGear:LoadCurrentEquippedSet(recipeData.crafterData)
end

equippedGear:LoadCurrentEquippedSet()

local inventoryGear = CraftSim.TOPGEAR:GetProfessionGearFromInventory(recipeData)

local equippedGearList = GUTIL:Filter(equippedGear:GetProfessionGearList(),
Expand Down Expand Up @@ -355,7 +353,7 @@ function CraftSim.TOPGEAR:OptimizeTopGear(recipeData, topGearMode)
local relativeConcentrationValue = concentrationValue - concentrationValuePreviousGear
local relativeStats = professionGearSet.professionStats:Copy()
local expectedQuality = recipeData.resultData.expectedQuality
local expectedQualityUpgrade = recipeData.resultData.expectedQualityUpgrade
local expectedQualityUpgrade = recipeData.resultData.expectedQualityUpgrade -- TODO: Remove or change
relativeStats:subtract(previousGear.professionStats)
local result = CraftSim.TopGearResult(professionGearSet, averageProfit, relativeProfit, concentrationValue,
relativeConcentrationValue, relativeStats,
Expand Down

0 comments on commit 880fbcf

Please sign in to comment.