In Player:MarkExclusions(): Don't check the recipe's KNOWN state until it has been determined that recipe is not nil. Fixes ticket #987.
James D. Callahan III [04-10-10 - 00:17]
In Player:MarkExclusions(): Don't check the recipe's KNOWN state until it has been determined that recipe is not nil. Fixes ticket #987.
diff --git a/Player.lua b/Player.lua
index 6eeb0a8..84121de 100644
--- a/Player.lua
+++ b/Player.lua
@@ -76,10 +76,9 @@ function Player:MarkExclusions()
for spell_id in pairs(exclusion_list) do
local recipe = recipe_list[spell_id]
- local is_known = recipe:HasState("KNOWN")
if recipe then
- if is_known and recipe.profession == profession then
+ if recipe:HasState("KNOWN") and recipe.profession == profession then
known_count = known_count + 1
elseif recipe_profession == profession then
unknown_count = unknown_count + 1