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
+3 -3
View File
@@ -213,7 +213,7 @@ function private:ScanAuctions()
local totalPages = ceil(total / NUM_AUCTION_ITEMS_PER_PAGE)
if private.scanType == "numPages" then
local cacheData = TSM.db.factionrealm.numPagesCache[private.query.cacheKey]
local cacheData = TSM.db.realm.numPagesCache[private.query.cacheKey]
cacheData.lastScan = time()
local confidence = (120 - cacheData.confidence) / (CACHE_DECAY_PER_DAY * 2)
local diff = abs(cacheData.avg - totalPages)
@@ -393,7 +393,7 @@ function TSMAPI.AuctionScan:GetNumPages(query, callbackHandler)
temp[i] = tostring(query[field])
end
local cacheKey = table.concat(temp, "~")
local cacheData = TSM.db.factionrealm.numPagesCache[cacheKey]
local cacheData = TSM.db.realm.numPagesCache[cacheKey]
if cacheData then
local cacheHit
if time() - cacheData.lastScan < CACHE_AUTO_HIT_TIME then
@@ -412,7 +412,7 @@ function TSMAPI.AuctionScan:GetNumPages(query, callbackHandler)
return 2
end
else
TSM.db.factionrealm.numPagesCache[cacheKey] = { avg = 0, confidence = 0, numScans = 0, lastScan = 0 }
TSM.db.realm.numPagesCache[cacheKey] = { avg = 0, confidence = 0, numScans = 0, lastScan = 0 }
end
-- setup the query