mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-02-25 01:23:36 +00:00
Packet: ZoneForcedCavernConnectionsMessage (#122)
* initial ZoneForcedCavernConnectionsMessage packet and tests * adjusted tests so that 2u field has a value; minor comment change to packet file
This commit is contained in:
parent
1f713a52f6
commit
07a23d7d26
3 changed files with 56 additions and 1 deletions
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (c) 2017 PSForever
|
||||
package game
|
||||
|
||||
import org.specs2.mutable._
|
||||
import net.psforever.packet._
|
||||
import net.psforever.packet.game._
|
||||
import net.psforever.types.Vector3
|
||||
import scodec.bits._
|
||||
|
||||
class ZoneForcedCavernConnectionsMessageTest extends Specification {
|
||||
val string = hex"E3200040"
|
||||
|
||||
"decode" in {
|
||||
PacketCoding.DecodePacket(string).require match {
|
||||
case ZoneForcedCavernConnectionsMessage(zone, unk) =>
|
||||
zone mustEqual PlanetSideGUID(32)
|
||||
unk mustEqual 1
|
||||
case _ =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"encode" in {
|
||||
val msg = ZoneForcedCavernConnectionsMessage(PlanetSideGUID(32), 1)
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual string
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue