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
+46 -45
View File
@@ -19,58 +19,59 @@ import engine.objects.AbstractGameObject;
/**
* Vault window opened
*
* @author Eighty
*/
public class OpenVaultMsg extends ClientNetMsg {
private int playerType;
private int playerID;
private int npcType;
private int npcID;
private int playerType;
private int playerID;
private int npcType;
private int npcID;
/**
* This is the general purpose constructor.
*/
public OpenVaultMsg(AbstractGameObject ago, AbstractGameObject target) {
super(Protocol.OPENVAULT);
this.playerType = ago.getObjectType().ordinal();
this.playerID = ago.getObjectUUID();
this.npcType = target.getObjectType().ordinal();
this.npcID = target.getObjectUUID();
}
/**
* 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 OpenVaultMsg(AbstractConnection origin,
ByteBufferReader reader) {
super(Protocol.OPENVAULT, origin, reader);
}
/**
* This is the general purpose constructor.
*/
public OpenVaultMsg(AbstractGameObject ago, AbstractGameObject target) {
super(Protocol.OPENVAULT);
this.playerType = ago.getObjectType().ordinal();
this.playerID = ago.getObjectUUID();
this.npcType = target.getObjectType().ordinal();
this.npcID = target.getObjectUUID();
/**
* Deserializes the subclass specific items to the supplied NetMsgWriter.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
playerType = reader.getInt();
playerID = reader.getInt();
npcType = reader.getInt();
npcID = reader.getInt();
}
}
/**
* Serializes the subclass specific items from the supplied NetMsgReader.
*/
@Override
protected void _serialize(ByteBufferWriter writer)
throws SerializationException {
writer.putInt(playerType);
writer.putInt(playerID);
writer.putInt(npcType);
writer.putInt(npcID);
}
/**
* 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 OpenVaultMsg(AbstractConnection origin,
ByteBufferReader reader) {
super(Protocol.OPENVAULT, origin, reader);
}
/**
* Deserializes the subclass specific items to the supplied NetMsgWriter.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
playerType = reader.getInt();
playerID = reader.getInt();
npcType = reader.getInt();
npcID = reader.getInt();
}
/**
* Serializes the subclass specific items from the supplied NetMsgReader.
*/
@Override
protected void _serialize(ByteBufferWriter writer)
throws SerializationException {
writer.putInt(playerType);
writer.putInt(playerID);
writer.putInt(npcType);
writer.putInt(npcID);
}
}