Quantcast

Storing recipe counts on the Player object is just dirty.

James D. Callahan III [04-03-11 - 12:27]
Storing recipe counts on the Player object is just dirty.
Filename
Core.lua
diff --git a/Core.lua b/Core.lua
index d86fef7..5a38c6a 100644
--- a/Core.lua
+++ b/Core.lua
@@ -956,6 +956,8 @@ end
 -- Recipe Scanning Functions
 -------------------------------------------------------------------------------
 do
+	local current_recipe_count, previous_recipe_count = 0, 0
+
 	-- List of tradeskill headers, used in addon:Scan()
 	local header_list = {}

@@ -1120,10 +1122,10 @@ do
 			_G.TradeSkillFrame_Update()

 		end
-		player.prev_count = player.foundRecipes
-		player.foundRecipes = recipes_found
+		previous_recipe_count = current_recipe_count
+		current_recipe_count = recipes_found

-		if is_refresh and player.prev_count == recipes_found then
+		if is_refresh and previous_recipe_count == recipes_found then
 			return
 		end