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:
@@ -48,7 +48,7 @@ local function GetCommonQueryInfo(name, items)
|
||||
if existingQuery then
|
||||
existingQuery.minLevel = min(existingQuery.minLevel, itemQuery.minLevel)
|
||||
existingQuery.maxLevel = max(existingQuery.maxLevel, itemQuery.maxLevel)
|
||||
existingQuery.quality = min(existingQuery.quality, itemQuery.quality)
|
||||
existingQuery.quality = (existingQuery.quality == itemQuery.quality) and existingQuery.quality or nil
|
||||
if existingQuery.subClass ~= itemQuery.subClass then
|
||||
existingQuery.subClass = nil
|
||||
end
|
||||
@@ -70,7 +70,7 @@ local function GetCommonQueryInfoClass(class, items)
|
||||
local itemQuery = TSMAPI:GetAuctionQueryInfo(items[i])
|
||||
resultQuery.minLevel = min(resultQuery.minLevel, itemQuery.minLevel)
|
||||
resultQuery.maxLevel = max(resultQuery.maxLevel, itemQuery.maxLevel)
|
||||
resultQuery.quality = min(resultQuery.quality, itemQuery.quality)
|
||||
resultQuery.quality = (resultQuery.quality == itemQuery.quality) and resultQuery.quality or nil
|
||||
if resultQuery.subClass ~= itemQuery.subClass then resultQuery.subClass = nil end
|
||||
end
|
||||
resultQuery.items = items
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user