Project cleanup pre merge.
This commit is contained in:
@@ -18,81 +18,81 @@ import engine.net.client.Protocol;
|
||||
import engine.objects.AbstractGameObject;
|
||||
|
||||
public class SetObjectValueMsg extends ClientNetMsg {
|
||||
private int targetType;
|
||||
private int targetID;
|
||||
private int msgType;
|
||||
private AbstractGameObject ago;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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 SetObjectValueMsg(AbstractConnection origin, ByteBufferReader reader) {
|
||||
super(Protocol.SETOBJVAL, origin, reader);
|
||||
}
|
||||
|
||||
public SetObjectValueMsg() {
|
||||
super(Protocol.SETOBJVAL);
|
||||
}
|
||||
public SetObjectValueMsg(AbstractGameObject ago,int type) {
|
||||
super(Protocol.SETOBJVAL);
|
||||
if (ago == null)
|
||||
return;
|
||||
this.msgType = type;
|
||||
this.targetType = ago.getObjectType().ordinal();
|
||||
this.targetID = ago.getObjectUUID();
|
||||
this.ago = ago;
|
||||
|
||||
}
|
||||
/**
|
||||
* Deserializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _deserialize(ByteBufferReader reader) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
writer.putInt(this.targetType);
|
||||
writer.putInt(this.targetID);
|
||||
writer.putInt(0);
|
||||
writer.putInt(0);
|
||||
writer.putInt(msgType);
|
||||
writer.putInt(0);
|
||||
}
|
||||
private int targetType;
|
||||
private int targetID;
|
||||
private int msgType;
|
||||
private AbstractGameObject ago;
|
||||
|
||||
|
||||
|
||||
public AbstractGameObject getAgo() {
|
||||
return ago;
|
||||
}
|
||||
/**
|
||||
* 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 SetObjectValueMsg(AbstractConnection origin, ByteBufferReader reader) {
|
||||
super(Protocol.SETOBJVAL, origin, reader);
|
||||
}
|
||||
|
||||
public void setAgo(AbstractGameObject ago) {
|
||||
this.ago = ago;
|
||||
}
|
||||
public SetObjectValueMsg() {
|
||||
super(Protocol.SETOBJVAL);
|
||||
}
|
||||
|
||||
public int getTargetType() {
|
||||
return targetType;
|
||||
}
|
||||
public SetObjectValueMsg(AbstractGameObject ago, int type) {
|
||||
super(Protocol.SETOBJVAL);
|
||||
if (ago == null)
|
||||
return;
|
||||
this.msgType = type;
|
||||
this.targetType = ago.getObjectType().ordinal();
|
||||
this.targetID = ago.getObjectUUID();
|
||||
this.ago = ago;
|
||||
|
||||
public void setTargetType(int targetType) {
|
||||
this.targetType = targetType;
|
||||
}
|
||||
}
|
||||
|
||||
public int getTargetID() {
|
||||
return targetID;
|
||||
}
|
||||
/**
|
||||
* Deserializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _deserialize(ByteBufferReader reader) {
|
||||
|
||||
public void setTargetID(int targetID) {
|
||||
this.targetID = targetID;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
writer.putInt(this.targetType);
|
||||
writer.putInt(this.targetID);
|
||||
writer.putInt(0);
|
||||
writer.putInt(0);
|
||||
writer.putInt(msgType);
|
||||
writer.putInt(0);
|
||||
}
|
||||
|
||||
|
||||
public AbstractGameObject getAgo() {
|
||||
return ago;
|
||||
}
|
||||
|
||||
public void setAgo(AbstractGameObject ago) {
|
||||
this.ago = ago;
|
||||
}
|
||||
|
||||
public int getTargetType() {
|
||||
return targetType;
|
||||
}
|
||||
|
||||
public void setTargetType(int targetType) {
|
||||
this.targetType = targetType;
|
||||
}
|
||||
|
||||
public int getTargetID() {
|
||||
return targetID;
|
||||
}
|
||||
|
||||
public void setTargetID(int targetID) {
|
||||
this.targetID = targetID;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user