Quantcast

Fixed the skill check for trainers in the tooltip hook.

torhal [12-31-09 - 03:06]
Fixed the skill check for trainers in the tooltip hook.
Filename
ARL.lua
diff --git a/ARL.lua b/ARL.lua
index 169e887..9188235 100644
--- a/ARL.lua
+++ b/ARL.lua
@@ -519,7 +519,7 @@ function addon:OnInitialize()
 				       for spell_id in pairs(trainer["TrainList"]) do
 					       local recipe = RecipeList[spell_id]
 					       local skill_level = Player["Professions"][GetSpellInfo(recipe["Profession"])]
-					       local has_skill = skill_level and skill_level >= recipe["Level"]
+					       local has_skill = skill_level and (type(skill_level) == "boolean" and true or skill_level >= recipe["Level"])

 					       if ((not recipe["Known"] and has_skill) or shifted) and Player:IsCorrectFaction(recipe["Flags"]) then
 						       local _, _, _, hex = GetItemQualityColor(recipe["Rarity"])