Project cleanup pre merge.

This commit is contained in:
2023-07-15 09:23:48 -04:00
parent 134b651df8
commit 9bbdef224d
747 changed files with 99704 additions and 101200 deletions
+95 -99
View File
@@ -18,116 +18,112 @@ import engine.net.client.msg.ClientNetMsg;
public class MOTDMsg extends ClientNetMsg {
private int type;
private byte response;
private int unknown01;
private String message;
private int type;
private byte response;
private int unknown01;
private String message;
/**
* This is the general purpose constructor.
*/
public MOTDMsg() {
super(Protocol.MOTD);
this.type = 0;
this.response = (byte) 0;
this.unknown01 = 0;
this.message = "";
}
/**
* This is the general purpose constructor.
*/
public MOTDMsg() {
super(Protocol.MOTD);
this.type = 0;
this.response = (byte) 0;
this.unknown01 = 0;
this.message = "";
}
/**
* 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 MOTDMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.MOTD, origin, reader);
}
/**
* 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 MOTDMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.MOTD, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.type);
writer.put(this.response);
if (this.response == (byte) 1) {
writer.putInt(this.unknown01);
writer.putString(this.message);
}
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.type);
writer.put(this.response);
if (this.response == (byte) 1) {
writer.putInt(this.unknown01);
writer.putString(this.message);
}
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.type = reader.getInt();
this.response = reader.get();
if (this.response == (byte) 1) {
this.unknown01 = reader.getInt();
this.message = reader.getString();
}
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.type = reader.getInt();
this.response = reader.get();
if (this.response == (byte) 1) {
this.unknown01 = reader.getInt();
this.message = reader.getString();
}
}
/**
* @return the type
*/
public int getType() {
return type;
}
/**
* @return the type
*/
public int getType() {
return type;
}
/**
* @param type
* the type to set
*/
public void setType(int type) {
this.type = type;
}
/**
* @param type the type to set
*/
public void setType(int type) {
this.type = type;
}
/**
* @return the response
*/
public byte getResponse() {
return response;
}
/**
* @return the response
*/
public byte getResponse() {
return response;
}
/**
* @param response
* the response to set
*/
public void setResponse(byte response) {
this.response = response;
}
/**
* @param response the response to set
*/
public void setResponse(byte response) {
this.response = response;
}
/**
* @return the unknown01
*/
public int getUnknown01() {
return unknown01;
}
/**
* @return the unknown01
*/
public int getUnknown01() {
return unknown01;
}
/**
* @param unknown01
* the unknown01 to set
*/
public void setUnknown01(int unknown01) {
this.unknown01 = unknown01;
}
/**
* @param unknown01 the unknown01 to set
*/
public void setUnknown01(int unknown01) {
this.unknown01 = unknown01;
}
/**
* @return the message
*/
public String getMessage() {
return message;
}
/**
* @return the message
*/
public String getMessage() {
return message;
}
/**
* @param message
* the message to set
*/
public void setMessage(String message) {
this.message = message;
}
/**
* @param message the message to set
*/
public void setMessage(String message) {
this.message = message;
}
}