forked from MagicBane/Server
Project cleanup pre merge.
This commit is contained in:
@@ -24,75 +24,73 @@ import engine.objects.AbstractGameObject;
|
||||
|
||||
public class InvalidTradeRequestMsg extends ClientNetMsg {
|
||||
|
||||
private int unknown01;
|
||||
private int busyType;
|
||||
private int busyID;
|
||||
private int requesterType;
|
||||
private int requesterID;
|
||||
private int unknown01;
|
||||
private int busyType;
|
||||
private int busyID;
|
||||
private int requesterType;
|
||||
private int requesterID;
|
||||
|
||||
/**
|
||||
* This is the general purpose constructor
|
||||
*/
|
||||
public InvalidTradeRequestMsg(int unknown01, AbstractGameObject busy, AbstractGameObject requester) {
|
||||
super(Protocol.ARCREQUESTTRADEBUSY);
|
||||
this.busyType = busy.getObjectType().ordinal();
|
||||
this.busyID = busy.getObjectUUID();
|
||||
this.requesterType = requester.getObjectType().ordinal();
|
||||
this.requesterID = requester.getObjectUUID();
|
||||
this.unknown01 = unknown01;
|
||||
|
||||
}
|
||||
/**
|
||||
* This is the general purpose constructor
|
||||
*/
|
||||
public InvalidTradeRequestMsg(int unknown01, AbstractGameObject busy, AbstractGameObject requester) {
|
||||
super(Protocol.ARCREQUESTTRADEBUSY);
|
||||
this.busyType = busy.getObjectType().ordinal();
|
||||
this.busyID = busy.getObjectUUID();
|
||||
this.requesterType = requester.getObjectType().ordinal();
|
||||
this.requesterID = requester.getObjectUUID();
|
||||
this.unknown01 = unknown01;
|
||||
|
||||
/**
|
||||
* 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 InvalidTradeRequestMsg(AbstractConnection origin, ByteBufferReader reader)
|
||||
{
|
||||
super(Protocol.ARCREQUESTTRADEBUSY, origin, reader);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deserializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _deserialize(ByteBufferReader reader)
|
||||
{
|
||||
unknown01 = reader.getInt();
|
||||
busyType = reader.getInt();
|
||||
busyID = reader.getInt();
|
||||
requesterType = reader.getInt();
|
||||
requesterID = 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 InvalidTradeRequestMsg(AbstractConnection origin, ByteBufferReader reader) {
|
||||
super(Protocol.ARCREQUESTTRADEBUSY, origin, reader);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
writer.putInt(unknown01);
|
||||
writer.putInt(busyType);
|
||||
writer.putInt(busyID);
|
||||
writer.putInt(requesterType);
|
||||
writer.putInt(requesterID);
|
||||
}
|
||||
/**
|
||||
* Deserializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _deserialize(ByteBufferReader reader) {
|
||||
unknown01 = reader.getInt();
|
||||
busyType = reader.getInt();
|
||||
busyID = reader.getInt();
|
||||
requesterType = reader.getInt();
|
||||
requesterID = 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(busyType);
|
||||
writer.putInt(busyID);
|
||||
writer.putInt(requesterType);
|
||||
writer.putInt(requesterID);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param unknown01 the unknown01 to set
|
||||
*/
|
||||
public void setUnknown01(int unknown01) {
|
||||
this.unknown01 = unknown01;
|
||||
}
|
||||
/**
|
||||
* @return the unknown01
|
||||
*/
|
||||
public int getUnknown01() {
|
||||
return unknown01;
|
||||
}
|
||||
|
||||
public int getRequesterID() {
|
||||
return requesterID;
|
||||
}
|
||||
/**
|
||||
* @param unknown01 the unknown01 to set
|
||||
*/
|
||||
public void setUnknown01(int unknown01) {
|
||||
this.unknown01 = unknown01;
|
||||
}
|
||||
|
||||
public int getRequesterID() {
|
||||
return requesterID;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user