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
@@ -21,75 +21,72 @@ import engine.objects.Realm;
public class TerritoryChangeMessage extends ClientNetMsg {
private Realm realm;
private PlayerCharacter realmOwner;
private Realm realm;
private PlayerCharacter realmOwner;
/**
* 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 TerritoryChangeMessage(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.TERRITORYCHANGE, 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 TerritoryChangeMessage(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.TERRITORYCHANGE, origin, reader);
}
/**
* Deserializes the subclass specific items from the supplied NetMsgReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
public TerritoryChangeMessage() {
super(Protocol.TERRITORYCHANGE);
}
public TerritoryChangeMessage(PlayerCharacter guildLeader, Realm realm) {
super(Protocol.TERRITORYCHANGE);
this.realm = realm;
this.realmOwner = guildLeader;
}
/**
* Deserializes the subclass specific items from the supplied NetMsgReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
}
}
public TerritoryChangeMessage() {
super(Protocol.TERRITORYCHANGE);
}
/**
* Serializes the subclass specific items to the supplied NetMsgWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
public TerritoryChangeMessage(PlayerCharacter guildLeader, Realm realm) {
super(Protocol.TERRITORYCHANGE);
this.realm = realm;
this.realmOwner = guildLeader;
}
/**
* Serializes the subclass specific items to the supplied NetMsgWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
writer.putString(realm.getRealmName());
if(this.realmOwner != null){
writer.putString(this.realmOwner.getCombinedName());
writer.putInt(PlayerCharacter.GetPlayerRealmTitle(this.realmOwner));
writer.putInt(1);
writer.put((byte)1);
writer.put((byte)1);
writer.putInt(realm.getCharterType());
if (this.realmOwner != null && this.realmOwner.getGuild() != null)
writer.putString(this.realmOwner.getGuild().getName());
else
writer.putString("None");
writer.put((byte)0);
}else{
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.put((byte)1);
writer.put((byte)1);
writer.putInt(0);
writer.putInt(0);
writer.put((byte)0);
}
}
writer.putString(realm.getRealmName());
if (this.realmOwner != null) {
writer.putString(this.realmOwner.getCombinedName());
writer.putInt(PlayerCharacter.GetPlayerRealmTitle(this.realmOwner));
writer.putInt(1);
writer.put((byte) 1);
writer.put((byte) 1);
writer.putInt(realm.getCharterType());
if (this.realmOwner != null && this.realmOwner.getGuild() != null)
writer.putString(this.realmOwner.getGuild().getName());
else
writer.putString("None");
writer.put((byte) 0);
} else {
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.put((byte) 1);
writer.put((byte) 1);
writer.putInt(0);
writer.putInt(0);
writer.put((byte) 0);
}
}
}