Project cleanup pre merge.
This commit is contained in:
@@ -24,82 +24,81 @@ import engine.net.client.Protocol;
|
||||
|
||||
public class TransferGoldFromInventoryToVaultMsg extends ClientNetMsg {
|
||||
|
||||
private int playerID;
|
||||
private int accountID;
|
||||
private int npcID;
|
||||
private int playerID;
|
||||
private int accountID;
|
||||
private int npcID;
|
||||
|
||||
private int amount;
|
||||
private int amount;
|
||||
|
||||
/**
|
||||
* This is the general purpose constructor
|
||||
*/
|
||||
public TransferGoldFromInventoryToVaultMsg() {
|
||||
super(Protocol.GOLDTOVAULT);
|
||||
/**
|
||||
* This is the general purpose constructor
|
||||
*/
|
||||
public TransferGoldFromInventoryToVaultMsg() {
|
||||
super(Protocol.GOLDTOVAULT);
|
||||
|
||||
}
|
||||
public TransferGoldFromInventoryToVaultMsg(int playerID, int npcID, int accountID, int amount) {
|
||||
super(Protocol.GOLDTOVAULT);
|
||||
this.playerID = playerID;
|
||||
this.npcID = npcID;
|
||||
this.accountID = accountID;
|
||||
this.amount = amount;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 TransferGoldFromInventoryToVaultMsg(AbstractConnection origin, ByteBufferReader reader)
|
||||
{
|
||||
super(Protocol.GOLDTOVAULT, origin, reader);
|
||||
}
|
||||
public TransferGoldFromInventoryToVaultMsg(int playerID, int npcID, int accountID, int amount) {
|
||||
super(Protocol.GOLDTOVAULT);
|
||||
this.playerID = playerID;
|
||||
this.npcID = npcID;
|
||||
this.accountID = accountID;
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deserializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _deserialize(ByteBufferReader reader)
|
||||
{
|
||||
reader.getInt();
|
||||
this.playerID = reader.getInt();
|
||||
reader.getInt();
|
||||
this.accountID = reader.getInt();
|
||||
reader.getInt();
|
||||
this.npcID = reader.getInt();
|
||||
this.amount = reader.getInt();
|
||||
}
|
||||
/**
|
||||
* 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 TransferGoldFromInventoryToVaultMsg(AbstractConnection origin, ByteBufferReader reader) {
|
||||
super(Protocol.GOLDTOVAULT, origin, reader);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
writer.putInt(GameObjectType.PlayerCharacter.ordinal());
|
||||
writer.putInt(this.playerID);
|
||||
writer.putInt(GameObjectType.Account.ordinal());
|
||||
writer.putInt(this.accountID);
|
||||
writer.putInt(GameObjectType.NPC.ordinal());
|
||||
writer.putInt(this.npcID);
|
||||
/**
|
||||
* Deserializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _deserialize(ByteBufferReader reader) {
|
||||
reader.getInt();
|
||||
this.playerID = reader.getInt();
|
||||
reader.getInt();
|
||||
this.accountID = reader.getInt();
|
||||
reader.getInt();
|
||||
this.npcID = reader.getInt();
|
||||
this.amount = reader.getInt();
|
||||
}
|
||||
|
||||
writer.putInt(this.amount);
|
||||
}
|
||||
/**
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
writer.putInt(GameObjectType.PlayerCharacter.ordinal());
|
||||
writer.putInt(this.playerID);
|
||||
writer.putInt(GameObjectType.Account.ordinal());
|
||||
writer.putInt(this.accountID);
|
||||
writer.putInt(GameObjectType.NPC.ordinal());
|
||||
writer.putInt(this.npcID);
|
||||
|
||||
writer.putInt(this.amount);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the amount
|
||||
*/
|
||||
public int getAmount() {
|
||||
return amount;
|
||||
}
|
||||
* @return the amount
|
||||
*/
|
||||
public int getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param amount the amount to set
|
||||
*/
|
||||
public void setAmount(int amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
/**
|
||||
* @param amount the amount to set
|
||||
*/
|
||||
public void setAmount(int amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user