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
@@ -226,19 +226,19 @@ function Options:DrawWhitelistSettings(container)
value = string.trim(strlower(value or ""))
if value == "" then return TSM:Print(L["No name entered."]) end
if TSM.db.factionrealm.whitelist[value] then
TSM:Printf(L["The player \"%s\" is already on your whitelist."], TSM.db.factionrealm.whitelist[value])
if TSM.db.realm.whitelist[value] then
TSM:Printf(L["The player \"%s\" is already on your whitelist."], TSM.db.realm.whitelist[value])
return
end
for player in pairs(TSM.db.factionrealm.player) do
for player in pairs(TSM.db.realm.player) do
if strlower(player) == value then
TSM:Printf(L["You do not need to add \"%s\", alts are whitelisted automatically."], player)
return
end
end
TSM.db.factionrealm.whitelist[strlower(value)] = value
TSM.db.realm.whitelist[strlower(value)] = value
container:SelectByPath(2)
end
@@ -292,11 +292,11 @@ function Options:DrawWhitelistSettings(container)
},
}
for name in pairs(TSM.db.factionrealm.whitelist) do
for name in pairs(TSM.db.realm.whitelist) do
tinsert(page[1].children[3].children,
{
type = "Label",
text = TSM.db.factionrealm.whitelist[name],
text = TSM.db.realm.whitelist[name],
fontObject = GameFontNormal,
})
tinsert(page[1].children[3].children,
@@ -305,7 +305,7 @@ function Options:DrawWhitelistSettings(container)
text = L["Delete"],
relativeWidth = 0.3,
callback = function(self)
TSM.db.factionrealm.whitelist[name] = nil
TSM.db.realm.whitelist[name] = nil
container:SelectByPath(2)
end,
})
@@ -524,7 +524,7 @@ function Reset:GetAuctionSTRow(record, index)
local function GetSellerText(name)
if TSMAPI:IsPlayer(name) then
return "|cff99ffff" .. name .. "|r"
elseif TSM.db.factionrealm.whitelist[strlower(name)] then
elseif TSM.db.realm.whitelist[strlower(name)] then
return name .. " |cffff2222(" .. L["Whitelist"] .. ")|r"
end
@@ -89,7 +89,7 @@ function Scan:ProcessItem(itemString, auctionItem)
if not itemString or not auctionItem then return end
auctionItem:SetRecordParams({"GetItemBuyout", "GetItemDisplayedBid", "seller", "count"})
auctionItem:PopulateCompactRecords()
auctionItem:SetAlts(TSM.db.factionrealm.player)
auctionItem:SetAlts(TSM.db.realm.player)
if #auctionItem.records > 0 then
auctionItem:SetMarketValue(TSMAPI:GetItemValue(itemString, "DBMarket"))
Scan.auctionData[itemString] = auctionItem
@@ -169,7 +169,7 @@ function Scan:GetLowestAuction(auctionItem, operation)
end
end
end
if owner == "?" and next(TSM.db.factionrealm.whitelist) then
if owner == "?" and next(TSM.db.realm.whitelist) then
invalidSellerEntry = true
end
@@ -182,7 +182,7 @@ function Scan:GetLowestAuction(auctionItem, operation)
local recordBuyout = record:GetItemBuyout()
if not record:IsPlayer() and recordBuyout and recordBuyout == buyout then
isPlayer = nil
if not TSM.db.factionrealm.whitelist[strlower(record.seller)] then
if not TSM.db.realm.whitelist[strlower(record.seller)] then
isWhitelist = nil
end
@@ -192,7 +192,7 @@ function Scan:GetLowestAuction(auctionItem, operation)
end
end
end
if owner == "?" and next(TSM.db.factionrealm.whitelist) then
if owner == "?" and next(TSM.db.realm.whitelist) then
invalidSellerEntry = true
end