Merge branch 'training-zone'

This commit is contained in:
FateJH 2017-01-11 22:36:03 -05:00
commit 0e784d217f
3 changed files with 67 additions and 2 deletions

View file

@ -1017,7 +1017,7 @@ class GamePacketTest extends Specification {
pkt mustEqual string
}
}
"FriendsResponse" should {
val stringOneFriend = hex"73 61 8C 60 4B007500720074004800650063007400690063002D004700 00"
val stringManyFriends = hex"73 01 AC 48 4100 6E00 6700 6500 6C00 6C00 6F00 2D00 5700 47 00 7400 6800 6500 7000 6800 6100 7400 7400 7000 6800 7200 6F00 6700 6700 46 80 4B00 6900 6D00 7000 6F00 7300 7300 6900 6200 6C00 6500 3100 3200 45 00 5A00 6500 6100 7200 7400 6800 6C00 6900 6E00 6700 46 00 4B00 7500 7200 7400 4800 6500 6300 7400 6900 6300 2D00 4700 00"
@ -1122,6 +1122,26 @@ class GamePacketTest extends Specification {
}
}
"TrainingZoneMessage" should {
val string = hex"75 13 000000"
"decode" in {
PacketCoding.DecodePacket(string).require match {
case TrainingZoneMessage(zone, unk) =>
zone mustEqual PlanetSideGUID(19)
case default =>
ko
}
}
"encode" in {
val msg = TrainingZoneMessage(PlanetSideGUID(19))
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
pkt mustEqual string
}
}
"WeaponDryFireMessage" should {
val string = hex"52 4C00"