Quantcast

Always increment the profession recipe count when adding a new recipe - it will be decremented when a non-matching required faction is found.

James D. Callahan III [03-11-11 - 08:22]
Always increment the profession recipe count when adding a new recipe - it will be decremented when a non-matching required faction is found.
Filename
Recipe.lua
diff --git a/Recipe.lua b/Recipe.lua
index a115461..dbf2972 100644
--- a/Recipe.lua
+++ b/Recipe.lua
@@ -87,16 +87,13 @@ function addon:AddRecipe(spell_id, skill_level, item_id, quality, profession, sp
 		self:Print(L["SpellIDCache"]:format(spell_id))
 	end
 	recipe_list[spell_id] = recipe
+	private.num_recipes[recipe.profession] = (private.num_recipes[recipe.profession] or 0) + 1

 	recipe.required_faction = required_faction

 	if required_faction and private.Player.faction ~= BFAC[required_faction] then
 		recipe.is_ignored = true
 	end
-
-	if not recipe.is_ignored then
-		private.num_recipes[recipe.profession] = (private.num_recipes[recipe.profession] or 0) + 1
-	end
 	return recipe
 end