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:
@@ -130,7 +130,7 @@ function Config:LoadInventoryViewer(container)
|
||||
filters.characters[name] = true
|
||||
end
|
||||
for name in pairs(TSM.guilds) do
|
||||
if not TSM.db.factionrealm.ignoreGuilds[name] then
|
||||
if not TSM.db.realm.ignoreGuilds[name] then
|
||||
guildList[name] = name
|
||||
filters.guilds[name] = true
|
||||
end
|
||||
@@ -315,12 +315,12 @@ function Config:LoadOptions(container)
|
||||
{
|
||||
type = "Dropdown",
|
||||
label = L["Guilds (Guild Banks) to Ignore:"],
|
||||
value = TSM.db.factionrealm.ignoreGuilds,
|
||||
value = TSM.db.realm.ignoreGuilds,
|
||||
list = guildList,
|
||||
relativeWidth = 0.49,
|
||||
multiselect = true,
|
||||
callback = function(_, _, key, value)
|
||||
TSM.db.factionrealm.ignoreGuilds[key] = value
|
||||
TSM.db.realm.ignoreGuilds[key] = value
|
||||
end,
|
||||
tooltip = L["Select guilds to ingore in ItemTracker. Inventory will still be tracked but not displayed or taken into consideration by Itemtracker."],
|
||||
},
|
||||
|
||||
@@ -19,7 +19,7 @@ local savedDBDefaults = {
|
||||
},
|
||||
|
||||
-- data that is stored per realm/faction combination
|
||||
factionrealm = {
|
||||
realm = {
|
||||
characters = {},
|
||||
guilds = {},
|
||||
ignoreGuilds = {},
|
||||
@@ -58,13 +58,13 @@ function TSM:OnInitialize()
|
||||
|
||||
-- load the saved variables table into TSM.db
|
||||
TSM.db = LibStub:GetLibrary("AceDB-3.0"):New("TradeSkillMaster_ItemTrackerDB", savedDBDefaults, true)
|
||||
TSM.characters = TSM.db.factionrealm.characters
|
||||
TSM.guilds = TSM.db.factionrealm.guilds
|
||||
TSM.characters = TSM.db.realm.characters
|
||||
TSM.guilds = TSM.db.realm.guilds
|
||||
|
||||
-- handle connected realms for characters
|
||||
local connectedRealms = TSMAPI.GetConnectedRealms and TSMAPI:GetConnectedRealms() or {}
|
||||
for _, realm in ipairs(connectedRealms) do
|
||||
local connectedRealmData = TSM.db.sv.factionrealm[TSM.db.keys.faction.." - "..realm]
|
||||
local connectedRealmData = TSM.db.sv.realm[TSM.db.keys.faction.." - "..realm]
|
||||
if connectedRealmData and connectedRealmData.characters then
|
||||
for player, data in pairs(connectedRealmData.characters) do
|
||||
TSM.characters[player.."-"..realm] = data
|
||||
@@ -193,7 +193,7 @@ function TSM:GetTooltip(itemString)
|
||||
end
|
||||
|
||||
for name, data in pairs(TSM.guilds) do
|
||||
if not TSM.db.factionrealm.ignoreGuilds[name] then
|
||||
if not TSM.db.realm.ignoreGuilds[name] then
|
||||
local gbank = data.items[itemString] or 0
|
||||
grandTotal = grandTotal + gbank
|
||||
|
||||
@@ -214,25 +214,25 @@ function TSM:GetTooltip(itemString)
|
||||
end
|
||||
|
||||
function TSM:OnTSMDBShutdown()
|
||||
TSM.db.factionrealm.characters = {}
|
||||
TSM.db.realm.characters = {}
|
||||
local faction = TSM.db.keys.faction
|
||||
for name, playerData in pairs(TSM.characters) do
|
||||
local player, realm = ("-"):split(name)
|
||||
if realm and realm ~= "" then
|
||||
local factionrealm = faction.." - "..realm
|
||||
for key, data in pairs(TSM.db.sv.factionrealm) do
|
||||
if key == factionrealm then
|
||||
local realm = faction.." - "..realm
|
||||
for key, data in pairs(TSM.db.sv.realm) do
|
||||
if key == realm then
|
||||
data[player] = playerData
|
||||
break
|
||||
end
|
||||
end
|
||||
else
|
||||
TSM.db.factionrealm.characters[player] = playerData
|
||||
TSM.db.realm.characters[player] = playerData
|
||||
end
|
||||
end
|
||||
|
||||
-- not yet handling guilds for connected realms
|
||||
TSM.db.factionrealm.guilds = TSM.guilds
|
||||
TSM.db.realm.guilds = TSM.guilds
|
||||
end
|
||||
|
||||
function TSM:UpdatePlayerLookup()
|
||||
@@ -281,7 +281,7 @@ end
|
||||
|
||||
function TSM:GetGuildBank(guild)
|
||||
guild = guild or TSM.CURRENT_GUILD
|
||||
if not guild or not TSM.guilds[guild] or TSM.db.factionrealm.ignoreGuilds[guild] then return end
|
||||
if not guild or not TSM.guilds[guild] or TSM.db.realm.ignoreGuilds[guild] then return end
|
||||
return TSM.guilds[guild].items
|
||||
end
|
||||
|
||||
@@ -313,7 +313,7 @@ end
|
||||
function TSM:GetGuildTotal(itemString)
|
||||
local guildTotal = 0
|
||||
for guild, data in pairs(TSM.guilds) do
|
||||
if not TSM.db.factionrealm.ignoreGuilds[guild] then
|
||||
if not TSM.db.realm.ignoreGuilds[guild] then
|
||||
guildTotal = guildTotal + (data.items[itemString] or 0)
|
||||
end
|
||||
end
|
||||
@@ -333,7 +333,7 @@ function TSM:GetPlayerGuildTotal(itemString, player)
|
||||
player = TSM.playerLookup[player] or player
|
||||
if not player or not TSM.characters[player] then return end
|
||||
local guild = TSM.characters[player].guild
|
||||
if not guild or not TSM.guilds[guild] or TSM.db.factionrealm.ignoreGuilds[guild] then return end
|
||||
if not guild or not TSM.guilds[guild] or TSM.db.realm.ignoreGuilds[guild] then return end
|
||||
|
||||
return TSM.guilds[guild].items[itemString]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user