Browse Source

Handler created for LeaveWorldMsg

combat-2
MagicBot 8 months ago
parent
commit
7e3a8a7a40
  1. 3
      src/engine/net/client/ClientMessagePump.java
  2. 2
      src/engine/net/client/Protocol.java
  3. 30
      src/engine/net/client/handlers/LeaveWorldMsgHandler.java

3
src/engine/net/client/ClientMessagePump.java

@ -737,9 +737,6 @@ public class ClientMessagePump implements NetMsgHandler { @@ -737,9 +737,6 @@ public class ClientMessagePump implements NetMsgHandler {
case LEADERCHANNELMESSAGE:
ChatManager.handleChatMsg(s, (AbstractChatMsg) msg);
break;
case LEAVEREQUEST:
origin.disconnect();
break;
case READYTOENTER:
break;
case OPENVAULT:

2
src/engine/net/client/Protocol.java

@ -128,7 +128,7 @@ public enum Protocol { @@ -128,7 +128,7 @@ public enum Protocol {
LEADERCHANNELMESSAGE(0x17b306f9, ChatGlobalMsg.class, null),
LEAVEGROUP(0xD8037303, LeaveGroupMsg.class, LeaveGroupHandler.class), //Leave Group
LEAVEGUILD(0x1801EA32, LeaveGuildMsg.class, LeaveGuildHandler.class), // Leave Guild
LEAVEREQUEST(0xC79D775C, LeaveWorldMsg.class, null), //Client Request Leave World
LEAVEREQUEST(0xC79D775C, LeaveWorldMsg.class, LeaveWorldMsgHandler.class), //Client Request Leave World
LEAVEWORLD(0xB801EAEC, null, null), //Response to client for Request Leave World
LOADCHARACTER(0x5756BC53, null, null), // Load Player/NPC/Mob, other then self
LOADSTRUCTURE(0xB8A3A654, LoadStructureMsg.class, null), //Load Buildings and World Detail Objects

30
src/engine/net/client/handlers/LeaveWorldMsgHandler.java

@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
// Magicbane Emulator Project © 2013 - 2022
// www.magicbane.com
package engine.net.client.handlers;
import engine.exception.MsgSendException;
import engine.net.client.ClientConnection;
import engine.net.client.msg.ClientNetMsg;
import engine.net.client.msg.LeaveWorldMsg;
public class LeaveWorldMsgHandler extends AbstractClientMsgHandler {
public LeaveWorldMsgHandler() {
super(LeaveWorldMsg.class);
}
@Override
protected boolean _handleNetMsg(ClientNetMsg baseMsg, ClientConnection origin) throws MsgSendException {
origin.disconnect();
return true;
}
}
Loading…
Cancel
Save