mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-02-28 18:53:37 +00:00
Merge pull request #144 from SouNourS/DelayedPathMountMsg
Packet: DelayedPathMountMsg
This commit is contained in:
commit
7a93501d38
3 changed files with 63 additions and 1 deletions
30
common/src/test/scala/game/DelayedPathMountMsgTest.scala
Normal file
30
common/src/test/scala/game/DelayedPathMountMsgTest.scala
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
// Copyright (c) 2017 PSForever
|
||||
package game
|
||||
|
||||
import org.specs2.mutable._
|
||||
import net.psforever.packet._
|
||||
import net.psforever.packet.game._
|
||||
import scodec.bits._
|
||||
|
||||
class DelayedPathMountMsgTest extends Specification {
|
||||
val string = hex"5a f50583044680"
|
||||
|
||||
"decode" in {
|
||||
PacketCoding.DecodePacket(string).require match {
|
||||
case DelayedPathMountMsg(player_guid, vehicle_guid,u3,u4) =>
|
||||
player_guid mustEqual PlanetSideGUID(1525)
|
||||
vehicle_guid mustEqual PlanetSideGUID(1155)
|
||||
u3 mustEqual 70
|
||||
u4 mustEqual true
|
||||
case _ =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"encode" in {
|
||||
val msg = DelayedPathMountMsg(PlanetSideGUID(1525), PlanetSideGUID(1155),70,true)
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual string
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue