Packet: ObjectDeleteMessage

* Add ObjectDeleteMessage packet

* Add ObjectDeleteMessage test

* Add ObjectDeleteMessage handler stub
This commit is contained in:
tfarley 2016-07-23 23:25:51 -07:00 committed by pschord
parent 427429b34c
commit dc6488edfc
4 changed files with 48 additions and 1 deletions

View file

@ -369,5 +369,26 @@ class GamePacketTest extends Specification {
pkt mustEqual string
}
}
"ObjectDeleteMessage" should {
val string = hex"19 4C00 00"
"decode" in {
PacketCoding.DecodePacket(string).require match {
case ObjectDeleteMessage(object_guid, unk1) =>
object_guid mustEqual PlanetSideGUID(76)
unk1 mustEqual 0
case default =>
ko
}
}
"encode" in {
val msg = ObjectDeleteMessage(PlanetSideGUID(76), 0)
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
pkt mustEqual string
}
}
}
}