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
+59 -63
View File
@@ -23,75 +23,71 @@ import engine.net.client.Protocol;
*/
public class SetCombatModeMsg extends ClientNetMsg {
private long playerCompID;
private boolean toggle;
private long playerCompID;
private boolean toggle;
/**
* This is the general purpose constructor.
*/
public SetCombatModeMsg(long playerCompID, boolean toggle) {
super(Protocol.ARCCOMBATMODEATTACKING);
this.playerCompID = playerCompID;
this.toggle = toggle;
}
/**
* This is the general purpose constructor.
*/
public SetCombatModeMsg(long playerCompID, boolean toggle) {
super(Protocol.ARCCOMBATMODEATTACKING);
this.playerCompID = playerCompID;
this.toggle = toggle;
}
/**
* 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 SetCombatModeMsg(AbstractConnection origin, ByteBufferReader reader)
{
super(Protocol.ARCCOMBATMODEATTACKING, 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 SetCombatModeMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.ARCCOMBATMODEATTACKING, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied NetMsgWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putLong(playerCompID);
writer.put(toggle ? (byte) 0x01 : (byte) 0x00);
}
/**
* Serializes the subclass specific items to the supplied NetMsgWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putLong(playerCompID);
writer.put(toggle ? (byte) 0x01 : (byte) 0x00);
}
/**
* Deserializes the subclass specific items from the supplied NetMsgReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader)
{
this.playerCompID = reader.getLong();
this.toggle = (reader.get() == 0x01) ? true : false;
}
/**
* Deserializes the subclass specific items from the supplied NetMsgReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.playerCompID = reader.getLong();
this.toggle = (reader.get() == 0x01) ? true : false;
}
/**
* @return the playerCompID
*/
public long getPlayerCompID() {
return playerCompID;
}
/**
* @return the playerCompID
*/
public long getPlayerCompID() {
return playerCompID;
}
/**
* @return the toggle
*/
public boolean getToggle() {
return toggle;
}
/**
* @param playerCompID the playerCompID to set
*/
public void setPlayerCompID(long playerCompID) {
this.playerCompID = playerCompID;
}
/**
* @param playerCompID
* the playerCompID to set
*/
public void setPlayerCompID(long playerCompID) {
this.playerCompID = playerCompID;
}
/**
* @return the toggle
*/
public boolean getToggle() {
return toggle;
}
/**
* @param toggle
* the toggle to set
*/
public void setToggle(boolean toggle) {
this.toggle = toggle;
}
/**
* @param toggle the toggle to set
*/
public void setToggle(boolean toggle) {
this.toggle = toggle;
}
}