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,70 +20,70 @@ import engine.server.world.WorldServer;
public class ChatGlobalMsg extends AbstractChatMsg {
/**
* This is the general purpose constructor.
*/
//chat global is using leader channel protocolMsg now.
public ChatGlobalMsg(AbstractWorldObject source, String message) {
super(Protocol.LEADERCHANNELMESSAGE, source, message);
}
/**
* This is the general purpose constructor.
*/
/**
* 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 ChatGlobalMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.LEADERCHANNELMESSAGE, origin, reader);
}
//chat global is using leader channel protocolMsg now.
public ChatGlobalMsg(AbstractWorldObject source, String message) {
super(Protocol.LEADERCHANNELMESSAGE, source, message);
}
/**
* Copy constructor
*/
public ChatGlobalMsg(ChatGlobalMsg msg) {
super(msg);
}
/**
* 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 ChatGlobalMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.LEADERCHANNELMESSAGE, origin, reader);
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.sourceType = reader.getInt();
this.sourceID = reader.getInt();
this.unknown01 = reader.getInt();
/**
* Copy constructor
*/
public ChatGlobalMsg(ChatGlobalMsg msg) {
super(msg);
}
this.message = reader.getString();
this.sourceName = reader.getString();
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.sourceType = reader.getInt();
this.sourceID = reader.getInt();
this.unknown01 = reader.getInt();
this.unknown02 = reader.getInt();
reader.getInt();
reader.getInt();
reader.getInt();
}
this.message = reader.getString();
this.sourceName = reader.getString();
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.sourceType);
writer.putInt(this.sourceID);
writer.putInt(this.unknown01);
writer.putString(this.message);
if (this.source == null) {
// TODO log error here
writer.putString("");
writer.putInt(0);
} else {
this.unknown02 = reader.getInt();
reader.getInt();
reader.getInt();
reader.getInt();
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.sourceType);
writer.putInt(this.sourceID);
writer.putInt(this.unknown01);
writer.putString(this.message);
if (this.source == null) {
// TODO log error here
writer.putString("");
writer.putInt(0);
} else {
writer.putString(((AbstractCharacter) this.source).getFirstName());
writer.putInt(WorldServer.worldMapID);
}
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
}
}
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
}
}