I have a problem that I would like to ask for help: how to add gameClient to a restored offline shop character when the server is restarted?
I added offline traders shop/craft on my ACiS l2j but I have a situation: If I don't add a client for the char I won't be able to login again, since it can not be kicked when trying to login (it keeps sending the message account is in use). If I try to add, it gives an nullpointerexception and the char is not loaded with it's private store/craft to the game.
Here is the exception:
May 09, 2020 12:48:50 PM net.sf.l2j.gameserver.datatables.OfflineTradersTable <init>
WARNING: error loading trader 268487086.
java.lang.NullPointerException
at net.sf.l2j.gameserver.network.gameserverpackets.PlayerAuthRequest.<init>(PlayerAuthRequest.java:11)
at net.sf.l2j.gameserver.LoginServerThread.addClient(LoginServerThread.java:305)
at net.sf.l2j.gameserver.datatables.OfflineTradersTable.<init>(OfflineTradersTable.java:470)
at net.sf.l2j.gameserver.datatables.OfflineTradersTable$SingletonHolder.<clinit>(OfflineTradersTable.java:552)
at net.sf.l2j.gameserver.datatables.OfflineTradersTable.getInstance(OfflineTradersTable.java:547)
at net.sf.l2j.gameserver.GameServer.<init>(GameServer.java:270)
at net.sf.l2j.gameserver.GameServer.main(GameServer.java:118)
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
I apologize for my incompetence. The ability to trade is limited only for builder 1. Ordinary characters can trade with each other, and this has nothing to do with auto loot.)
Question
Gryphon
Hello.
I have a problem that I would like to ask for help: how to add gameClient to a restored offline shop character when the server is restarted?
I added offline traders shop/craft on my ACiS l2j but I have a situation: If I don't add a client for the char I won't be able to login again, since it can not be kicked when trying to login (it keeps sending the message account is in use). If I try to add, it gives an nullpointerexception and the char is not loaded with it's private store/craft to the game.
Here is the exception:
May 09, 2020 12:48:50 PM net.sf.l2j.gameserver.datatables.OfflineTradersTable <init>
WARNING: error loading trader 268487086.
java.lang.NullPointerException
at net.sf.l2j.gameserver.network.gameserverpackets.PlayerAuthRequest.<init>(PlayerAuthRequest.java:11)
at net.sf.l2j.gameserver.LoginServerThread.addClient(LoginServerThread.java:305)
at net.sf.l2j.gameserver.datatables.OfflineTradersTable.<init>(OfflineTradersTable.java:470)
at net.sf.l2j.gameserver.datatables.OfflineTradersTable$SingletonHolder.<clinit>(OfflineTradersTable.java:552)
at net.sf.l2j.gameserver.datatables.OfflineTradersTable.getInstance(OfflineTradersTable.java:547)
at net.sf.l2j.gameserver.GameServer.<init>(GameServer.java:270)
at net.sf.l2j.gameserver.GameServer.main(GameServer.java:118)
This exception occurs when this line is called:
LoginServerThread.getInstance().addClient(player.getAccountName(), client);
The part of the code just before the exception is throwed:
....
player.setRunning();
player.sitDown(true);
player.setOnlineStatus(true, false);
World.getInstance().addPlayer(player);
final GameClient client = new GameClient(null);
client.setDetached(true);
player.setClient(client);
client.setPlayer(player);
client.setAccountName(player.getAccountNamePlayer());
player.setOnlineStatus(true, true);
client.setState(GameClientState.IN_GAME);
player.setOfflineStartTime(time);
player.spawnMe();
here -> LoginServerThread.getInstance().addClient(player.getAccountName(), client);
Thanks in advance
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.