From 5020a252524c34b2933d744b16aba54e0cc22844 Mon Sep 17 00:00:00 2001 From: ackis Date: Tue, 21 Apr 2009 21:29:20 +0000 Subject: [PATCH] Fix dry-coding errors. --- ARLFrame.lua | 10 +++++----- AckisRecipeList.lua | 35 +++++++++++++++-------------------- 2 files changed, 20 insertions(+), 25 deletions(-) diff --git a/ARLFrame.lua b/ARLFrame.lua index dfe4f9c..b31b655 100644 --- a/ARLFrame.lua +++ b/ARLFrame.lua @@ -1414,7 +1414,7 @@ function addon.numFilters() -- IMPORTANT: If the number of filters we're maintaining changes, you'll need to change the FilterValueMap -- at the end (of CreateFrame), as well as the following index value: - local MaxFilters = 90 + local MaxFilters = 92 local total = 0 local active = 0 @@ -3472,10 +3472,10 @@ function addon:CreateFrame( HonorHold_Thrallmar_FactionText = BFAC["Honor Hold"] Kurenai_Maghar_FactionText = BFAC["Kurenai"] Vanguard_Expedition_FactionText = BFAC["Alliance Vanguard"] - SilverConv_Sunreaver_FactionText = BFAC["The Silver Convenant"] + SilverConv_Sunreaver_FactionText = BFAC["The Silver Covenant"] Valiance_Warsong_FactionText = BFAC["Valiance Expedition"] Frostborn_Taunka_FactionText = BFAC["The Frostborn"] - Explorer_Hand_FactionText = BFAC["Explorer's League"] + Explorer_Hand_FactionText = BFAC["Explorers' League"] else HonorHold_Thrallmar_FactionText = BFAC["Thrallmar"] Kurenai_Maghar_FactionText = BFAC["The Mag'har"] @@ -4420,8 +4420,8 @@ function addon:CreateFrame( [90] = { cb = ARL_MageCB, svroot = filterdb.classes, svval = "mage" }, [91] = { cb = ARL_PaladinCB, svroot = filterdb.classes, svval = "paladin" }, [92] = { cb = ARL_PriestCB, svroot = filterdb.classes, svval = "priest" }, - [93] = { cb = ARL_RogueCB, svroot = filterdb.classes, svval = "rogue" }, - [94] = { cb = ARL_ShamanCB, svroot = filterdb.classes, svval = "shaman" }, + [81] = { cb = ARL_RogueCB, svroot = filterdb.classes, svval = "rogue" }, + [83] = { cb = ARL_ShamanCB, svroot = filterdb.classes, svval = "shaman" }, [78] = { cb = ARL_WarlockCB, svroot = filterdb.classes, svval = "warlock" }, [1] = { cb = ARL_WarriorCB, svroot = filterdb.classes, svval = "warrior" }, -- Obtain Options diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua index 7d3dc8b..bf6dcbe 100644 --- a/AckisRecipeList.lua +++ b/AckisRecipeList.lua @@ -641,8 +641,7 @@ function addon:addTradeSkill(RecipeDB, SpellID, SkillLevel, ItemID, Rarity, Prof RecipeDB[SpellID]["Flags"] = {} -- Set all the flags to be false, will also set the padding spaces to false as well. - -- MaxFilterIndex == 130 - for i=1,130,1 do + for i=1,127,1 do RecipeDB[SpellID]["Flags"][i] = false end @@ -898,14 +897,11 @@ do [120] = repdb.kaluak, [121] = repdb.oracles, [122] = repdb.wyrmrest, - [123] = repdb.wrathcommon2, - - [125] = repdb.explorersleague, - [126] = repdb.wrathcommon3, - [127] = repdb.handofvengeance, - [128] = repdb.taunka, - - [130] = repdb.wrathcommon1, + [123] = repdb.wrathcommon1, + [124] = repdb.wrathcommon2, + [125] = repdb.wrathcommon3, + [126] = repdb.wrathcommon4, + [127] = repdb.wrathcommon5, } end @@ -2240,8 +2236,7 @@ function addon:GetTextDump(RecipeDB, profession) local flags = RecipeDB[SpellID]["Flags"] -- Find out which flags are marked as "true" - -- MaxFilterIndex == 130 - for i=1,130,1 do + for i=1,127,1 do if (flags[i] == true) then tinsert(texttable,i) tinsert(texttable,",") @@ -2609,19 +2604,19 @@ do flagstr = flagstr .. "Wyrm," end if (flags[123] == true) then - flagstr = flagstr .. "Silver Conv/Sunreaver," + flagstr = flagstr .. "Wrath Common Factions (The Silver Convenant/The Sunreavers)," + end + if (flags[124] == true) then + flagstr = flagstr .. "Wrath Common Factions (Explorer's League/Hand of Vengance)," end if (flags[125] == true) then - flagstr = flagstr .. "Explorer's/Hand of Veng," + flagstr = flagstr .. "Wrath Common Factions(Explorer's League/Valiance Expedition)," end if (flags[126] == true) then - flagstr = flagstr .. "Valiance/Warsong Offensive," - end - if (flags[128] == true) then - flagstr = flagstr .. "Taunka/Frostborn," + flagstr = flagstr .. "TWrath Common Factions (The Frostborn/The Taunka)," end - if (flags[130] == true) then - flagstr = flagstr .. "AV/HE," + if (flags[127] == true) then + flagstr = flagstr .. "Wrath Common Factions (Alliance Vanguard/Horde Expedition)," end self:Print("Reps: " .. flagstr) -- 1.7.9.5