Add acquire info to the text dump, all dry-coded so it'll probably blow up.
ackis [01-15-09 - 20:22]
Add acquire info to the text dump, all dry-coded so it'll probably blow up.
diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua
index 5a8ea8c..9f0f049 100644
--- a/AckisRecipeList.lua
+++ b/AckisRecipeList.lua
@@ -2059,7 +2059,7 @@ function addon:GetTextDump(RecipeDB)
-- Add a header to the text table
tinsert(texttable,"Text output of all recipes and acquire information. Output is in the form of comma seperated values.")
- tinsert(texttable,"Spell ID, Recipe Name, Skill Level, ARL Filter Flags, Known")
+ tinsert(texttable,"Spell ID, Recipe Name, Skill Level, ARL Filter Flags, Acquire Methods, Known")
for SpellID in pairs(RecipeDB) do
@@ -2069,7 +2069,7 @@ function addon:GetTextDump(RecipeDB)
-- Find out which flags are marked as "true"
for i=1,MaxFilterIndex,1 do
if (flags[i] == true) then
- tinsert(texttable,i)
+ tinsert(flaglist,i)
end
end
@@ -2078,7 +2078,29 @@ function addon:GetTextDump(RecipeDB)
local acquire = RecipeDB[SpellID]["Acquire"]
local acquirelist = {}
- local acquiretext = tconcat(flaglist,",")
+ for i in pairs(acquire) do
+
+ if (acquire["Type"] == 1) then
+ tinsert(acquirelist,"Trainer")
+ elseif (acquire["Type"] == 2) then
+ tinsert(acquirelist,"Vendor")
+ elseif (acquire["Type"] == 3) then
+ tinsert(acquirelist,"Mob Drop")
+ elseif (acquire["Type"] == 4) then
+ tinsert(acquirelist,"Quest")
+ elseif (acquire["Type"] == 5) then
+ tinsert(acquirelist,"Seasonal")
+ elseif (acquire["Type"] == 6) then
+ tinsert(acquirelist,"Reputation")
+ elseif (acquire["Type"] == 7) then
+ tinsert(acquirelist,"World Drop")
+ elseif (acquire["Type"] == 8) then
+ tinsert(acquirelist,"Custom")
+ end
+
+ end
+
+ local acquiretext = tconcat(acquirelist,",")
if (RecipeDB[SpellID]["Known"]) then
tinsert(texttable,SpellID .. "," .. RecipeDB[SpellID]["Name"] .. "," .. RecipeDB[SpellID]["Level"] .. ",[" .. flagtext .. "],[" .. acquiretext .. "],true")
diff --git a/Docs/Main.txt b/Docs/Main.txt
index bdb6e04..be8433d 100644
--- a/Docs/Main.txt
+++ b/Docs/Main.txt
@@ -21,14 +21,14 @@ Please use the [http://www.wowace.com/projects/arl/tickets/ WoW Ace] tracker to
Please use the [http://www.wowace.com/projects/arl/tickets/ WoW Ace] tracker to add suggestions and feature requests.
==Integration==
-Ackis Recipe List strives to integrate with existing trade skill mods out there. If you have a request for integration, please submit a feature request at [http://www.wowace.com/projects/arl/tickets/ WoW Ace].
+Ackis Recipe List strives to integrate with existing trade skill mods out there. If you have a request for integration, please submit a feature request at [http://www.wowace.com/projects/arl/tickets/ WoW Ace]. There is a limted API documented at [http://www.wowace.com/projects/arl/pages/API/] to interface with the ARL database. If you are a developer and would like more functions, please contact me on IRC.
==Bug Reporting==
Please use the [http://www.wowace.com/projects/arl/tickets/ WoW Ace] tracker to file bug reports.
==Detailed Documentation==
* Detailed documentation - [http://www.wowace.com/projects/arl/pages/database-documentation/]
-* API - http://www.wowace.com/projects/arl/pages/API/
+* API - [http://www.wowace.com/projects/arl/pages/API/]
==Acknowledgments==
* Ideas for the mod came from FGTradeLacker (original mod no longer updated, however someone has taken over updating the recipes for it).