Handler created for ToggleSitStandMsg

This commit is contained in:
2024-03-29 06:02:29 -04:00
parent e86097d732
commit 7b9d9d64bb
3 changed files with 66 additions and 30 deletions
@@ -48,31 +48,6 @@ public class ClientMessagePump implements NetMsgHandler {
this.server = server;
}
private static void toggleSitStand(ToggleSitStandMsg msg, ClientConnection origin) throws MsgSendException {
PlayerCharacter pc = SessionManager.getPlayerCharacter(origin);
if (pc == null)
return;
pc.update();
pc.setSit(msg.toggleSitStand());
// cancel effects that break on sit
if (pc.isSit()) {
pc.setCombat(false);
pc.cancelOnSit();
}
UpdateStateMsg rwss = new UpdateStateMsg();
if (pc.isSit()) {
pc.setCombat(false);
rwss.setAware(1);
}
rwss.setPlayer(pc);
DispatchMessage.dispatchMsgToInterestArea(pc, rwss, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
}
private static void ackBankWindowOpened(AckBankWindowOpenedMsg msg, ClientConnection origin) {
// According to the Wiki, the client should not send this message.
// Log the instance to investigate, and modify Wiki accordingly.
@@ -362,10 +337,6 @@ public class ClientMessagePump implements NetMsgHandler {
break;
case OPENVAULT:
break;
case TOGGLESITSTAND:
ToggleSitStandMsg tssm = (ToggleSitStandMsg) msg;
toggleSitStand(tssm, origin);
break;
case IGNORE:
((IgnoreMsg) msg).handleRequest(origin);
break;