Merge branch 'mount-vehicle'

This commit is contained in:
FateJH 2017-01-18 22:23:35 -05:00
commit e06fb91b1f
4 changed files with 63 additions and 1 deletions

View file

@ -915,6 +915,28 @@ class GamePacketTest extends Specification {
}
}
"MountVehicleMsg" should {
val string = hex"0E E104 6704 06"
"decode" in {
PacketCoding.DecodePacket(string).require match {
case MountVehicleMsg(player_guid, vehicle_guid, entry) =>
player_guid mustEqual PlanetSideGUID(1249)
vehicle_guid mustEqual PlanetSideGUID(1127)
entry mustEqual 6
case default =>
ko
}
}
"encode" in {
val msg = MountVehicleMsg(PlanetSideGUID(1249), PlanetSideGUID(1127), 6)
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
pkt mustEqual string
}
}
"ObjectHeldMessage" should {
val string = hex"33 4B00 02 00"