// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ . // ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌· // ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀ // ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌ // ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀ // Magicbane Emulator Project © 2013 - 2022 // www.magicbane.com package engine.net.client.msg.guild; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; import engine.net.client.Protocol; import engine.net.client.msg.ClientNetMsg; public class LeaveGuildMsg extends ClientNetMsg { private int response; private String message; private long sourceID; /** * This is the general purpose constructor. */ public LeaveGuildMsg() { super(Protocol.LEAVEGUILD); } /** * 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 LeaveGuildMsg(AbstractConnection origin, ByteBufferReader reader) { super(Protocol.LEAVEGUILD, origin, reader); } /** * Serializes the subclass specific items to the supplied ByteBufferWriter. */ @Override protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.response); writer.putString(this.message); writer.putLong(this.sourceID); } /** * Deserializes the subclass specific items from the supplied ByteBufferReader. */ @Override protected void _deserialize(ByteBufferReader reader) { this.response = reader.getInt(); this.message = reader.getString(); this.sourceID = reader.getLong(); } /** * @return the response */ public int getResponse() { return response; } /** * @param response the response to set */ public void setResponse(int response) { this.response = response; } /** * @return the message */ public String getMessage() { return message; } /** * @param message the message to set */ public void setMessage(String message) { this.message = message; } /** * @return the sourceID */ public long getSourceID() { return sourceID; } /** * @param sourceID the sourceID to set */ public void setSourceID(long sourceID) { this.sourceID = sourceID; } }