From 4e47ab58fb049325f4540707c02d0ef77270d791 Mon Sep 17 00:00:00 2001
From: Zoey76 <zoey_76@msn.com>
Date: Mon, 2 Sep 2013 23:30:27 +0000
Subject: [PATCH] BETA: Minor fixes: 	* Fixing multisell link for Captain
 Mathias (31340) in Rune. 		* Reported by: Konstantinos 	*
 Fixing players order in `AdminEditChar` commands by insertion order. 	
 * Reported by: lion 		* Suggested by: UnAfraid, Nos

---
 .../dist/game/data/html/guard/31340.htm              |  2 +-
 .../handlers/admincommandhandlers/AdminEditChar.java | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/L2J_DataPack_BETA/dist/game/data/html/guard/31340.htm b/L2J_DataPack_BETA/dist/game/data/html/guard/31340.htm
index cefb2bba55..8059b76396 100644
--- a/L2J_DataPack_BETA/dist/game/data/html/guard/31340.htm
+++ b/L2J_DataPack_BETA/dist/game/data/html/guard/31340.htm
@@ -5,6 +5,6 @@ Welcome, traveler, to the capital of the kingdom of Elmore. You must be tired fr
 <a action="bypass -h npc_%objectId%_Quest Kamaloka">Enter Kamaloka.</a><br>
 <a action="bypass -h npc_%objectId%_Chat 4">"Do you know anything about the ominous rumor I heard?"</a><br>
 <a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the local lord and tax rate.</a><br>
-<a action="bypass -h npc_%objectId%_multisell 313401">Exchange Blue Elmore Coins</a><br>
+<a action="bypass -h npc_%objectId%_multisell 313400001">Exchange Blue Elmore Coins</a><br>
 <a action="bypass -h npc_%objectId%_Quest">Quest</a>
 </body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java
index 8321f6ebae..76d4f5792c 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java
@@ -58,6 +58,7 @@ import com.l2jserver.gameserver.network.serverpackets.SetSummonRemainTime;
 import com.l2jserver.gameserver.network.serverpackets.StatusUpdate;
 import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
 import com.l2jserver.gameserver.network.serverpackets.UserInfo;
+import com.l2jserver.gameserver.util.Comparators;
 import com.l2jserver.gameserver.util.Util;
 import com.l2jserver.util.StringUtil;
 
@@ -848,8 +849,7 @@ public class AdminEditChar implements IAdminCommandHandler
 	
 	private void listCharacters(L2PcInstance activeChar, int page)
 	{
-		L2PcInstance[] players = L2World.getInstance().getPlayers().toArray(new L2PcInstance[L2World.getInstance().getAllPlayersCount()]);
-		
+		L2PcInstance[] players = L2World.getInstance().getPlayersSortedBy(Comparators.PLAYER_UPTIME_COMPARATOR);
 		int maxCharactersPerPage = 20;
 		int maxPages = players.length / maxCharactersPerPage;
 		
@@ -1137,7 +1137,7 @@ public class AdminEditChar implements IAdminCommandHandler
 		
 		final StringBuilder replyMSG = new StringBuilder(1000);
 		
-		for (L2PcInstance player : L2World.getInstance().getPlayers())
+		for (L2PcInstance player : L2World.getInstance().getPlayersSortedBy(Comparators.PLAYER_UPTIME_COMPARATOR))
 		{ // Add player info into new Table row
 			name = player.getName();
 			if (name.toLowerCase().contains(CharacterToFind.toLowerCase()))
@@ -1204,7 +1204,7 @@ public class AdminEditChar implements IAdminCommandHandler
 		final StringBuilder replyMSG = new StringBuilder(1000);
 		final NpcHtmlMessage adminReply = new NpcHtmlMessage();
 		adminReply.setFile(activeChar.getHtmlPrefix(), "data/html/admin/ipfind.htm");
-		for (L2PcInstance player : L2World.getInstance().getPlayers())
+		for (L2PcInstance player : L2World.getInstance().getPlayersSortedBy(Comparators.PLAYER_UPTIME_COMPARATOR))
 		{
 			client = player.getClient();
 			if (client == null)
@@ -1317,7 +1317,7 @@ public class AdminEditChar implements IAdminCommandHandler
 		L2GameClient client;
 		final Map<String, Integer> dualboxIPs = new HashMap<>();
 		
-		for (L2PcInstance player : L2World.getInstance().getPlayers())
+		for (L2PcInstance player : L2World.getInstance().getPlayersSortedBy(Comparators.PLAYER_UPTIME_COMPARATOR))
 		{
 			client = player.getClient();
 			if ((client == null) || client.isDetached())
@@ -1377,7 +1377,7 @@ public class AdminEditChar implements IAdminCommandHandler
 		L2GameClient client;
 		final Map<IpPack, Integer> dualboxIPs = new HashMap<>();
 		
-		for (L2PcInstance player : L2World.getInstance().getPlayers())
+		for (L2PcInstance player : L2World.getInstance().getPlayersSortedBy(Comparators.PLAYER_UPTIME_COMPARATOR))
 		{
 			client = player.getClient();
 			if ((client == null) || client.isDetached())
-- 
GitLab