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

43 lines
1.7 KiB
Java
Raw Normal View History

2024-03-27 13:26:47 -04:00
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
// Magicbane Emulator Project © 2013 - 2022
// www.magicbane.com
package engine.net.client.handlers;
import engine.exception.MsgSendException;
2024-05-12 11:55:12 -04:00
import engine.mbEnums.DispatchChannel;
import engine.gameManager.DispatchManager;
2024-03-27 13:26:47 -04:00
import engine.net.client.ClientConnection;
import engine.net.client.msg.ClientNetMsg;
import engine.net.client.msg.SocialMsg;
import engine.objects.PlayerCharacter;
import engine.server.MBServerStatics;
public class SocialMsgHandler extends AbstractClientMsgHandler {
public SocialMsgHandler() {
2024-05-12 11:55:12 -04:00
super();
2024-03-27 13:26:47 -04:00
}
@Override
protected boolean _handleNetMsg(ClientNetMsg baseMsg, ClientConnection origin) throws MsgSendException {
PlayerCharacter player = origin.getPlayerCharacter();
// Member variable assignment
SocialMsg msg = (SocialMsg) baseMsg;
if (player == null)
return true;
DispatchManager.dispatchMsgToInterestArea(player, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, true);
2024-03-27 13:26:47 -04:00
return true;
}
}