From 4d4fe32cb1b384c951bfaa5e2b87f22630346726 Mon Sep 17 00:00:00 2001 From: John Pasula Date: Mon, 7 Mar 2011 11:07:59 -0700 Subject: [PATCH] Add the faction differentiation for the cooking recipes just to alleviate tickets. We need a better solution overall. --- Database/Cooking.lua | 89 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 63 insertions(+), 26 deletions(-) diff --git a/Database/Cooking.lua b/Database/Cooking.lua index 093907d..6d93bbd 100644 --- a/Database/Cooking.lua +++ b/Database/Cooking.lua @@ -924,31 +924,6 @@ function addon:InitCooking() recipe:AddFilters(F.ALLIANCE, F.HORDE, F.SEASONAL, F.IBOE, F.RBOP, F.HEALER, F.CASTER) recipe:AddSeason(6) - -- Candied Sweet Potato -- 66034 -- TORHAL: Add the strict faction flag thing to this recipe. - recipe = AddRecipe(66034, 270, 44839, Q.COMMON, V.WOTLK, 270, 270, 282, 295) - recipe:AddFilters(F.HORDE, F.SEASONAL, F.IBOE, F.RBOP) - recipe:AddSeason(5) - - -- Cranberry Chutney -- 66035 -- TORHAL: Add the strict faction flag thing to this recipe. - recipe = AddRecipe(66035, 210, 44840, Q.COMMON, V.WOTLK, 210, 210, 222, 235) - recipe:AddFilters(F.HORDE, F.SEASONAL, F.IBOE, F.RBOP, F.HEALER, F.CASTER) - recipe:AddSeason(5) - - -- Pumpkin Pie -- 66036 -- TORHAL: Add the strict faction flag thing to this recipe. - recipe = AddRecipe(66036, 100, 44839, Q.COMMON, V.WOTLK, 100, 150, 162, 175) - recipe:AddFilters(F.HORDE, F.SEASONAL, F.IBOE, F.RBOP, F.HEALER, F.CASTER) - recipe:AddSeason(5) - - -- Slow-Roasted Turkey -- 66037 -- TORHAL: Add the strict faction flag thing to this recipe. - recipe = AddRecipe(66037, 330, 44839, Q.COMMON, V.WOTLK, 330, 330, 342, 355) - recipe:AddFilters(F.HORDE, F.SEASONAL, F.IBOE, F.RBOP, F.DPS) - recipe:AddSeason(5) - - -- Spice Bread Stuffing -- 66038 -- TORHAL: Add the strict faction flag thing to this recipe. - recipe = AddRecipe(66038, 90, 44837, Q.COMMON, V.WOTLK, 90, 90, 102, 115) - recipe:AddFilters(F.HORDE, F.SEASONAL, F.IBOE, F.RBOE) - recipe:AddSeason(5) - -- Baked Rockfish -- 88003 recipe = AddRecipe(88003, 500, 62661, Q.UNCOMMON, V.CATA, 500, 515, 520, 525) recipe:AddFilters(F.ALLIANCE, F.HORDE, F.VENDOR, F.IBOE, F.RBOP) @@ -1119,5 +1094,67 @@ function addon:InitCooking() recipe:AddFilters(F.ALLIANCE, F.HORDE, F.VENDOR, F.IBOE, F.RBOP) recipe:AddVendor(49701, 49737) + -- Some recipes are only availible to specific factions. + -- We only add the faction specific recipes if the user is part of that faction + local BFAC = LibStub("LibBabble-Faction-3.0"):GetLookupTable() + local _,faction = UnitFactionGroup("player") + + if faction == BFAC["Alliance"] then + + -- Candied Sweet Potato -- 62051 -- TORHAL: Add the strict faction flag thing to this recipe. + recipe = AddRecipe(62051, 270, 44839, Q.COMMON, V.WOTLK, 270, 270, 282, 295) + recipe:AddFilters(F.HORDE, F.SEASONAL, F.IBOE, F.RBOP) + recipe:AddSeason(5) + + -- Cranberry Chutney -- 62049 -- TORHAL: Add the strict faction flag thing to this recipe. + recipe = AddRecipe(62049, 210, 44840, Q.COMMON, V.WOTLK, 210, 210, 222, 235) + recipe:AddFilters(F.HORDE, F.SEASONAL, F.IBOE, F.RBOP, F.HEALER, F.CASTER) + recipe:AddSeason(5) + + -- Pumpkin Pie -- 62044 -- TORHAL: Add the strict faction flag thing to this recipe. + recipe = AddRecipe(62044, 100, 44839, Q.COMMON, V.WOTLK, 100, 150, 162, 175) + recipe:AddFilters(F.HORDE, F.SEASONAL, F.IBOE, F.RBOP, F.HEALER, F.CASTER) + recipe:AddSeason(5) + + -- Slow-Roasted Turkey -- 62045 -- TORHAL: Add the strict faction flag thing to this recipe. + recipe = AddRecipe(62045, 330, 44839, Q.COMMON, V.WOTLK, 330, 330, 342, 355) + recipe:AddFilters(F.HORDE, F.SEASONAL, F.IBOE, F.RBOP, F.DPS) + recipe:AddSeason(5) + + -- Spice Bread Stuffing -- 62050 -- TORHAL: Add the strict faction flag thing to this recipe. + recipe = AddRecipe(62050, 90, 44837, Q.COMMON, V.WOTLK, 90, 90, 102, 115) + recipe:AddFilters(F.HORDE, F.SEASONAL, F.IBOE, F.RBOE) + recipe:AddSeason(5) + + elseif faction == BFAC["Horde"] then + + -- Candied Sweet Potato -- 66034 -- TORHAL: Add the strict faction flag thing to this recipe. + recipe = AddRecipe(66034, 270, 44839, Q.COMMON, V.WOTLK, 270, 270, 282, 295) + recipe:AddFilters(F.HORDE, F.SEASONAL, F.IBOE, F.RBOP) + recipe:AddSeason(5) + + -- Cranberry Chutney -- 66035 -- TORHAL: Add the strict faction flag thing to this recipe. + recipe = AddRecipe(66035, 210, 44840, Q.COMMON, V.WOTLK, 210, 210, 222, 235) + recipe:AddFilters(F.HORDE, F.SEASONAL, F.IBOE, F.RBOP, F.HEALER, F.CASTER) + recipe:AddSeason(5) + + -- Pumpkin Pie -- 66036 -- TORHAL: Add the strict faction flag thing to this recipe. + recipe = AddRecipe(66036, 100, 44839, Q.COMMON, V.WOTLK, 100, 150, 162, 175) + recipe:AddFilters(F.HORDE, F.SEASONAL, F.IBOE, F.RBOP, F.HEALER, F.CASTER) + recipe:AddSeason(5) + + -- Slow-Roasted Turkey -- 66037 -- TORHAL: Add the strict faction flag thing to this recipe. + recipe = AddRecipe(66037, 330, 44839, Q.COMMON, V.WOTLK, 330, 330, 342, 355) + recipe:AddFilters(F.HORDE, F.SEASONAL, F.IBOE, F.RBOP, F.DPS) + recipe:AddSeason(5) + + -- Spice Bread Stuffing -- 66038 -- TORHAL: Add the strict faction flag thing to this recipe. + recipe = AddRecipe(66038, 90, 44837, Q.COMMON, V.WOTLK, 90, 90, 102, 115) + recipe:AddFilters(F.HORDE, F.SEASONAL, F.IBOE, F.RBOE) + recipe:AddSeason(5) + + end + return num_recipes -end + +end \ No newline at end of file -- 1.7.9.5