forked from MagicBane/Server
Handler created for PerformActionMsg
This commit is contained in:
@@ -795,16 +795,9 @@ public class ClientMessagePump implements NetMsgHandler {
|
|||||||
case LEADERCHANNELMESSAGE:
|
case LEADERCHANNELMESSAGE:
|
||||||
ChatManager.handleChatMsg(s, (AbstractChatMsg) msg);
|
ChatManager.handleChatMsg(s, (AbstractChatMsg) msg);
|
||||||
break;
|
break;
|
||||||
case CHECKUNIQUEGUILD:
|
|
||||||
break;
|
|
||||||
case CANCELGUILDCREATION:
|
|
||||||
break;
|
|
||||||
case LEAVEREQUEST:
|
case LEAVEREQUEST:
|
||||||
origin.disconnect();
|
origin.disconnect();
|
||||||
break;
|
break;
|
||||||
case POWER:
|
|
||||||
PowersManager.usePower((PerformActionMsg) msg, origin, false);
|
|
||||||
break;
|
|
||||||
case READYTOENTER:
|
case READYTOENTER:
|
||||||
break;
|
break;
|
||||||
case OPENVAULT:
|
case OPENVAULT:
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ public enum Protocol {
|
|||||||
PLACEASSET(0x940962DF, PlaceAssetMsg.class, PlaceAssetMsgHandler.class),
|
PLACEASSET(0x940962DF, PlaceAssetMsg.class, PlaceAssetMsgHandler.class),
|
||||||
PLAYERDATA(0xB206D352, SendOwnPlayerMsg.class, null), //Enter World, Own Player Data
|
PLAYERDATA(0xB206D352, SendOwnPlayerMsg.class, null), //Enter World, Own Player Data
|
||||||
PLAYERFRIENDS(0xDDEF9E7D, FriendRequestMsg.class, FriendRequestHandler.class),
|
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
|
POWERACTION(0xA0B27EEB, ApplyEffectMsg.class, null), // Apply Effect, add to effects icons
|
||||||
POWERACTIONDD(0xD43052F8, ModifyHealthMsg.class, null), //Modify Health/Mana/Stamina using power
|
POWERACTIONDD(0xD43052F8, ModifyHealthMsg.class, null), //Modify Health/Mana/Stamina using power
|
||||||
POWERACTIONDDDIE(0xC27D446B, null, null), //Modify Health/Mana/Stamina using power and kill target
|
POWERACTIONDDDIE(0xC27D446B, null, null), //Modify Health/Mana/Stamina using power and kill target
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user