From bfeff68d981ec00a6bb2528deafb4e4aa86c2e07 Mon Sep 17 00:00:00 2001 From: ackis Date: Thu, 26 Mar 2009 18:56:14 +0000 Subject: [PATCH] Remember the tradeskill link when you open up the tradeskill window, will let you scan alts easily down the road with very little work. --- AckisRecipeList.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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 -- 1.7.9.5