forked from MagicBane/Server
Project cleanup pre merge.
This commit is contained in:
@@ -17,65 +17,65 @@ import engine.net.client.Protocol;
|
||||
|
||||
public class TargetObjectMsg extends ClientNetMsg {
|
||||
|
||||
private int targetType;
|
||||
private int targetID;
|
||||
private int targetType;
|
||||
private int targetID;
|
||||
|
||||
/**
|
||||
* This is the general purpose constructor.
|
||||
*/
|
||||
public TargetObjectMsg(int targetType, int targetID) {
|
||||
super(Protocol.SETSELECTEDOBECT);
|
||||
this.targetType = targetType;
|
||||
this.targetID = targetID;
|
||||
}
|
||||
/**
|
||||
* This is the general purpose constructor.
|
||||
*/
|
||||
public TargetObjectMsg(int targetType, int targetID) {
|
||||
super(Protocol.SETSELECTEDOBECT);
|
||||
this.targetType = targetType;
|
||||
this.targetID = targetID;
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the general purpose constructor.
|
||||
*/
|
||||
public TargetObjectMsg() {
|
||||
super(Protocol.SETSELECTEDOBECT);
|
||||
}
|
||||
/**
|
||||
* This is the general purpose constructor.
|
||||
*/
|
||||
public TargetObjectMsg() {
|
||||
super(Protocol.SETSELECTEDOBECT);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 TargetObjectMsg(AbstractConnection origin, ByteBufferReader reader) {
|
||||
super(Protocol.SETSELECTEDOBECT, origin, 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 TargetObjectMsg(AbstractConnection origin, ByteBufferReader reader) {
|
||||
super(Protocol.SETSELECTEDOBECT, origin, reader);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(this.targetType);
|
||||
writer.putInt(this.targetID);
|
||||
}
|
||||
/**
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(this.targetType);
|
||||
writer.putInt(this.targetID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deserializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _deserialize(ByteBufferReader reader) {
|
||||
this.targetType = reader.getInt();
|
||||
this.targetID = reader.getInt();
|
||||
}
|
||||
/**
|
||||
* Deserializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _deserialize(ByteBufferReader reader) {
|
||||
this.targetType = reader.getInt();
|
||||
this.targetID = reader.getInt();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the targetType
|
||||
*/
|
||||
public int getTargetType() {
|
||||
return targetType;
|
||||
}
|
||||
/**
|
||||
* @return the targetType
|
||||
*/
|
||||
public int getTargetType() {
|
||||
return targetType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the targetID
|
||||
*/
|
||||
public int getTargetID() {
|
||||
return targetID;
|
||||
}
|
||||
/**
|
||||
* @return the targetID
|
||||
*/
|
||||
public int getTargetID() {
|
||||
return targetID;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user