diff --git a/src/engine/net/client/ClientMessagePump.java b/src/engine/net/client/ClientMessagePump.java index 37631ff8..045ef89e 100644 --- a/src/engine/net/client/ClientMessagePump.java +++ b/src/engine/net/client/ClientMessagePump.java @@ -795,16 +795,9 @@ public class ClientMessagePump implements NetMsgHandler { case LEADERCHANNELMESSAGE: ChatManager.handleChatMsg(s, (AbstractChatMsg) msg); break; - case CHECKUNIQUEGUILD: - break; - case CANCELGUILDCREATION: - break; case LEAVEREQUEST: origin.disconnect(); break; - case POWER: - PowersManager.usePower((PerformActionMsg) msg, origin, false); - break; case READYTOENTER: break; case OPENVAULT: diff --git a/src/engine/net/client/Protocol.java b/src/engine/net/client/Protocol.java index d57a7b95..1f766e71 100644 --- a/src/engine/net/client/Protocol.java +++ b/src/engine/net/client/Protocol.java @@ -157,7 +157,7 @@ public enum Protocol { PLACEASSET(0x940962DF, PlaceAssetMsg.class, PlaceAssetMsgHandler.class), PLAYERDATA(0xB206D352, SendOwnPlayerMsg.class, null), //Enter World, Own Player Data PLAYERFRIENDS(0xDDEF9E7D, FriendRequestMsg.class, FriendRequestHandler.class), - POWER(0x3C97A459, PerformActionMsg.class, null), // REQ / CMD Perform Action + POWER(0x3C97A459, PerformActionMsg.class, PerformActionMsgHandler.class), // REQ / CMD Perform Action POWERACTION(0xA0B27EEB, ApplyEffectMsg.class, null), // Apply Effect, add to effects icons POWERACTIONDD(0xD43052F8, ModifyHealthMsg.class, null), //Modify Health/Mana/Stamina using power POWERACTIONDDDIE(0xC27D446B, null, null), //Modify Health/Mana/Stamina using power and kill target diff --git a/src/engine/net/client/handlers/PerformActionMsgHandler.java b/src/engine/net/client/handlers/PerformActionMsgHandler.java new file mode 100644 index 00000000..a8a4033e --- /dev/null +++ b/src/engine/net/client/handlers/PerformActionMsgHandler.java @@ -0,0 +1,33 @@ +// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ . +// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌· +// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀ +// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌ +// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀ +// Magicbane Emulator Project © 2013 - 2022 +// www.magicbane.com + +package engine.net.client.handlers; + +import engine.exception.MsgSendException; +import engine.gameManager.PowersManager; +import engine.net.client.ClientConnection; +import engine.net.client.msg.ClientNetMsg; +import engine.net.client.msg.KeepAliveServerClientMsg; +import engine.net.client.msg.PerformActionMsg; + +public class PerformActionMsgHandler extends AbstractClientMsgHandler { + + public PerformActionMsgHandler() { + super(KeepAliveServerClientMsg.class); + } + + @Override + protected boolean _handleNetMsg(ClientNetMsg baseMsg, ClientConnection origin) throws MsgSendException { + + PerformActionMsg msg = (PerformActionMsg) baseMsg; + PowersManager.usePower(msg, origin, false); // Wtf ? + + return true; + } + +} \ No newline at end of file