Remember the tradeskill link when you open up the tradeskill window, will let you scan alts easily down the road with very little work.
ackis [03-26-09 - 18:56]
Remember the tradeskill link when you open up the tradeskill window, will let you scan alts easily down the road with very little work.
diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua
index d780d3d..5e25292 100644
--- a/AckisRecipeList.lua
+++ b/AckisRecipeList.lua
@@ -96,6 +96,8 @@ local GetNumFactions = GetNumFactions
local GetFactionInfo = GetFactionInfo
local CollapseFactionHeader = CollapseFactionHeader
local ExpandFactionHeader = ExpandFactionHeader
+local GetTradeSkillListLink = GetTradeSkillListLink
+local UnitName = UnitName
local select = select
local format = format
@@ -132,6 +134,9 @@ function addon:OnInitialize()
local defaults = {
profile = {
+ -- Saving alts tradeskills
+ tradeskills = {},
+
-- Frame options
frameopts = {
offsetx = 0,
@@ -366,6 +371,19 @@ end
function addon:TRADE_SKILL_SHOW()
+ -- Create an entry in the db to track alt trade skills
+ local pname,prealm = UnitName("player")
+ local tradelink = GetTradeSkillListLink()
+
+ if (tradelink) then
+ if (not addon.db.profile.tradeskills[prealm]) then
+ addon.db.profile.tradeskills[prealm] = {}
+ addon.db.profile.tradeskills[prealm][pname] = tradelink
+ else
+ addon.db.profile.tradeskills[prealm][pname] = tradelink
+ end
+ end
+
addon:OpenTradeWindow()
if (addon.ScanButton and not Skillet) then