Add unitisenemy back in, rewrite the trainer function a bit to make it output in a better format, and update locales.
ackis [04-17-09 - 21:07]
Add unitisenemy back in, rewrite the trainer function a bit to make it output in a better format, and update locales.
diff --git a/ARLDatamine.lua b/ARLDatamine.lua
index d36962d..8029b06 100644
--- a/ARLDatamine.lua
+++ b/ARLDatamine.lua
@@ -69,10 +69,13 @@ end
-- @return Does a comparison of the information in your internal ARL database, and those items which are availible on the trainer. Compares the acquire information of the ARL database with what is availible on the trainer.
function addon:ScanTrainerData()
- --if (UnitExists("target") and (not UnitIsPlayer("target")) and (not UnitIsEnemy("target"))) then
- if (UnitExists("target") and (not UnitIsPlayer("target"))) then
- local targetID = tonumber(string.sub(UnitGUID("target"),-12,-7),16)
+ -- Make sure the target exists and is a NPC
+ if (UnitExists("target") and (not UnitIsPlayer("target")) and (not UnitIsEnemy("player", "target"))) then
+
+ -- Get its name
local targetname = UnitName("target")
+ -- Get the NPC ID
+ local targetID = tonumber(string.sub(UnitGUID("target"),-12,-7),16)
-- Are we at a trade skill trainer?
if (IsTradeskillTrainer()) then
@@ -85,6 +88,8 @@ function addon:ScanTrainerData()
local name = GetTrainerServiceInfo(i)
t[name] = true
end
+ -- Dump out trainer info
+ self:Print(L["DATAMINER_TRAINER_INFO"]:format(targetname, targetID))
-- Get internal database
local recipelist = addon:GetRecipeTable()
for i in pairs(recipelist) do
@@ -102,7 +107,7 @@ function addon:ScanTrainerData()
end
end
if (not found) then
- self:Print("Trainer teaches " .. i_name .. " but this is not listed as a trainer for the recipe.")
+ self:Print(L["DATAMINER_TRAINER_TEACH"]:format(i_name))
end
-- Trainer does not teach this recipe
else
@@ -116,7 +121,7 @@ function addon:ScanTrainerData()
end
end
if (found) then
- self:Print("Trainer does not teach " .. i_name .. " but this is listed as a trainer for the recipe.")
+ self:Print(L["DATAMINER_TRAINER_NOTTEACH"]:format(i_name))
end
end
end
@@ -124,7 +129,7 @@ function addon:ScanTrainerData()
self:Print(L["DATAMINER_SKILLLEVEL_ERROR"])
end
else
-
+ self:Print(L["DATAMINER_TRAINER_NOTTARGETTED"])
end
end
diff --git a/Locals/testdeDE.lua b/Locals/testdeDE.lua
index 6f4f8f1..a6b08ac 100644
--- a/Locals/testdeDE.lua
+++ b/Locals/testdeDE.lua
@@ -1601,3 +1601,13 @@ L["Northern Cooking"] = true
L["Custom40"] = "Discovered randomly by reading the Book of Glyph Mastery."
L["Clamlette Surprise"] = true
+L["DATAMINER_SKILLELVEL"] = [[Recipe level different!
+ Name: %s
+ ARL Level: %s
+ Trainer Level: %s]]
+L["DATAMINER_SKILLLEVEL_ERROR"] = "This can only be used for a trade skill trainer. Please open up the trainer and try again."
+L["DATAMINER_TRAINER_NOTTARGETTED"] = "You must target the trainer when you run this command."
+L["DATAMINER_TRAINER_INFO"] = [[Trainer Name: %s
+Trainer ID: %s]]
+L["DATAMINER_TRAINER_TEACH"] = "Missing entry for %s"
+L["DATAMINER_TRAINER_NOTTEACH"] = "Extra entry for %s"
diff --git a/Locals/testenUS.lua b/Locals/testenUS.lua
index ff90c75..e084e36 100644
--- a/Locals/testenUS.lua
+++ b/Locals/testenUS.lua
@@ -90,49 +90,49 @@ L["EXCLUSION_ISSUES_DESC"] = "To add a recipe to the exclusion (ignore) list, ju
L["Map Issues"] = true
L["MAP_ISSUES_DESC"] = "ARL relies on TomTom to add icons and waypoints to the World Map and the Mini-map. You can customize these by going to the ARL configuration menu and scrolling to the display options. If you do not have TomTom installed, nothing will be added. Auto-adding icons is disabled by default."
L["Game Commands"] = true
-L["GAME_COMMANDS_DESC"] = [["===Command Line===
-Ackis Recipe List has recently changed to use a GUI for change parameters. Type <code>/arl</code> to open up the GUI. Acceptable commands include:
-* <code>/arl about</code>
-** Opens up the about panel, listing information about the mod.
-* <code>/arl sort</code> or <code>/arl sorting</code>
-** Opens up the sorting options.
-* <code>/arl documentation</code>
-** Opens up in-game documentation regarding ARL.
-* <code>/arl display</code>
-** Opens up display options.
-* <code>/arl profile</code>
-** Opens up profile options.
-* <code>/arl filter</code>
-** Opens up filtering options.
-* <code>/arl scan</code>
-** Performs a scan for missing recipes. This is in place for those times when you cannot access the scan button.
+L["GAME_COMMANDS_DESC"] = [["Command Line:
+Ackis Recipe List has recently changed to use a GUI for change parameters. Type /arl to open up the GUI. Acceptable commands include:
+- /arl about
+ Opens up the about panel, listing information about the mod.
+- /arl sort or /arl sorting
+ Opens up the sorting options.
+- /arl documentation
+ Opens up in-game documentation regarding ARL.
+- /arl display
+ Opens up display options.
+- /arl profile
+ Opens up profile options.
+- /arl filter
+ Opens up filtering options.
+- /arl scan
+ Performs a scan for missing recipes. This is in place for those times when you cannot access the scan button.
-===Clicking===
+Clicking:
Ackis Recipe List will behave differently depending on which modifying keys you use to click.
-====Scan Button====
+Scan Button:
This is the functionality that occurs when you are clicking the scan button.
-*Normal Click
-**Performs a scan of the current tradeskill displaying recipes in a new window.
-*Shift Click
-**Generates a text dumping of the current tradeskill in CSV format.
-*Alt Click
-**Removes all waypoints on the World Map and Mini-map generated by ARL.
+- Normal Click
+ Performs a scan of the current tradeskill displaying recipes in a new window.
+- Shift Click
+ Generates a text dumping of the current tradeskill in CSV format.
+- Alt Click
+ Removes all waypoints on the World Map and Mini-map generated by ARL.
-====Recipe====
+Recipe:
This is the functionality that occurs when you click on a recipe.
-*Normal Click
-**Expands or contracts the recipe acquire information.
-*Shift Click
-**Generates an item link of the item that the recipe will make into your default chat box.
-*Ctrl Click
-**Genereates a spell link for the recipe you clicked.
-*Alt Click
-**Adds or removes a recipe from the exclusion list.
-*Ctrl-Shift Click
-**Adds the specific recipe acquire methods to the World Map and Mini-map."]]
+- Normal Click
+ Expands or contracts the recipe acquire information.
+- Shift Click
+ Generates an item link of the item that the recipe will make into your default chat box.
+- Ctrl Click
+ Genereates a spell link for the recipe you clicked.
+- Alt Click
+ Adds or removes a recipe from the exclusion list.
+- Ctrl-Shift Click
+ Adds the specific recipe acquire methods to the World Map and Mini-map."]]
-- Config UI Elements and their associated descriptions
L["Include Filtered"] = true
@@ -1710,8 +1710,13 @@ L["Bryan Landers"] = true
L["Prospector Khazgorm"] = true
L["Northern Cooking"] = true
L["Clamlette Surprise"] = true
-L["DATAMINER_SKILLELVEL"] = [[DEBUG: Recipe level different!
+L["DATAMINER_SKILLELVEL"] = [[Recipe level different!
Name: %s
ARL Level: %s
Trainer Level: %s]]
-L["DATAMINER_SKILLLEVEL_ERROR"] = "This can only be used for a trade skill trainer. Please open up the trainer and try again."
\ No newline at end of file
+L["DATAMINER_SKILLLEVEL_ERROR"] = "This can only be used for a trade skill trainer. Please open up the trainer and try again."
+L["DATAMINER_TRAINER_NOTTARGETTED"] = "You must target the trainer when you run this command."
+L["DATAMINER_TRAINER_INFO"] = [[Trainer Name: %s
+Trainer ID: %s]]
+L["DATAMINER_TRAINER_TEACH"] = "Missing entry for %s"
+L["DATAMINER_TRAINER_NOTTEACH"] = "Extra entry for %s"
diff --git a/Locals/testesMX.lua b/Locals/testesMX.lua
index 4426105..098ec9b 100644
--- a/Locals/testesMX.lua
+++ b/Locals/testesMX.lua
@@ -1582,3 +1582,13 @@ L["Northern Cooking"] = true
L["Custom40"] = "Discovered randomly by reading the Book of Glyph Mastery."
L["Clamlette Surprise"] = true
+L["DATAMINER_SKILLELVEL"] = [[Recipe level different!
+ Name: %s
+ ARL Level: %s
+ Trainer Level: %s]]
+L["DATAMINER_SKILLLEVEL_ERROR"] = "This can only be used for a trade skill trainer. Please open up the trainer and try again."
+L["DATAMINER_TRAINER_NOTTARGETTED"] = "You must target the trainer when you run this command."
+L["DATAMINER_TRAINER_INFO"] = [[Trainer Name: %s
+Trainer ID: %s]]
+L["DATAMINER_TRAINER_TEACH"] = "Missing entry for %s"
+L["DATAMINER_TRAINER_NOTTEACH"] = "Extra entry for %s"