// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ . // ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌· // ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀ // ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌ // ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀ // Magicbane Emulator Project © 2013 - 2022 // www.magicbane.com package engine.net.client.msg; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; import engine.net.client.Protocol; public class WhoRequestMsg extends ClientNetMsg { private int set; private int filterType; private String filter; /** * This is the general purpose constructor. */ public WhoRequestMsg() { super(Protocol.WHOREQUEST); } /** * This constructor is used by NetMsgFactory. It attempts to deserialize the * ByteBuffer into a message. If a BufferUnderflow occurs (based on reading * past the limit) then this constructor Throws that Exception to the * caller. */ public WhoRequestMsg(AbstractConnection origin, ByteBufferReader reader) { super(Protocol.WHOREQUEST, origin, reader); } /** * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.set); writer.putInt(this.filterType); writer.putString(this.filter); } /** * Deserializes the subclass specific items from the supplied NetMsgReader. */ @Override protected void _deserialize(ByteBufferReader reader) { this.set = reader.getInt(); this.filterType = reader.getInt(); this.filter = reader.getString(); } /** * @return the set */ public int getSet() { return set; } /** * @param set the set to set */ public void setSet(int set) { this.set = set; } /** * @return the filterType */ public int getFilterType() { return filterType; } /** * @param filterType the filterType to set */ public void setFilterType(int filterType) { this.filterType = filterType; } /** * @return the filter */ public String getFilter() { return filter; } /** * @param filter the filter to set */ public void setFilter(String filter) { this.filter = filter; } }