Merge pull request #531 from ProjectSWGCore/Wave_Missions

Delivery Missions
This commit is contained in:
Waverunner
2014-04-25 17:29:42 -04:00
18 changed files with 1293 additions and 451 deletions
@@ -0,0 +1,61 @@
/*******************************************************************************
* Copyright (c) 2013 <Project SWG>
*
* This File is part of NGECore2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Using NGEngine to work with NGECore2 is making a combined work based on NGEngine.
* Therefore all terms and conditions of the GNU Lesser General Public License cover the combination.
******************************************************************************/
package protocol.swg.objectControllerObjects;
import java.nio.ByteOrder;
import org.apache.mina.core.buffer.IoBuffer;
import protocol.swg.ObjControllerMessage;
public class MissionAbort extends ObjControllerObject {
private long characterId;
private long missionId;
public MissionAbort() { }
@Override
public void deserialize(IoBuffer data) {
setCharacterId(data.getLong());
data.getInt();
setMissionId(data.getLong());
}
@Override
public IoBuffer serialize() {
IoBuffer buffer = IoBuffer.allocate(32).order(ByteOrder.LITTLE_ENDIAN);
buffer.putInt(ObjControllerMessage.MISSION_ABORT_RESPONSE);
buffer.putLong(characterId);
buffer.putInt(0);
buffer.putLong(missionId);
return null;
}
public long getMissionId() { return missionId; }
public void setMissionId(long missionId) { this.missionId = missionId; }
public long getCharacterId() { return characterId; }
public void setCharacterId(long characterId) { this.characterId = characterId; }
}
@@ -0,0 +1,71 @@
/*******************************************************************************
* Copyright (c) 2013 <Project SWG>
*
* This File is part of NGECore2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Using NGEngine to work with NGECore2 is making a combined work based on NGEngine.
* Therefore all terms and conditions of the GNU Lesser General Public License cover the combination.
******************************************************************************/
package protocol.swg.objectControllerObjects;
import org.apache.mina.core.buffer.IoBuffer;
public class MissionAcceptRequest extends ObjControllerObject {
private long missionObjId;
private long terminalObjId;
private byte terminalType;
public MissionAcceptRequest() { }
@Override
public void deserialize(IoBuffer data) {
data.getLong();
data.getInt();
setMissionObjId(data.getLong());
setTerminalObjId(data.getLong());
setTerminalType(data.get());
}
@Override
public IoBuffer serialize() {
return null;
}
public long getMissionObjId() {
return missionObjId;
}
public void setMissionObjId(long misssionObjId) {
this.missionObjId = misssionObjId;
}
public long getTerminalObjId() {
return terminalObjId;
}
public void setTerminalObjId(long terminalObjId) {
this.terminalObjId = terminalObjId;
}
public void setTerminalType(byte terminalType) {
this.terminalType = terminalType;
}
public byte getTerminalType() {
return terminalType;
}
}
@@ -0,0 +1,63 @@
/*******************************************************************************
* Copyright (c) 2013 <Project SWG>
*
* This File is part of NGECore2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Using NGEngine to work with NGECore2 is making a combined work based on NGEngine.
* Therefore all terms and conditions of the GNU Lesser General Public License cover the combination.
******************************************************************************/
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) {
}
@Override
public IoBuffer serialize() {
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();
}
}
@@ -34,7 +34,7 @@ public class MissionListRequest extends ObjControllerObject {
@Override
public void deserialize(IoBuffer data) {
Console.println("MissionListRequest: " + StringUtilities.bytesToHex(data.array()));
//Console.println("MissionListRequest: " + StringUtilities.bytesToHex(data.array()));
setObjectId(data.getLong());
data.getInt(); // unk
data.get(); // unk byte