mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-03 12:10:22 +00:00
Packet: DismountVehicleMsg (#114)
* initial DismountVehicleMsg packet and test * copyright corrections
This commit is contained in:
parent
9275150c4b
commit
aa82ae9676
4 changed files with 64 additions and 2 deletions
29
common/src/test/scala/game/DismountVehicleMsgTest.scala
Normal file
29
common/src/test/scala/game/DismountVehicleMsgTest.scala
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (c) 2017 PSForever
|
||||
package game
|
||||
|
||||
import org.specs2.mutable._
|
||||
import net.psforever.packet._
|
||||
import net.psforever.packet.game._
|
||||
import scodec.bits._
|
||||
|
||||
class DismountVehicleMsgTest extends Specification {
|
||||
val string = hex"0F C609 00"
|
||||
|
||||
"decode" in {
|
||||
PacketCoding.DecodePacket(string).require match {
|
||||
case DismountVehicleMsg(player_guid, unk1, unk2) =>
|
||||
player_guid mustEqual PlanetSideGUID(2502)
|
||||
unk1 mustEqual 0
|
||||
unk2 mustEqual false
|
||||
case _ =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"encode" in {
|
||||
val msg = DismountVehicleMsg(PlanetSideGUID(2502), 0, false)
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual string
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue