Packet: DropItemMessage

* Add DropItemMessage packet

* Add DropItemMessage test

* Add DropItemMessage handler stub
This commit is contained in:
tfarley 2016-07-23 18:40:59 -07:00 committed by pschord
parent 3e980bbe15
commit 47bef6e83b
4 changed files with 43 additions and 1 deletions

View file

@ -285,5 +285,25 @@ class GamePacketTest extends Specification {
pkt mustEqual string
}
}
"DropItemMessage" should {
val string = hex"37 4C00"
"decode" in {
PacketCoding.DecodePacket(string).require match {
case DropItemMessage(item_guid) =>
item_guid mustEqual PlanetSideGUID(76)
case default =>
ko
}
}
"encode" in {
val msg = DropItemMessage(PlanetSideGUID(76))
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
pkt mustEqual string
}
}
}
}