mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-03 18:13:11 -04:00
Added accepting for missions, added first phase for delivery missions
This commit is contained in:
@@ -27,7 +27,8 @@ public class MissionAcceptRequest extends ObjControllerObject {
|
||||
|
||||
private long missionObjId;
|
||||
private long terminalObjId;
|
||||
|
||||
private byte terminalType;
|
||||
|
||||
public MissionAcceptRequest() { }
|
||||
|
||||
@Override
|
||||
@@ -36,6 +37,7 @@ public class MissionAcceptRequest extends ObjControllerObject {
|
||||
data.getInt();
|
||||
setMissionObjId(data.getLong());
|
||||
setTerminalObjId(data.getLong());
|
||||
setTerminalType(data.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -58,5 +60,12 @@ public class MissionAcceptRequest extends ObjControllerObject {
|
||||
public void setTerminalObjId(long terminalObjId) {
|
||||
this.terminalObjId = terminalObjId;
|
||||
}
|
||||
|
||||
|
||||
public void setTerminalType(byte terminalType) {
|
||||
this.terminalType = terminalType;
|
||||
}
|
||||
|
||||
public byte getTerminalType() {
|
||||
return terminalType;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,20 +21,43 @@
|
||||
******************************************************************************/
|
||||
package protocol.swg.objectControllerObjects;
|
||||
|
||||
import java.nio.ByteOrder;
|
||||
|
||||
import org.apache.mina.core.buffer.IoBuffer;
|
||||
|
||||
import protocol.swg.ObjControllerMessage;
|
||||
|
||||
public class MissionAcceptResponse extends ObjControllerObject {
|
||||
|
||||
private long objectId;
|
||||
private long missionObjId;
|
||||
private byte terminalType;
|
||||
private byte flag;
|
||||
|
||||
public MissionAcceptResponse(long objectId, long missionObjId, byte terminalType, byte flag) {
|
||||
this.objectId = objectId;
|
||||
this.missionObjId = missionObjId;
|
||||
this.terminalType = terminalType;
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(IoBuffer data) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public IoBuffer serialize() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
IoBuffer buffer = IoBuffer.allocate(27).order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
buffer.putInt(ObjControllerMessage.MISSION_ACCEPT_RESPONSE);
|
||||
buffer.putLong(objectId);
|
||||
buffer.putInt(0);
|
||||
|
||||
buffer.putLong(missionObjId);
|
||||
buffer.put(flag);
|
||||
buffer.put(terminalType);
|
||||
|
||||
return buffer.flip();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user