diff --git a/ARLFrame.lua b/ARLFrame.lua index 0e3a499..fc03592 100644 --- a/ARLFrame.lua +++ b/ARLFrame.lua @@ -4878,8 +4878,7 @@ function addon:DisplayFrame( mobDB = mList customDB = cList - -- reset current display items - WipeDisplayStrings() + WipeDisplayStrings() -- reset current display items -- get our current profession's index for k, v in pairs(SortedProfessions) do @@ -4892,11 +4891,8 @@ function addon:DisplayFrame( if (not self.Frame) then InitializeFrame() end - -- Set our addon frame position - SetFramePosition() - - -- Initialize dropdown - ARL_DD_Sort.initialize = ARL_DD_Sort_Initialize + SetFramePosition() -- Set our addon frame position + ARL_DD_Sort.initialize = ARL_DD_Sort_Initialize -- Initialize dropdown -- reset the scale self.Frame:SetScale(addon.db.profile.frameopts.uiscale) @@ -4906,21 +4902,14 @@ function addon:DisplayFrame( ARL_ExpandButton:SetText(L["EXPANDALL"]) self:TooltipDisplay(ARL_ExpandButton, L["EXPANDALL_DESC"]) - -- Reset our addon title text - self.resetTitle() - - -- Set the texture on our switcher button correctly - SetSwitcherTexture(SortedProfessions[currentProfIndex].texture) + self.resetTitle() -- Reset our addon title text + SetSwitcherTexture(SortedProfessions[currentProfIndex].texture) -- Set the texture on our switcher button correctly -- Acquire the list, then sort it recipeDB = self:GetRecipeTable() sortedRecipeIndex = SortMissingRecipes(recipeDB) - - -- Take our sorted list, and fill up DisplayStrings - initDisplayStrings() - - -- Update our progressbar - SetProgressBar(cPlayer) + initDisplayStrings() -- Take our sorted list, and fill up DisplayStrings + SetProgressBar(cPlayer) -- Update our progressbar -- And update our scrollframe RecipeList_Update() diff --git a/RecipeDB/ARL-Alchemy.lua b/RecipeDB/ARL-Alchemy.lua index 6ebec1d..3099587 100644 --- a/RecipeDB/ARL-Alchemy.lua +++ b/RecipeDB/ARL-Alchemy.lua @@ -26,12 +26,16 @@ This source code is released under All Rights Reserved. ]]-- -local MODNAME = "Ackis Recipe List" -local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local MODNAME = "Ackis Recipe List" +local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) -local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) +local initialized = false function addon:InitAlchemy(RecipeDB) + if initialized then return end + + initialized = true -- Elixir of Lion's Strength -- 2329 self:addTradeSkill(RecipeDB,2329,1,2454,1,51304) diff --git a/RecipeDB/ARL-Blacksmith.lua b/RecipeDB/ARL-Blacksmith.lua index e169155..85d29bc 100644 --- a/RecipeDB/ARL-Blacksmith.lua +++ b/RecipeDB/ARL-Blacksmith.lua @@ -32,12 +32,16 @@ This source code is released under All Rights Reserved. ]]-- -local MODNAME = "Ackis Recipe List" -local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local MODNAME = "Ackis Recipe List" +local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) -local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) +local initialized = false function addon:InitBlacksmithing(RecipeDB) + if initialized then return end + + initialized = true -- Rough Sharpening Stone -- 2660 self:addTradeSkill(RecipeDB,2660,1,2862,1,2018) diff --git a/RecipeDB/ARL-Cook.lua b/RecipeDB/ARL-Cook.lua index eec0473..783fdb6 100644 --- a/RecipeDB/ARL-Cook.lua +++ b/RecipeDB/ARL-Cook.lua @@ -32,12 +32,16 @@ This source code is released under All Rights Reserved. ]]-- -local MODNAME = "Ackis Recipe List" -local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local MODNAME = "Ackis Recipe List" +local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) -local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) +local initialized = false function addon:InitCooking(RecipeDB) + if initialized then return end + + initialized = true -- Charred Wolf Meat -- 2538 self:addTradeSkill(RecipeDB,2538,1,2679,1,2550) diff --git a/RecipeDB/ARL-Custom.lua b/RecipeDB/ARL-Custom.lua index 5693565..6410152 100644 --- a/RecipeDB/ARL-Custom.lua +++ b/RecipeDB/ARL-Custom.lua @@ -32,12 +32,16 @@ This source code is released under All Rights Reserved. ]]-- -local MODNAME = "Ackis Recipe List" -local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local MODNAME = "Ackis Recipe List" +local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) -local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) +local initialized = false function addon:InitCustom(CustomDB) + if initialized then return end + + initialized = true self:addLookupList(CustomDB,1,L["Custom1"],"N/A") self:addLookupList(CustomDB,2,L["Custom2"],"N/A") diff --git a/RecipeDB/ARL-Enchant.lua b/RecipeDB/ARL-Enchant.lua index f2679f9..2f3f753 100644 --- a/RecipeDB/ARL-Enchant.lua +++ b/RecipeDB/ARL-Enchant.lua @@ -26,12 +26,16 @@ This source code is released under All Rights Reserved. ]]-- -local MODNAME = "Ackis Recipe List" -local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local MODNAME = "Ackis Recipe List" +local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) -local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) +local initialized = false function addon:InitEnchanting(RecipeDB) + if initialized then return end + + initialized = true -- Enchant Bracer - Minor Health -- 7418 self:addTradeSkill(RecipeDB,7418,1,nil,1,7411,nil) diff --git a/RecipeDB/ARL-Engineer.lua b/RecipeDB/ARL-Engineer.lua index 1a272e0..c382a48 100644 --- a/RecipeDB/ARL-Engineer.lua +++ b/RecipeDB/ARL-Engineer.lua @@ -32,12 +32,16 @@ This source code is released under All Rights Reserved. ]]-- -local MODNAME = "Ackis Recipe List" -local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local MODNAME = "Ackis Recipe List" +local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) -local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) +local initialized = false function addon:InitEngineering(RecipeDB) + if initialized then return end + + initialized = true -- Rough Blasting Powder -- 3918 self:addTradeSkill(RecipeDB,3918,1,4357,1,4036) diff --git a/RecipeDB/ARL-FirstAid.lua b/RecipeDB/ARL-FirstAid.lua index 33b456a..9f27b58 100644 --- a/RecipeDB/ARL-FirstAid.lua +++ b/RecipeDB/ARL-FirstAid.lua @@ -26,12 +26,16 @@ This source code is released under All Rights Reserved. ]]-- -local MODNAME = "Ackis Recipe List" -local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local MODNAME = "Ackis Recipe List" +local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) -local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) +local initialized = false function addon:InitFirstAid(RecipeDB) + if initialized then return end + + initialized = true -- Linen Bandage -- 3275 self:addTradeSkill(RecipeDB,3275,1,1251,1,45542,nil,0,1,30,45,60) diff --git a/RecipeDB/ARL-Inscription.lua b/RecipeDB/ARL-Inscription.lua index 6307433..9c5224d 100644 --- a/RecipeDB/ARL-Inscription.lua +++ b/RecipeDB/ARL-Inscription.lua @@ -32,12 +32,16 @@ This source code is released under All Rights Reserved. ]]-- -local MODNAME = "Ackis Recipe List" -local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local MODNAME = "Ackis Recipe List" +local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) -local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) +local initialized = false function addon:InitInscription(RecipeDB) + if initialized then return end + + initialized = true -- Scroll of Stamina -- 45382 self:addTradeSkill(RecipeDB,45382,25,1180,1,45357) diff --git a/RecipeDB/ARL-Jewelcraft.lua b/RecipeDB/ARL-Jewelcraft.lua index a47bc60..5937343 100644 --- a/RecipeDB/ARL-Jewelcraft.lua +++ b/RecipeDB/ARL-Jewelcraft.lua @@ -32,12 +32,16 @@ This source code is released under All Rights Reserved. ]]-- -local MODNAME = "Ackis Recipe List" -local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local MODNAME = "Ackis Recipe List" +local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) -local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) +local initialized = false function addon:InitJewelcrafting(RecipeDB) + if initialized then return end + + initialized = true -- Delicate Copper Wire -- 25255 self:addTradeSkill(RecipeDB,25255,1,20816,1,25229) diff --git a/RecipeDB/ARL-Leatherwork.lua b/RecipeDB/ARL-Leatherwork.lua index 79777c9..a6592cf 100644 --- a/RecipeDB/ARL-Leatherwork.lua +++ b/RecipeDB/ARL-Leatherwork.lua @@ -32,12 +32,16 @@ This source code is released under All Rights Reserved. ]]-- -local MODNAME = "Ackis Recipe List" -local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local MODNAME = "Ackis Recipe List" +local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) -local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) +local initialized = false function addon:InitLeatherworking(RecipeDB) + if initialized then return end + + initialized = true -- Handstitched Leather Boots -- 2149 self:addTradeSkill(RecipeDB,2149,10,2302,1,2108) diff --git a/RecipeDB/ARL-Mob.lua b/RecipeDB/ARL-Mob.lua index 6d5415a..0d635c1 100644 --- a/RecipeDB/ARL-Mob.lua +++ b/RecipeDB/ARL-Mob.lua @@ -32,15 +32,20 @@ This source code is released under All Rights Reserved. ]]-- -local MODNAME = "Ackis Recipe List" -local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local MODNAME = "Ackis Recipe List" +local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) +local BFAC = LibStub("LibBabble-Faction-3.0"):GetLookupTable() +local BZONE = LibStub("LibBabble-Zone-3.0"):GetLookupTable() +local BBOSS = LibStub("LibBabble-Boss-3.0"):GetLookupTable() -local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) -local BFAC = LibStub("LibBabble-Faction-3.0"):GetLookupTable() -local BZONE = LibStub("LibBabble-Zone-3.0"):GetLookupTable() -local BBOSS = LibStub("LibBabble-Boss-3.0"):GetLookupTable() +local initialized = false function addon:InitMob(MobDB) + if initialized then return end + + initialized = true + -- Cities -- Orgrimmar self:addLookupList(MobDB,3320,L["Soran"],BZONE["Orgrimmar"],49.32,70.13) @@ -165,7 +170,7 @@ function addon:InitMob(MobDB) self:addLookupList(MobDB,2376,L["Torn Fin Oracle"],BZONE["Hillsbrad Foothills"],43.83,67.11) self:addLookupList(MobDB,2377,L["Torn Fin Tidehunter"],BZONE["Hillsbrad Foothills"],44.22,66.96) self:addLookupList(MobDB,2407,L["Hulking Mountain Lion"],BZONE["Hillsbrad Foothills"],39.61,23.08) - self:addLookupList(MobDB,14276,L["Scargil"],BZONE["Hillsbrad Foothills"],26.79,70.01) + self:addLookupList(MobDB,14276,L["Scargil"],BZONE["Hillsbrad Foothills"],26.79,70.01) -- Nagrand self:addLookupList(MobDB,17136,L["Boulderfist Warrior"],BZONE["Nagrand"],44.60,42.20) self:addLookupList(MobDB,17150,L["Vir'aani Arcanist"],BZONE["Nagrand"],36.63,67.87) diff --git a/RecipeDB/ARL-Quest.lua b/RecipeDB/ARL-Quest.lua index 68e522f..e0af8b2 100644 --- a/RecipeDB/ARL-Quest.lua +++ b/RecipeDB/ARL-Quest.lua @@ -32,15 +32,20 @@ This source code is released under All Rights Reserved. ]]-- -local MODNAME = "Ackis Recipe List" -local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local MODNAME = "Ackis Recipe List" +local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) -local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) -local BFAC = LibStub("LibBabble-Faction-3.0"):GetLookupTable() -local BZONE = LibStub("LibBabble-Zone-3.0"):GetLookupTable() -local BBOSS = LibStub("LibBabble-Boss-3.0"):GetLookupTable() +local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) +local BFAC = LibStub("LibBabble-Faction-3.0"):GetLookupTable() +local BZONE = LibStub("LibBabble-Zone-3.0"):GetLookupTable() +local BBOSS = LibStub("LibBabble-Boss-3.0"):GetLookupTable() + +local initialized = false function addon:InitQuest(QuestDB) + if initialized then return end + + initialized = true self:addLookupList(QuestDB,22,L["Goretusk Liver Pie"],BZONE["Westfall"],55.77,30.92,1) self:addLookupList(QuestDB,38,L["Westfall Stew"],BZONE["Westfall"],55.77,30.92,1) diff --git a/RecipeDB/ARL-Reputation.lua b/RecipeDB/ARL-Reputation.lua index 7299f8c..6464313 100644 --- a/RecipeDB/ARL-Reputation.lua +++ b/RecipeDB/ARL-Reputation.lua @@ -32,13 +32,17 @@ This source code is released under All Rights Reserved. ]]-- -local MODNAME = "Ackis Recipe List" -local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local MODNAME = "Ackis Recipe List" +local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) +local BFAC = LibStub("LibBabble-Faction-3.0"):GetLookupTable() -local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) -local BFAC = LibStub("LibBabble-Faction-3.0"):GetLookupTable() +local initialized = false function addon:InitReputation(RepDB) + if initialized then return end + + initialized = true self:addLookupList(RepDB,59,BFAC["Thorium Brotherhood"],"N/A") -- Acquire Flag: 98 self:addLookupList(RepDB,270,BFAC["Zandalar Tribe"],"N/A") -- Acquire Flag: 100 diff --git a/RecipeDB/ARL-Runeforge.lua b/RecipeDB/ARL-Runeforge.lua index bea6daa..02bb473 100644 --- a/RecipeDB/ARL-Runeforge.lua +++ b/RecipeDB/ARL-Runeforge.lua @@ -26,12 +26,16 @@ This source code is released under All Rights Reserved. ]]-- -local MODNAME = "Ackis Recipe List" -local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local MODNAME = "Ackis Recipe List" +local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) -local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) +local initialized = false function addon:InitRuneforging(RecipeDB) + if initialized then return end + + initialized = true -- Rune of the Fallen Crusader - 53344 self:addTradeSkill(RecipeDB,53344,1,nil,1,53428,2,1,1,1,2) diff --git a/RecipeDB/ARL-Seasonal.lua b/RecipeDB/ARL-Seasonal.lua index 0b56b96..70f4522 100644 --- a/RecipeDB/ARL-Seasonal.lua +++ b/RecipeDB/ARL-Seasonal.lua @@ -32,14 +32,17 @@ This source code is released under All Rights Reserved. ]]-- -local MODNAME = "Ackis Recipe List" -local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) - -local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) +local MODNAME = "Ackis Recipe List" +local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) local GetCategoryInfo = GetCategoryInfo +local initialized = false function addon:InitSeasons(SeasonDB) + if initialized then return end + + initialized = true local name = "" local seasonal = GetCategoryInfo(155) diff --git a/RecipeDB/ARL-Smelt.lua b/RecipeDB/ARL-Smelt.lua index 58fbe03..42d994f 100644 --- a/RecipeDB/ARL-Smelt.lua +++ b/RecipeDB/ARL-Smelt.lua @@ -26,12 +26,16 @@ This source code is released under All Rights Reserved. ]]-- -local MODNAME = "Ackis Recipe List" -local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local MODNAME = "Ackis Recipe List" +local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) -local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) +local initialized = false function addon:InitSmelting(RecipeDB) + if initialized then return end + + initialized = true -- Smelt Copper -- 2657 self:addTradeSkill(RecipeDB,2657,1,2840,1,32606,nil,0,1,25,47,70) diff --git a/RecipeDB/ARL-Tailor.lua b/RecipeDB/ARL-Tailor.lua index afdb581..20af41e 100644 --- a/RecipeDB/ARL-Tailor.lua +++ b/RecipeDB/ARL-Tailor.lua @@ -32,12 +32,16 @@ This source code is released under All Rights Reserved. ]]-- -local MODNAME = "Ackis Recipe List" -local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local MODNAME = "Ackis Recipe List" +local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) -local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) +local initialized = false function addon:InitTailoring(RecipeDB) + if initialized then return end + + initialized = true -- Brown Linen Vest -- 2385 self:addTradeSkill(RecipeDB,2385,10,2568,1,3908) diff --git a/RecipeDB/ARL-Trainer.lua b/RecipeDB/ARL-Trainer.lua index cd44f63..5075482 100644 --- a/RecipeDB/ARL-Trainer.lua +++ b/RecipeDB/ARL-Trainer.lua @@ -32,15 +32,19 @@ This source code is released under All Rights Reserved. ]]-- -local MODNAME = "Ackis Recipe List" -local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local MODNAME = "Ackis Recipe List" +local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) +local BFAC = LibStub("LibBabble-Faction-3.0"):GetLookupTable() +local BZONE = LibStub("LibBabble-Zone-3.0"):GetLookupTable() +local BBOSS = LibStub("LibBabble-Boss-3.0"):GetLookupTable() -local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) -local BFAC = LibStub("LibBabble-Faction-3.0"):GetLookupTable() -local BZONE = LibStub("LibBabble-Zone-3.0"):GetLookupTable() -local BBOSS = LibStub("LibBabble-Boss-3.0"):GetLookupTable() +local initialized = false function addon:InitTrainer(TrainerDB) + if initialized then return end + + initialized = true self:addLookupList(TrainerDB,223,L["Dan Golthas"],BZONE["Undercity"],71.24,60.40,2) self:addLookupList(TrainerDB,514,L["Smith Argus"],BZONE["Elwynn Forest"],41.94,65.83,1) diff --git a/RecipeDB/ARL-Vendor.lua b/RecipeDB/ARL-Vendor.lua index d3ebe1b..b725747 100644 --- a/RecipeDB/ARL-Vendor.lua +++ b/RecipeDB/ARL-Vendor.lua @@ -32,14 +32,18 @@ This source code is released under All Rights Reserved. ]]-- -local MODNAME = "Ackis Recipe List" -local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local MODNAME = "Ackis Recipe List" +local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME) +local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) +local BZONE = LibStub("LibBabble-Zone-3.0"):GetLookupTable() +local BBOSS = LibStub("LibBabble-Boss-3.0"):GetLookupTable() -local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME) -local BZONE = LibStub("LibBabble-Zone-3.0"):GetLookupTable() -local BBOSS = LibStub("LibBabble-Boss-3.0"):GetLookupTable() +local initialized = false function addon:InitVendor(VendorDB) + if initialized then return end + + initialized = true self:addLookupList(VendorDB,66,L["Tharynn Bouden"],BZONE["Elwynn Forest"],42.20,67.21,1) self:addLookupList(VendorDB,340,L["Kendor Kabonka"],BZONE["Stormwind City"],76.86,52.15,1)