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
@@ -20,55 +20,57 @@ import engine.objects.AbstractGameObject;
import engine.objects.Building;
public class VisualUpdateMessage extends ClientNetMsg {
private int effectType;
private AbstractGameObject ago;
private Building building;
private int effectType;
private AbstractGameObject ago;
private Building building;
/**
* 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 VisualUpdateMessage(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.VISUALUPDATE, origin, reader);
}
public VisualUpdateMessage() {
super(Protocol.VISUALUPDATE);
}
/**
* 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 VisualUpdateMessage(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.VISUALUPDATE, origin, reader);
}
public VisualUpdateMessage(AbstractGameObject ago, int visualID) {
super(Protocol.VISUALUPDATE);
public VisualUpdateMessage() {
super(Protocol.VISUALUPDATE);
}
if (ago == null)
return;
public VisualUpdateMessage(AbstractGameObject ago, int visualID) {
super(Protocol.VISUALUPDATE);
this.effectType = visualID;
this.ago = ago;
}
/**
* Deserializes the subclass specific items from the supplied NetMsgReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
}
if (ago == null)
return;
this.effectType = visualID;
this.ago = ago;
}
/**
* Deserializes the subclass specific items from the supplied NetMsgReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
}
public void configure() {
if (this.ago.getObjectType() == GameObjectType.Building)
this.building = (Building)this.ago;
this.building = (Building) this.ago;
else
this.building = null;
}
/**
* Serializes the subclass specific items to the supplied NetMsgWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
/**
* Serializes the subclass specific items to the supplied NetMsgWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
if (this.building == null) {
writer.putInt(4);
@@ -80,12 +82,12 @@ public class VisualUpdateMessage extends ClientNetMsg {
return;
}
writer.putShort((short)100);
writer.putShort((short)120);
writer.putShort((short) 100);
writer.putShort((short) 120);
writer.putInt(1);
writer.putInt(this.building.getObjectType().ordinal());
writer.putInt(this.building.getObjectUUID());
writer.putInt(this.effectType);
}
}
}