Quantcast

Added the ability to search by quality: common/uncommon/rare/epic/etcetera.

James D. Callahan III [03-27-11 - 08:25]
Added the ability to search by quality: common/uncommon/rare/epic/etcetera.
Filename
Interface/Panel.lua
diff --git a/Interface/Panel.lua b/Interface/Panel.lua
index 6eebd55..a390906 100644
--- a/Interface/Panel.lua
+++ b/Interface/Panel.lua
@@ -554,6 +554,14 @@ function private.InitializeFrame()
 			return false
 		end

+		local function SearchByQuality(recipe, search_pattern)
+			if private.item_quality_names[recipe.quality]:lower():find(search_pattern) then
+				recipe:AddState("RELEVANT")
+				return true
+			end
+			return false
+		end
+
 		local function SearchByReputation(recipe, search_pattern)
 			for acquire_type, acquire_data in pairs(recipe.acquire_data) do
 				if acquire_type == A.REPUTATION then
@@ -583,6 +591,10 @@ function private.InitializeFrame()
 					local found = SearchByField(recipe, search_pattern)

 					if not found then
+						found = SearchByQuality(recipe, search_pattern)
+					end
+
+					if not found then
 						found = SearchByAcquireType(recipe, search_pattern)
 					end