From 5f7ab41efc9187ed5bbd6498700bb41fc98196aa Mon Sep 17 00:00:00 2001 From: Dolgubon Date: Fri, 3 Jan 2020 22:24:15 -0500 Subject: [PATCH] Fixed a bug where items with enchantments had their craft costs duplicated Fixed a bug where items wouldn't update improvement costs when created, not at final quality, and non white Fixed a bug where white items would not show the new in progress tooltip and texture when the equipment had been created --- Crafter.lua | 10 ++++++---- DolgubonsLazySetCrafter.txt | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Crafter.lua b/Crafter.lua index ae0ebd8..af67b8e 100644 --- a/Crafter.lua +++ b/Crafter.lua @@ -267,7 +267,6 @@ local function addRequirements(returnedTable, addAmounts) DolgubonSetCrafter.materialList = DolgubonSetCrafter.materialList or {} local parity = -1 if addAmounts then parity = 1 end - local requirements = LazyCrafter:getMatRequirements(returnedTable) for itemId, amount in pairs(requirements) do @@ -292,8 +291,11 @@ end function DolgubonSetCrafter.recompileMatRequirements() clearTable(DolgubonSetCrafter.materialList) for station, stationQueue in pairs( LazyCrafter.personalQueue) do + for queuePosition, request in pairs(stationQueue) do - addRequirements(request, true) + if not (station == CRAFTING_TYPE_ENCHANTING and not request.equipCreated) then + addRequirements(request, true) + end end end end @@ -537,7 +539,7 @@ local function LLCCraftCompleteHandler(event, station, resultTable) resultTable.station = GetRearchLineInfoFromRetraitItem(BAG_BACKPACK, resultTable.ItemSlotID) end DolgubonSetCrafter.removeFromScroll(resultTable.reference, resultTable) - elseif event == LLC_INITIAL_CRAFT_SUCCESS then + elseif event == LLC_INITIAL_CRAFT_SUCCESS or event == LLC_CRAFT_PARTIAL_IMPROVEMENT then -- DolgubonSetCrafter.recompileMatRequirements() DolgubonSetCrafter.updateList() end @@ -683,7 +685,7 @@ end function DolgubonSetCrafter.isRequestInProgressByReference(referenceId) local requestTable = LazyCrafter:findItemByReference(referenceId) - return requestTable and requestTable[1] and (requestTable[1].type ~= "smithing" or requestTable[1].glyphCreated) + return requestTable and requestTable[1] and (requestTable[1].equipCreated or requestTable[1].glyphCreated) end function DolgubonSetCrafter.AddSmithingRequestWithReference(pattern, isCP, level, styleIndex, traitIndex, useUniversalStyleItem, station, setIndex, quality, autocraft, optionalReference, optionalCraftingObject) diff --git a/DolgubonsLazySetCrafter.txt b/DolgubonsLazySetCrafter.txt index 169bee5..adfabcc 100644 --- a/DolgubonsLazySetCrafter.txt +++ b/DolgubonsLazySetCrafter.txt @@ -4,10 +4,10 @@ ; States and/or other countries. All rights reserved. ; You can read the full terms at https://account.elderscrollsonline.com/add-on-terms -## Title: Dolgubon's Lazy Set Crafter v2.3.2 +## Title: Dolgubon's Lazy Set Crafter v2.3.4 ## APIVersion: 100029 ## Author: Dolgubon -## Version: 2.3.2 +## Version: 2.3.4 ## SavedVariables: dolgubonslazysetcraftersavedvars ## DependsOn: LibLazyCrafting LibAddonMenu-2.0 ## OptionalDependsOn: pChat LibFeedback LibCustomMenu LibPrice LibStub