forked from MagicBane/Server
Project cleanup pre merge.
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
@@ -20,50 +19,51 @@ import engine.objects.Account;
|
||||
|
||||
/**
|
||||
* Vault inventory contents
|
||||
*
|
||||
* @author Eighty
|
||||
*/
|
||||
public class UpdateVaultMsg extends ClientNetMsg {
|
||||
|
||||
private int accountType;
|
||||
private int accountID;
|
||||
|
||||
|
||||
/**
|
||||
* This is the general purpose constructor.
|
||||
*/
|
||||
public UpdateVaultMsg(Account account) {
|
||||
super(Protocol.CLIENTUPDATEVAULT);
|
||||
this.accountType = account.getObjectType().ordinal();
|
||||
this.accountID = account.getObjectUUID();
|
||||
}
|
||||
private int accountType;
|
||||
private int accountID;
|
||||
|
||||
/**
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
writer.putInt(accountType);
|
||||
writer.putInt(accountID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 UpdateVaultMsg(AbstractConnection origin,
|
||||
ByteBufferReader reader) {
|
||||
super(Protocol.CLIENTUPDATEVAULT, origin, reader);
|
||||
}
|
||||
/**
|
||||
* This is the general purpose constructor.
|
||||
*/
|
||||
public UpdateVaultMsg(Account account) {
|
||||
super(Protocol.CLIENTUPDATEVAULT);
|
||||
this.accountType = account.getObjectType().ordinal();
|
||||
this.accountID = account.getObjectUUID();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deserializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _deserialize(ByteBufferReader 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 UpdateVaultMsg(AbstractConnection origin,
|
||||
ByteBufferReader reader) {
|
||||
super(Protocol.CLIENTUPDATEVAULT, origin, reader);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getPowerOfTwoBufferSize() {
|
||||
return 17;
|
||||
}
|
||||
/**
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
writer.putInt(accountType);
|
||||
writer.putInt(accountID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deserializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _deserialize(ByteBufferReader reader) {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getPowerOfTwoBufferSize() {
|
||||
return 17;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user