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
@@ -18,69 +18,69 @@ import engine.net.client.Protocol;
public class KeepAliveServerClientMsg extends ClientNetMsg {
private int firstData; // First 4 bytes
private int secondData; // Second 4 bytes
private double timeLoggedIn;
private byte endData; // Last byte
private int firstData; // First 4 bytes
private int secondData; // Second 4 bytes
/**
* This is the general purpose constructor.
*/
public KeepAliveServerClientMsg(int firstData, int secondData, byte endData) {
super(Protocol.KEEPALIVESERVERCLIENT);
this.firstData = firstData;
this.secondData = secondData;
this.endData = endData;
}
private double timeLoggedIn;
private byte endData; // Last byte
/**
* 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 KeepAliveServerClientMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.KEEPALIVESERVERCLIENT, origin, reader);
}
/**
* This is the general purpose constructor.
*/
public KeepAliveServerClientMsg(int firstData, int secondData, byte endData) {
super(Protocol.KEEPALIVESERVERCLIENT);
this.firstData = firstData;
this.secondData = secondData;
this.endData = endData;
}
/**
* Serializes the subclass specific items to the supplied NetMsgWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putDouble(this.timeLoggedIn);
writer.put((byte)0);
//writer.putDouble(1000);
}
/**
* 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 KeepAliveServerClientMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.KEEPALIVESERVERCLIENT, origin, reader);
}
/**
* Deserializes the subclass specific items from the supplied NetMsgReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.timeLoggedIn = reader.getDouble();
this.endData = reader.get();
}
/**
* Serializes the subclass specific items to the supplied NetMsgWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putDouble(this.timeLoggedIn);
writer.put((byte) 0);
//writer.putDouble(1000);
public int getFirstData() {
return firstData;
}
}
public int getSecondData() {
return secondData;
}
/**
* Deserializes the subclass specific items from the supplied NetMsgReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.timeLoggedIn = reader.getDouble();
this.endData = reader.get();
}
public byte getEndData() {
return endData;
}
public int getFirstData() {
return firstData;
}
public double getTimeLoggedIn() {
return timeLoggedIn;
}
public int getSecondData() {
return secondData;
}
public void setTimeLoggedIn(double timeLoggedIn) {
this.timeLoggedIn = timeLoggedIn;
}
public byte getEndData() {
return endData;
}
public double getTimeLoggedIn() {
return timeLoggedIn;
}
public void setTimeLoggedIn(double timeLoggedIn) {
this.timeLoggedIn = timeLoggedIn;
}
}