Ackis Recipe List:
Ackis [10-27-08 - 19:51]
Ackis Recipe List:
- Remove L["Unknown"] = "Unknown Drop: The drop location of this recipe is unknown. Please contribute by posting on the Ackis Recipe List thread at www.wowace.com/forums"
- Add a function to get the locations for the recipe, just does trainers now, will have to test and extend
- Dry-coded (Compiles with luac -p)
diff --git a/ARLDataminer.rb b/ARLDataminer.rb
index f96e6b6..7ede8ce 100644
--- a/ARLDataminer.rb
+++ b/ARLDataminer.rb
@@ -9,6 +9,7 @@ Datamining for all of AckisRecipeList
$Date: $
$Rev: $
$Rev: 962 $
+@project-revision@
****************************************************************************************
diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua
index c075388..a52da6d 100644
--- a/AckisRecipeList.lua
+++ b/AckisRecipeList.lua
@@ -90,6 +90,7 @@ local pairs = pairs
local table = table
local next = next
local tremove = table.remove
+local tconcat = table.concat
local tsort = table.sort
local tinsert = table.insert
local sfind = string.find
@@ -503,6 +504,7 @@ function addon:addTradeSkill(RecipeDB, SpellID, SkillLevel, ItemID, Rarity, Prof
RecipeDB[SpellID]["ItemID"] = ItemID or nil
RecipeDB[SpellID]["Rarity"] = Rarity
RecipeDB[SpellID]["Profession"] = GetSpellInfo(Profession)
+ RecipeDB[SpellID]["Locations"] = nil
-- Get the recipe link from the spell ID
local spellLink = GetSpellLink(SpellID)
@@ -639,6 +641,10 @@ function addon:addLookupList(DB, ID, Name, Loc, Coordx, Coordy, Faction)
DB[ID]["Location"] = Loc
+ else
+
+ DB[ID]["Location"] = L["Unknown Zone"]
+
end
if (Coordx) and (Coordy) then
@@ -1326,6 +1332,46 @@ do
local playerData = nil
local tradewindowopened = false
+ local locationlist = nil
+
+ -- Description: Determines all the locations a given recipe can be obtained
+ -- Expected result: Listing of all locations for a given recipe are provided.
+ -- Input: Spell ID for the recipe we want to get information for
+ -- Output: Listing of all locations ofr a given recipe
+
+ function addon:GetRecipeLocations(SpellID)
+
+ if (RecipeList) and (RecipeList[SpellID]) then
+
+ locationlist = {}
+
+ local recipeacquire = RecipeList[SpellID]["Acquire"]
+
+ for i in pairs(recipeacquire) do
+
+ -- Trainer
+ if (recipeacquire[i]["Type"] == 1) then
+
+ if (TrainerList) then
+
+ -- Add the location to the list
+ tinsert(locationlist,TrainerList[recipeacquire[i]["ID"]]["Location"])
+
+ end
+
+ end
+
+ end
+
+ return tconcat(locationlist,",")
+
+ else
+
+ return nil
+
+ end
+
+ end
-- Description: Toggles the flag that a trade window is opened
-- Expected result: Flag is toggled on
@@ -1582,7 +1628,6 @@ do
end
-
-- Description: API for external addons to get recipe information from ARL
-- Expected result: The recipe information is returned if it exists
-- Input: The spellID of the recipe.
@@ -1833,6 +1878,6 @@ function addon:GetTextDump(RecipeDB)
end
- return table.concat(texttable,"\n")
+ return tconcat(texttable,"\n")
end
diff --git a/AckisRecipeList.toc b/AckisRecipeList.toc
index 4072c47..dbf02fb 100644
--- a/AckisRecipeList.toc
+++ b/AckisRecipeList.toc
@@ -19,7 +19,7 @@
## Interface: 30000
## Version: Beta 6 r962
-## X-Revision: $Rev$
+## X-Revision: @project-revision@ $Rev$
## X-Date: $Date$
## X-credits: FGWarmonger, Kagaro, Speeddymon, Xinhuan
diff --git a/Locals/ARLLocals-enUS.lua b/Locals/ARLLocals-enUS.lua
index 8bf92d9..97ba718 100644
--- a/Locals/ARLLocals-enUS.lua
+++ b/Locals/ARLLocals-enUS.lua
@@ -269,7 +269,6 @@ L["SpellIDCache"] = "Spell ID: %s is not in your local cache. Please submit a t
L["NoItemLink"] = "This item does not have an item link or it was not in your cache."
-- Drop Obtain Info
-L["Unknown"] = "Unknown Drop: The drop location of this recipe is unknown. Please contribute by posting on the Ackis Recipe List thread at www.wowace.com/forums"
L["Unknown Zone"] = true
-- Special Event information