Previously Mobius have solved an issue where an offlineshop would get locked out after server restart.
With the fix this thread:
https://l2jmobius.org/forum/index.php?topic=15092.msg62625#msg62625That fix solved the issue, but not fully. The server restart would not lock the acc now.
But occasionally if a player would sell all the things, or just randomly sometimes. Get his acc locked out again.
Thinking here is that, when players sells out, the character instance gets removed from the world but the game server doesnt update the login-server. Only way now to unlock account is to restart the login-server.
With this small edit, it bypasses that, and force logs-in player to theyr account, preventing any lock ups.
diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/LoginServerThread.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/LoginServerThread.java
index e833035..49ade8f 100644
--- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/LoginServerThread.java
+++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/LoginServerThread.java
@@ -504,14 +504,13 @@
public void doKickPlayer(String account)
{
final GameClient client = _accountsInGameServer.get(account);
+
if (client != null)
{
client.close(ServerClose.STATIC_PACKET);
- getInstance().sendLogout(account);
}
else // Offline player restored after restart.
{
- boolean logoutSent = false;
for (Player player : World.getInstance().getPlayers())
{
if (account.equals(player.getAccountName()))
@@ -523,15 +522,11 @@
}
player.storeMe();
player.deleteMe();
-
- if (!logoutSent)
- {
- logoutSent = true;
- getInstance().sendLogout(account);
- }
}
}
}
+ // Ensure the Login Server always gets the command to unlock the account.
+ getInstance().sendLogout(account);
}
/**
I tested this on my server for a week, before players would still get locked out of theyr accounts once in a while. Now there were no more reports of that.