diff --git a/src/engine/net/client/handlers/AttackCmdMsgHandler.java b/src/engine/net/client/handlers/AttackCmdMsgHandler.java new file mode 100644 index 00000000..22b456d5 --- /dev/null +++ b/src/engine/net/client/handlers/AttackCmdMsgHandler.java @@ -0,0 +1,48 @@ +package engine.net.client.handlers; + +import engine.Enum.DispatchChannel; +import engine.exception.MsgSendException; +import engine.net.Dispatch; +import engine.net.DispatchMessage; +import engine.net.client.ClientConnection; +import engine.net.client.msg.AttackCmdMsg; +import engine.net.client.msg.ClientNetMsg; +import engine.net.client.msg.KeepAliveServerClientMsg; +import engine.objects.PlayerCharacter; + +/* + * @Author: + * @Summary: Processes application protocol message which keeps + * client's tcp connection open. + */ + +public class AttackCmdMsgHandler extends AbstractClientMsgHandler { + + public AttackCmdMsgHandler() { + super(AttackCmdMsg.class); + } + + @Override + protected boolean _handleNetMsg(ClientNetMsg baseMsg, ClientConnection origin) throws MsgSendException { + + PlayerCharacter pc = origin.getPlayerCharacter(); + + + // Member variable declaration + + KeepAliveServerClientMsg msg; + + // Member variable assignment + + msg = (KeepAliveServerClientMsg) baseMsg; + + + // Send ping to client + + Dispatch dispatch = Dispatch.borrow(pc, msg); + DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY); + + return true; + } + +} \ No newline at end of file