From 176d828825d472dd44843dddffd1b074d9ea85a7 Mon Sep 17 00:00:00 2001 From: ackis Date: Mon, 31 Aug 2009 04:13:38 +0000 Subject: [PATCH] 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. --- ARLFrame.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 -- 1.7.9.5