Quantcast

Future-proof the game version check against the number of entries in private.game_version_names instead of an error-prone exact version (which was WOTLK, by the way)

James D. Callahan III [03-13-11 - 05:08]
Future-proof the game version check against the number of entries in private.game_version_names instead of an error-prone exact version (which was WOTLK, by the way)
Filename
Scanner.lua
diff --git a/Scanner.lua b/Scanner.lua
index 364dd9e..ab6c6e7 100644
--- a/Scanner.lua
+++ b/Scanner.lua
@@ -1310,7 +1310,7 @@ do

 		if not game_vers then
 			table.insert(output, "No expansion information: " .. tostring(spell_id) .. " " .. recipe_name)
-		elseif game_vers > private.game_versions.WOTLK then
+		elseif game_vers > #private.game_version_names then
 			table.insert(output, "Expansion information too high: " .. tostring(spell_id) .. " " .. recipe_name)
 		end
 		local optimal = recipe.optimal_level