forked from MagicBane/Server
Project cleanup pre merge.
This commit is contained in:
@@ -21,81 +21,81 @@ import engine.objects.AbstractGameObject;
|
||||
|
||||
public class ClientAdminCommandMsg extends ClientNetMsg {
|
||||
|
||||
private int msgType;
|
||||
private String msgCommand;
|
||||
private long senderCompID;
|
||||
private int targetType;
|
||||
private int targetUUID;
|
||||
private Vector3f location;
|
||||
private AbstractGameObject target;
|
||||
private int msgType;
|
||||
private String msgCommand;
|
||||
private long senderCompID;
|
||||
private int targetType;
|
||||
private int targetUUID;
|
||||
private Vector3f location;
|
||||
private AbstractGameObject target;
|
||||
|
||||
/**
|
||||
* This is the general purpose constructor.
|
||||
*/
|
||||
public ClientAdminCommandMsg() {
|
||||
super(Protocol.CLIENTADMINCOMMAND);
|
||||
}
|
||||
/**
|
||||
* This is the general purpose constructor.
|
||||
*/
|
||||
public ClientAdminCommandMsg() {
|
||||
super(Protocol.CLIENTADMINCOMMAND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 ClientAdminCommandMsg(AbstractConnection origin, ByteBufferReader reader) {
|
||||
super(Protocol.CLIENTADMINCOMMAND, 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 ClientAdminCommandMsg(AbstractConnection origin, ByteBufferReader reader) {
|
||||
super(Protocol.CLIENTADMINCOMMAND, origin, reader);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the subclass specific items to the supplied ByteBufferWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
// TODO implement Serialize()
|
||||
}
|
||||
/**
|
||||
* Serializes the subclass specific items to the supplied ByteBufferWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
// TODO implement Serialize()
|
||||
}
|
||||
|
||||
/**
|
||||
* Deserializes the subclass specific items from the supplied ByteBufferReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _deserialize(ByteBufferReader reader) {
|
||||
this.msgType = reader.getInt();
|
||||
this.msgCommand = reader.getString();
|
||||
this.targetType = reader.getInt();
|
||||
this.targetUUID = reader.getInt();
|
||||
this.senderCompID = reader.getLong(); // always null??
|
||||
this.location = new Vector3f(reader.getFloat(), reader.getFloat(), reader.getFloat());
|
||||
/**
|
||||
* Deserializes the subclass specific items from the supplied ByteBufferReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _deserialize(ByteBufferReader reader) {
|
||||
this.msgType = reader.getInt();
|
||||
this.msgCommand = reader.getString();
|
||||
this.targetType = reader.getInt();
|
||||
this.targetUUID = reader.getInt();
|
||||
this.senderCompID = reader.getLong(); // always null??
|
||||
this.location = new Vector3f(reader.getFloat(), reader.getFloat(), reader.getFloat());
|
||||
|
||||
if (targetUUID != 0)
|
||||
target = DbManager.getObject(GameObjectType.values()[this.targetType], this.targetUUID);
|
||||
}
|
||||
if (targetUUID != 0)
|
||||
target = DbManager.getObject(GameObjectType.values()[this.targetType], this.targetUUID);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the msgCommand
|
||||
*/
|
||||
public String getMsgCommand() {
|
||||
return msgCommand;
|
||||
}
|
||||
/**
|
||||
* @return the msgCommand
|
||||
*/
|
||||
public String getMsgCommand() {
|
||||
return msgCommand;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the targetUUID
|
||||
*/
|
||||
public int getTargetUUID() {
|
||||
return targetUUID;
|
||||
}
|
||||
/**
|
||||
* @return the targetUUID
|
||||
*/
|
||||
public int getTargetUUID() {
|
||||
return targetUUID;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the location
|
||||
*/
|
||||
public Vector3f getLocation() {
|
||||
return location;
|
||||
}
|
||||
/**
|
||||
* @return the location
|
||||
*/
|
||||
public Vector3f getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the target
|
||||
*/
|
||||
public AbstractGameObject getTarget() {
|
||||
return target;
|
||||
}
|
||||
/**
|
||||
* @return the target
|
||||
*/
|
||||
public AbstractGameObject getTarget() {
|
||||
return target;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user