Quantcast

Added the ability to search for recipes by reputation name.

James D. Callahan III [12-31-10 - 11:33]
Added the ability to search for recipes by reputation name.
Filename
Interface/Panel.lua
diff --git a/Interface/Panel.lua b/Interface/Panel.lua
index 4997b73..ef9c80f 100644
--- a/Interface/Panel.lua
+++ b/Interface/Panel.lua
@@ -501,6 +501,7 @@ function private.InitializeFrame()
 	do
 		local acquire_names = private.acquire_names
 		local location_list = private.location_list
+		local reputation_list = private.reputation_list

 		local search_params = {
 			"name",
@@ -568,6 +569,28 @@ function private.InitializeFrame()
 							end
 						end
 					end
+
+					if not found then
+						for acquire_type, acquire_data in pairs(entry.acquire_data) do
+							if acquire_type == A.REPUTATION then
+								local breakout = false
+
+								for id_num, info in pairs(acquire_data) do
+									local str = reputation_list[id_num].name:lower()
+
+									if str and str:find(pattern) then
+										entry:AddState("RELEVANT")
+										breakout = true
+										break
+									end
+								end
+							end
+
+							if breakout then
+								break
+							end
+						end
+					end
 				end
 			end	-- if entry.profession
 		end	-- for