AddRecipeAcquire is now gone the way of the dodo.
John Pasula [02-08-11 - 18:30]
AddRecipeAcquire is now gone the way of the dodo.
diff --git a/core.lua b/core.lua
index 036bf62..8c2feb4 100644
--- a/core.lua
+++ b/core.lua
@@ -1117,151 +1117,6 @@ do
-- @param spell_id The [[http://www.wowpedia.org/SpellLink|Spell ID]] of the recipe which acquire methods are being added to
-- @param ... A listing of acquire methods. See [[API/database-documentation]] for a listing of acquire methods and how they work
-- @return None, array is passed as a reference.
- function addon:AddRecipeAcquire(spell_id, ...)
-
- local numvars = select('#', ...) -- Find out how many flags we're adding
- local i = 1 -- Index for which variables we're parsing through
- local recipe_list = private.recipe_list
- local acquire_data = recipe_list[spell_id].acquire_data
-
- while i <= numvars do
- local location, affiliation
-
- local acquire_type, acquire_id = select(i, ...)
- i = i + 2
-
- if not acquire_type then
- self:Debug("Spell ID: %d has no acquire type.", spell_id)
- else
- acquire_data[acquire_type] = acquire_data[acquire_type] or {}
-
- local acquire = acquire_data[acquire_type]
-
- if not acquire_id then
- self:Debug("Spell ID %d: %s ID is nil.", spell_id, private.acquire_strings[acquire_type])
- else
- if acquire_type == A.TRAINER then
- local trainer_list = private.trainer_list
- local trainer = trainer_list[acquire_id]
-
- if not trainer then
- self:Debug("Spell ID "..spell_id..": TrainerID "..acquire_id.." does not exist in the database.")
- else
- acquire[acquire_id] = true
-
- affiliation = trainer.faction
- location = trainer.location
-
- trainer.item_list = trainer.item_list or {}
- trainer.item_list[spell_id] = true
- end
- elseif acquire_type == A.VENDOR then
- local vendor_list = private.vendor_list
- local vendor = vendor_list[acquire_id]
-
- if not vendor then
- self:Debug("Spell ID "..spell_id..": VendorID "..acquire_id.." does not exist in the database.")
- else
- acquire[acquire_id] = true
-
- affiliation = vendor.faction
- location = vendor.location
-
- vendor.item_list = vendor.item_list or {}
- vendor.item_list[spell_id] = true
- end
- elseif acquire_type == A.MOB_DROP then
- local mob_list = private.mob_list
- local mob = mob_list[acquire_id]
-
- if not mob then
- self:Debug("Spell ID "..spell_id..": Mob ID "..acquire_id.." does not exist in the database.")
- else
- acquire[acquire_id] = true
-
- affiliation = mob.faction
- location = mob.location
-
- mob_list[acquire_id].item_list = mob_list[acquire_id].item_list or {}
- mob_list[acquire_id].item_list[spell_id] = true
- end
- elseif acquire_type == A.QUEST then
- local quest_list = private.quest_list
- local quest = quest_list[acquire_id]
-
- if not quest then
- self:Debug("Spell ID "..spell_id..": Quest ID "..acquire_id.." does not exist in the database.")
- else
- acquire[acquire_id] = true
-
- affiliation = quest.faction
- location = quest.location
- end
- elseif acquire_type == A.REPUTATION then
- local vendor_list = private.vendor_list
- local rep_level, vendor_id = select(i, ...)
- i = i + 2
-
- if not private.reputation_list[acquire_id] then
- self:Debug("Spell ID "..spell_id..": ReputationID "..acquire_id.." does not exist in the database.")
- else
- if not vendor_id then
- self:Debug("Spell ID "..spell_id..": Reputation Vendor ID is nil.")
- elseif not vendor_list[vendor_id] then
- self:Debug("Spell ID "..spell_id..": Reputation Vendor ID "..vendor_id.." does not exist in the database.")
- else
- acquire[acquire_id] = acquire[acquire_id] or {}
-
- local faction = acquire[acquire_id]
- faction[rep_level] = faction[rep_level] or {}
- faction[rep_level][vendor_id] = true
-
- local rep_vendor = vendor_list[vendor_id]
-
- affiliation = rep_vendor.faction
- location = rep_vendor.location
-
- rep_vendor.item_list = rep_vendor.item_list or {}
- rep_vendor.item_list[spell_id] = true
- end
- end
- elseif acquire_type == A.WORLD_DROP then
- acquire[acquire_id] = true
- location = type(acquire_id) == "string" and BZ[acquire_id] or nil
-
- if location then
- affiliation = "world_drop"
- else
- addon:Debug("WORLD_DROP with no location: %d %s", spell_id, recipe_list[spell_id].name)
- end
- elseif acquire_type == A.SEASONAL then
- acquire[acquire_id] = true
- elseif acquire_type == A.CUSTOM then
- acquire[acquire_id] = true
- location = private.custom_list[acquire_id].location
- else
- -- Unhandled acquire_type
- acquire[acquire_id] = true
- location = private.acquire_strings[acquire_type] or _G.UNKNOWN
- end
- end -- acquire_id
- acquire_list[acquire_type] = acquire_list[acquire_type] or {}
- acquire_list[acquire_type].recipes = acquire_list[acquire_type].recipes or {}
-
- acquire_list[acquire_type].name = private.acquire_names[acquire_type]
- acquire_list[acquire_type].recipes[spell_id] = affiliation or true
- end -- acquire_type
-
- if location then
- location_list[location] = location_list[location] or {}
- location_list[location].recipes = location_list[location].recipes or {}
-
- location_list[location].name = location
- location_list[location].recipes[spell_id] = affiliation or true
- end
- end -- while
- end
-
local function GenericAddRecipeAcquire(spell_id, acquire_type, type_string, unit_list, ...)
local num_vars = select('#', ...)
local cur_var = 1