Merge pull request #86 from Fate-JH/proximity-terminal

Added: ProximityTerminalUseMessage Packet
This commit is contained in:
Fate-JH 2017-03-02 07:32:01 -05:00 committed by GitHub
commit d1a0ee2bd1
3 changed files with 55 additions and 1 deletions

View file

@ -1212,6 +1212,25 @@ class GamePacketTest extends Specification {
}
}
"ProximityTerminalUseMessage" should {
val string = hex"C3 4B00 A700 80"
"decode" in {
PacketCoding.DecodePacket(string).require match {
case ProximityTerminalUseMessage(player_guid, object_guid, unk) =>
player_guid mustEqual PlanetSideGUID(75)
object_guid mustEqual PlanetSideGUID(167)
unk mustEqual true
case _ =>
ko
}
}
"encode" in {
val msg = ProximityTerminalUseMessage(PlanetSideGUID(75), PlanetSideGUID(167), true)
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
pkt mustEqual string
}
}
"UseItemMessage" should {
val string = hex"10 4B00 0000 7401 FFFFFFFF 4001000000000000000000000000058C803600800000"