From 3395efee49d62e71baab5f172f50d624f22e26f9 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 31 Mar 2024 11:01:12 -0400 Subject: [PATCH] bugfix: wrong char! --- .../net/client/handlers/GameServerIPRequestMsgHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/net/client/handlers/GameServerIPRequestMsgHandler.java b/src/engine/net/client/handlers/GameServerIPRequestMsgHandler.java index 5d16b81d..6ddf1fd2 100644 --- a/src/engine/net/client/handlers/GameServerIPRequestMsgHandler.java +++ b/src/engine/net/client/handlers/GameServerIPRequestMsgHandler.java @@ -32,7 +32,6 @@ public class GameServerIPRequestMsgHandler extends AbstractClientMsgHandler { @Override protected boolean _handleNetMsg(ClientNetMsg baseMsg, ClientConnection origin) throws MsgSendException { - PlayerCharacter playerCharacter = origin.getPlayerCharacter(); Session session = SessionManager.getSession(origin); // Member variable declaration @@ -43,6 +42,8 @@ public class GameServerIPRequestMsgHandler extends AbstractClientMsgHandler { msg = (GameServerIPRequestMsg) baseMsg; + PlayerCharacter playerCharacter = PlayerCharacter.getPlayerCharacter(msg.getCharacterUUID()); + if (playerCharacter == null) { Logger.info("Unable to find character ID " + msg.getCharacterUUID()); LoginServer.KickToLogin(MBServerStatics.LOGINERROR_UNABLE_TO_LOGIN, "PlayerCharacter lookup failed in .RequestGameServer().", origin);