Enchanting fixes, reverted Crafting module to previous version that s… (#1)

* Enchanting fixes, reverted Crafting module to previous version that supports Ascension specific crafts and Vellums.

* Updated enchanting names from DB

* Added the remaining Ascension specific recipes

* Replace SpellNames2IDs.lua with UnitCastingSpellID

* Bugfix: Ascension uses exact quality QueryAuctionItems, TSM was designed for quality or higher

* Bugfix: Properly get list of Professions via index

* Replaced factionrealm with realm
Ascension does not have strict faction seperation

* GetTradeSkillCooldown -> SpellHasBaseCooldown
GetTradeSkillCooldown only tells you if a spell is on CD, not if it has a CD
Data is from DB, which isn't populated fully yet.

* Implement backported API GetSpellBaseCooldown

* bugfix: hasCD is nil if no cd, not 0
This commit is contained in:
Xan-Asc
2023-04-07 03:55:47 -07:00
committed by GitHub
parent d6aaac97af
commit 42dbe9d526
41 changed files with 1122 additions and 4694 deletions
@@ -96,7 +96,7 @@ local function FullScanCallback(event, ...)
-- It would be like trying to predict "the total download-time of a
-- file that keeps fluctuating between fast and slow speeds". The
-- best we can do is estimate based on current and previous speeds.
local last_scan_seconds_per_page = TSM.db.factionrealm.lastScanSecondsPerPage
local last_scan_seconds_per_page = TSM.db.realm.lastScanSecondsPerPage
if last_scan_seconds_per_page and last_scan_seconds_per_page > 0 then
-- TSM:Print(format("Read from DB: %f (Our unweighted estimate: %f)", last_scan_seconds_per_page, seconds_per_page)) -- DEBUG
seconds_per_page = (seconds_per_page * progress_float) + (last_scan_seconds_per_page * remaining_float)
@@ -143,7 +143,7 @@ local function FullScanCallback(event, ...)
-- with incorrect, partial-scan estimates, since most servers heavily
-- slow down their page requests over time. The completed scan is the truth.
if Scan.fullScanSecondsPerPage > 0 then
TSM.db.factionrealm.lastScanSecondsPerPage = Scan.fullScanSecondsPerPage
TSM.db.realm.lastScanSecondsPerPage = Scan.fullScanSecondsPerPage
end
-- Calculate how many seconds the completed "Full Scan" took.
@@ -333,7 +333,7 @@ function Scan.ProcessGetAllScan(self)
end
-- Process the collected "GetAll" auction data as a new "complete scan" with today's date.
TSM.db.factionrealm.lastCompleteScan = time()
TSM.db.realm.lastCompleteScan = time()
TSM.Data:ProcessData(data, nil, verifyNewAlgorithm)
-- Show GUI progress while we're waiting for the processing.
@@ -569,7 +569,7 @@ function Scan:ProcessScanData(scanData)
-- Mark the collected auction data as a new "complete scan" with today's date,
-- but only if this was a normal "Full Scan" (not just a "TSM item group" scan).
if Scan.isScanning ~= "group" then
TSM.db.factionrealm.lastCompleteScan = time()
TSM.db.realm.lastCompleteScan = time()
end
-- Process the collected auction data.
@@ -618,6 +618,6 @@ function Scan:ProcessImportedData(auctionData)
end
-- Process the imported auction data as a new "complete scan" with today's date.
TSM.db.factionrealm.lastCompleteScan = time()
TSM.db.realm.lastCompleteScan = time()
TSM.Data:ProcessData(data, nil, verifyNewAlgorithm)
end
@@ -130,11 +130,11 @@ function Config:LoadSearch(container)
tinsert(classes, "")
local lastScanInfo
if TSM.db.factionrealm.lastCompleteScan > 0 then
if TSM.db.factionrealm.lastCompleteScan == TSM.db.factionrealm.appDataUpdate then
lastScanInfo = format(L["Last updated from the TSM Application %s ago."], SecondsToTime(time() - TSM.db.factionrealm.appDataUpdate))
if TSM.db.realm.lastCompleteScan > 0 then
if TSM.db.realm.lastCompleteScan == TSM.db.realm.appDataUpdate then
lastScanInfo = format(L["Last updated from the TSM Application %s ago."], SecondsToTime(time() - TSM.db.realm.appDataUpdate))
else
lastScanInfo = format(L["Last updated from in-game scan %s ago."], SecondsToTime(time() - TSM.db.factionrealm.lastCompleteScan))
lastScanInfo = format(L["Last updated from in-game scan %s ago."], SecondsToTime(time() - TSM.db.realm.lastCompleteScan))
end
else
lastScanInfo = L["No scans found."]
+1 -1
View File
@@ -316,7 +316,7 @@ function Data:ProcessData(scanData, groupItems, verifyNewAlgorithm)
-- item contains a "greater than 0" buyout value. That was mostly
-- necessary in the past, when TSM sloppily included bid-only items
-- in the data, but should no longer be able to happen with our new code!
TSM.data[itemID].lastScan = TSM.db.factionrealm.lastCompleteScan
TSM.data[itemID].lastScan = TSM.db.realm.lastCompleteScan
TSM.data[itemID].minBuyout = data.minBuyout > 0 and data.minBuyout or nil
TSM.data[itemID].quantity = data.quantity -- Counts all items of all stacks.
Data:UpdateMarketValue(TSM.data[itemID])