Logic fixes for recipe:SetRequiredFaction()
James D. Callahan III [04-03-11 - 13:38]
Logic fixes for recipe:SetRequiredFaction()
diff --git a/Recipe.lua b/Recipe.lua
index 9354143..3ed70d5 100644
--- a/Recipe.lua
+++ b/Recipe.lua
@@ -119,12 +119,9 @@ end
function recipe_prototype:SetRequiredFaction(faction_name)
self.required_faction = faction_name
- if faction_name and private.Player.faction ~= BFAC[faction_name] then
+ if faction_name and private.Player.faction ~= faction_name then
self.is_ignored = true
- end
-
- if self.is_ignored then
- private.num_recipes[self.profession] = (private.num_recipes[self.profession] or 0) - 1
+ private.num_recipes[self.profession] = private.num_recipes[self.profession] - 1
end
end