From 73d39f0e4a6ac16162114b9b3b247a74c4b8d3fd Mon Sep 17 00:00:00 2001 From: ackis Date: Tue, 24 Feb 2009 20:32:44 +0000 Subject: [PATCH] If you're filtering factions don't show opposite factions on the world map (This will probably blow up but meh). (Ticket 396) --- ARLFrame.lua | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/ARLFrame.lua b/ARLFrame.lua index ee4d492..cbac1cf 100644 --- a/ARLFrame.lua +++ b/ARLFrame.lua @@ -346,6 +346,7 @@ do local icontext = "Interface\\AddOns\\AckisRecipeList\\img\\enchant_up" + -- Get the proper icon to put on the mini-map for i,k in pairs(SortedProfessions) do if (k["name"] == playerData.playerProfession) then icontext = "Interface\\AddOns\\AckisRecipeList\\img\\" .. k["texture"] .. "_up" @@ -362,9 +363,10 @@ do if ((recipeDB[recipeIndex]["Display"] == true) and (recipeDB[recipeIndex]["Search"] == true)) then -- loop through acquire methods, display each for k, v in pairs(recipeDB[recipeIndex]["Acquire"]) do - -- Vendor + -- If it's a vendor check to see if we're displaying it if (v["Type"] == 2) then - maplist[v["ID"]] = true + local display = CheckDisplayFaction(addon.db.profile.filters, trainerDB[v["ID"]]["Faction"]) + maplist[v["ID"]] = display end end end @@ -2231,21 +2233,13 @@ end local function CheckDisplayFaction(filterDB, faction) if (filterDB.general.faction ~= true) then - if ((faction == BFAC[myFaction]) or (faction == BFAC["Neutral"]) or (faction == nil)) then - return true - else - return false - end - else - return true - end end -- 1.7.9.5