Quantcast

When we have custom IDs, we sort off of ID, and then by name, this will cleam up long lists like inscription where we have discoveries, and stuff learnt via books.

ackis [08-31-09 - 04:13]
When we have custom IDs, we sort off of ID, and then by name, this will cleam up long lists like inscription where we have discoveries, and stuff learnt via books.
Filename
ARLFrame.lua
diff --git a/ARLFrame.lua b/ARLFrame.lua
index 33f1bf8..5923c4f 100644
--- a/ARLFrame.lua
+++ b/ARLFrame.lua
@@ -1419,8 +1419,13 @@ do
 					if (reca["Type"] == recb["Type"]) then
 						-- If we have a custom string for sorting
 						if (reca["Type"] == 8) then
-							-- Sort on the ID of the custom string so they get grouped together
-							return RecipeDB[a]["Acquire"][1]["ID"] < RecipeDB[b]["Acquire"][1]["ID"]
+							-- Sort on name if they're the same custom ID
+							if (RecipeDB[a]["Acquire"][1]["ID"] == RecipeDB[b]["Acquire"][1]["ID"]) then
+								return RecipeDB[a]["Name"] < RecipeDB[b]["Name"]
+							-- Sort on the ID of the custom string so they get grouped together
+							else
+								return RecipeDB[a]["Acquire"][1]["ID"] < RecipeDB[b]["Acquire"][1]["ID"]
+							end
 						else
 							return RecipeDB[a]["Name"] < RecipeDB[b]["Name"]
 						end