Project cleanup pre merge.
This commit is contained in:
@@ -24,107 +24,105 @@ import engine.objects.AbstractGameObject;
|
||||
*/
|
||||
public class TradeRequestMsg extends ClientNetMsg {
|
||||
|
||||
private int unknown01; //pad?
|
||||
private int playerType;
|
||||
private int playerID;
|
||||
private int sourceType;
|
||||
private int sourceID;
|
||||
private int unknown01; //pad?
|
||||
private int playerType;
|
||||
private int playerID;
|
||||
private int sourceType;
|
||||
private int sourceID;
|
||||
|
||||
|
||||
/**
|
||||
* This is the general purpose constructor
|
||||
*/
|
||||
public TradeRequestMsg(int unknown01, AbstractGameObject player, AbstractGameObject target) {
|
||||
super(Protocol.REQUESTTOTRADE);
|
||||
this.unknown01 = unknown01;
|
||||
this.sourceType = player.getObjectType().ordinal();
|
||||
this.sourceID = player.getObjectUUID();
|
||||
this.playerType = target.getObjectType().ordinal();
|
||||
this.playerID = target.getObjectUUID();
|
||||
|
||||
}
|
||||
/**
|
||||
* This is the general purpose constructor
|
||||
*/
|
||||
public TradeRequestMsg(int unknown01, AbstractGameObject player, AbstractGameObject target) {
|
||||
super(Protocol.REQUESTTOTRADE);
|
||||
this.unknown01 = unknown01;
|
||||
this.sourceType = player.getObjectType().ordinal();
|
||||
this.sourceID = player.getObjectUUID();
|
||||
this.playerType = target.getObjectType().ordinal();
|
||||
this.playerID = 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 TradeRequestMsg(AbstractConnection origin, ByteBufferReader reader)
|
||||
{
|
||||
super(Protocol.REQUESTTOTRADE, origin, reader);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deserializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _deserialize(ByteBufferReader reader)
|
||||
{
|
||||
unknown01 = reader.getInt();
|
||||
this.sourceType = reader.getInt();
|
||||
this.sourceID = reader.getInt();
|
||||
this.playerType = reader.getInt();
|
||||
this.playerID = 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 TradeRequestMsg(AbstractConnection origin, ByteBufferReader reader) {
|
||||
super(Protocol.REQUESTTOTRADE, origin, reader);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
writer.putInt(unknown01);
|
||||
writer.putInt(this.sourceType);
|
||||
writer.putInt(this.sourceID);
|
||||
writer.putInt(this.playerType);
|
||||
writer.putInt(this.playerID);
|
||||
|
||||
|
||||
}
|
||||
/**
|
||||
* Deserializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _deserialize(ByteBufferReader reader) {
|
||||
unknown01 = reader.getInt();
|
||||
this.sourceType = reader.getInt();
|
||||
this.sourceID = reader.getInt();
|
||||
this.playerType = reader.getInt();
|
||||
this.playerID = reader.getInt();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the unknown01
|
||||
*/
|
||||
public int getUnknown01() {
|
||||
return unknown01;
|
||||
}
|
||||
/**
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
writer.putInt(unknown01);
|
||||
writer.putInt(this.sourceType);
|
||||
writer.putInt(this.sourceID);
|
||||
writer.putInt(this.playerType);
|
||||
writer.putInt(this.playerID);
|
||||
|
||||
/**
|
||||
* @param unknown01 the unknown01 to set
|
||||
*/
|
||||
public void setUnknown01(int unknown01) {
|
||||
this.unknown01 = unknown01;
|
||||
}
|
||||
|
||||
|
||||
public int getPlayerType() {
|
||||
return playerType;
|
||||
}
|
||||
}
|
||||
|
||||
public void setPlayerType(int playerType) {
|
||||
this.playerType = playerType;
|
||||
}
|
||||
/**
|
||||
* @return the unknown01
|
||||
*/
|
||||
public int getUnknown01() {
|
||||
return unknown01;
|
||||
}
|
||||
|
||||
public int getPlayerID() {
|
||||
return playerID;
|
||||
}
|
||||
/**
|
||||
* @param unknown01 the unknown01 to set
|
||||
*/
|
||||
public void setUnknown01(int unknown01) {
|
||||
this.unknown01 = unknown01;
|
||||
}
|
||||
|
||||
public void setPlayerID(int playerID) {
|
||||
this.playerID = playerID;
|
||||
}
|
||||
|
||||
public int getSourceType() {
|
||||
return sourceType;
|
||||
}
|
||||
public int getPlayerType() {
|
||||
return playerType;
|
||||
}
|
||||
|
||||
public void setSourceType(int sourceType) {
|
||||
this.sourceType = sourceType;
|
||||
}
|
||||
public void setPlayerType(int playerType) {
|
||||
this.playerType = playerType;
|
||||
}
|
||||
|
||||
public int getSourceID() {
|
||||
return sourceID;
|
||||
}
|
||||
public int getPlayerID() {
|
||||
return playerID;
|
||||
}
|
||||
|
||||
public void setSourceID(int sourceID) {
|
||||
this.sourceID = sourceID;
|
||||
}
|
||||
public void setPlayerID(int playerID) {
|
||||
this.playerID = playerID;
|
||||
}
|
||||
|
||||
public int getSourceType() {
|
||||
return sourceType;
|
||||
}
|
||||
|
||||
public void setSourceType(int sourceType) {
|
||||
this.sourceType = sourceType;
|
||||
}
|
||||
|
||||
public int getSourceID() {
|
||||
return sourceID;
|
||||
}
|
||||
|
||||
public void setSourceID(int sourceID) {
|
||||
this.sourceID = sourceID;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user