Files
Server/src/engine/net/client/handlers/MoveToPointHandler.java
T

37 lines
1.5 KiB
Java
Raw Normal View History

2022-04-30 09:41:17 -04:00
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
// Magicbane Emulator Project © 2013 - 2022
// www.magicbane.com
package engine.net.client.handlers;
import engine.exception.MsgSendException;
import engine.gameManager.MovementManager;
import engine.net.client.ClientConnection;
import engine.net.client.msg.ClientNetMsg;
import engine.net.client.msg.MoveToPointMsg;
2024-03-24 09:42:27 -04:00
import engine.objects.PlayerCharacter;
2022-04-30 09:41:17 -04:00
public class MoveToPointHandler extends AbstractClientMsgHandler {
public MoveToPointHandler() {
super(MoveToPointMsg.class);
}
@Override
protected boolean _handleNetMsg(ClientNetMsg baseMsg,
2023-07-15 09:23:48 -04:00
ClientConnection origin) throws MsgSendException {
2022-04-30 09:41:17 -04:00
MoveToPointMsg msg = (MoveToPointMsg) baseMsg;
2023-09-11 01:36:45 -05:00
PlayerCharacter pc = origin.getPlayerCharacter();
2024-03-24 09:42:27 -04:00
if (pc == null)
return true;
MovementManager.movement(msg, pc);
2022-04-30 09:41:17 -04:00
return true;
}
}