mirror of
https://github.com/ProjectSWGCore/pswgcommon.git
synced 2026-01-17 00:04:25 -05:00
Added MissionAcceptResponse packet
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
package com.projectswg.common.network.packets.swg.zone.object_controller
|
||||
|
||||
import com.projectswg.common.network.NetBuffer
|
||||
|
||||
class MissionAcceptResponse : ObjectController {
|
||||
|
||||
var missionObjectId = 0L
|
||||
var terminalType = 0
|
||||
var success = 0
|
||||
|
||||
constructor(receiverId: Long) : super(receiverId, CRC)
|
||||
|
||||
constructor(data: NetBuffer) : super(CRC) {
|
||||
decode(data)
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val CRC = 0x00FA
|
||||
}
|
||||
|
||||
override fun decode(data: NetBuffer) {
|
||||
decodeHeader(data)
|
||||
missionObjectId = data.long
|
||||
terminalType = data.byte.toInt()
|
||||
success = data.byte.toInt()
|
||||
}
|
||||
|
||||
override fun encode(): NetBuffer {
|
||||
val data = NetBuffer.allocate(HEADER_LENGTH + 10)
|
||||
encodeHeader(data)
|
||||
data.addLong(missionObjectId)
|
||||
data.addByte(terminalType)
|
||||
data.addByte(success)
|
||||
return data
|
||||
}
|
||||
}
|
||||
@@ -144,6 +144,7 @@ public abstract class ObjectController extends SWGPacket {
|
||||
case 0x04C5: return new IntendedTarget(data);
|
||||
case 0x00F5: return new MissionListRequest(data);
|
||||
case 0x00F9: return new MissionAcceptRequest(data);
|
||||
case MissionAcceptResponse.CRC: return new MissionAcceptResponse(data);
|
||||
case 0x041C: return new JTLTerminalSharedMessage(data);
|
||||
case 0x0115: return new SecureTrade(data);
|
||||
case QuestTaskCounterMessage.CRC: return new QuestTaskCounterMessage(data);
|
||||
|
||||
Reference in New Issue
Block a user