Public Repository for the Magicbane Emulator Project Called BattleBane
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
2.9 KiB

// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
// 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 IgnoreMsg extends ClientNetMsg {
private int unknown1;
private int unknown2;
public String nameToIgnore;
/**
* This is the general purpose constructor.
*/
public IgnoreMsg() {
super(Protocol.IGNORE);
}
/**
* 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 IgnoreMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.IGNORE, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied NetMsgWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(unknown1);
writer.putInt(unknown2);
writer.putUnicodeString(nameToIgnore);
}
/**
* Deserializes the subclass specific items from the supplied NetMsgReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
unknown1 = reader.getInt();
unknown2 = reader.getInt();
nameToIgnore = reader.getUnicodeString();
}
/**
* @return the unknown1
*/
public int getUnknown1() {
return unknown1;
}
/**
* @param unknown1 the unknown1 to set
*/
public void setUnknown1(int unknown1) {
this.unknown1 = unknown1;
}
/**
* @return the unknown2
*/
public int getUnknown2() {
return unknown2;
}
/**
* @param unknown2 the unknown2 to set
*/
public void setUnknown2(int unknown2) {
this.unknown2 = unknown2;
}
/**
* @return the nameToIgnore
*/
public String getNameToIgnore() {
return nameToIgnore;
}
/**
* @param nameToIgnore the nameToIgnore to set
*/
public void setNameToIgnore(String nameToIgnore) {
this.nameToIgnore = nameToIgnore;
}
}