Quantcast

When detecting differences in skill levels between what ARL has and what is actually in-game, do a live update of the recipe.

James D. Callahan III [03-06-11 - 17:58]
When detecting differences in skill levels between what ARL has and what is actually in-game, do a live update of the recipe.
Filename
Scanner.lua
diff --git a/Scanner.lua b/Scanner.lua
index a52c7f6..3c026d0 100644
--- a/Scanner.lua
+++ b/Scanner.lua
@@ -629,6 +629,17 @@ do
 			if info[i_name] and info[i_name] ~= recipe_list[i].skill_level then
 				found = true
 				table.insert(output, L["DATAMINER_SKILLELVEL"]:format(i_name, recipe_list[i].skill_level, info[i_name]))
+				recipe_list[i].skill_level = info[i_name]
+
+				local skill_level = recipe_list[i].skill_level
+				local optimal_level = recipe_list[i].optimal_level
+
+				if optimal_level > skill_level or optimal_level < skill_level then
+					recipe_list[i].optimal_level = skill_level
+					recipe_list[i].medium_level = skill_level + 10
+					recipe_list[i].easy_level = skill_level + 15
+					recipe_list[i].trivial_level = skill_level + 20
+				end
 			end
 		end
 		table.insert(output, "Trainer Skill Level Scan Complete.")