Migration to protocol class

This commit is contained in:
2024-03-31 10:42:17 -04:00
parent 4e5e49606c
commit 504e26114e
7 changed files with 3 additions and 158 deletions
-2
View File
@@ -87,8 +87,6 @@ public class LoginServer {
loginServer = new LoginServer();
ConfigManager.loginServer = loginServer;
ConfigManager.handler = new LoginServerMsgHandler(loginServer);
ConfigManager.serverType = Enum.ServerType.LOGINSERVER;
if (ConfigManager.init() == false) {
@@ -1,47 +0,0 @@
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
// Magicbane Emulator Project © 2013 - 2022
// www.magicbane.com
package engine.server.login;
import engine.net.NetMsgHandler;
import engine.net.client.ClientConnection;
import engine.net.client.Protocol;
import engine.net.client.msg.ClientNetMsg;
import org.pmw.tinylog.Logger;
public class LoginServerMsgHandler implements NetMsgHandler {
private final LoginServer server;
LoginServerMsgHandler(LoginServer server) {
super();
this.server = server;
}
/*
* =========================================================================
* Client Messages
* =========================================================================
*/
@Override
public boolean handleClientMsg(ClientNetMsg clientNetMsg) {
if (clientNetMsg == null) {
Logger.error("Recieved null msg. Returning.");
return false;
}
ClientConnection origin = (ClientConnection) clientNetMsg.getOrigin();
Protocol protocolMsg = clientNetMsg.getProtocolMsg();
return true;
}
}
-2
View File
@@ -30,7 +30,6 @@ import engine.net.ItemProductionManager;
import engine.net.Network;
import engine.net.client.ClientConnection;
import engine.net.client.ClientConnectionManager;
import engine.net.client.ClientMessagePump;
import engine.net.client.Protocol;
import engine.net.client.msg.UpdateStateMsg;
import engine.net.client.msg.chat.ChatSystemMsg;
@@ -103,7 +102,6 @@ public class WorldServer {
ConfigManager.serverType = Enum.ServerType.WORLDSERVER;
ConfigManager.worldServer = worldServer;
ConfigManager.handler = new ClientMessagePump(worldServer);
worldServer.init();