mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-03 12:10:22 +00:00
Add BailType enumeration and update parameters for vehicle dismounting with correct naming and type
This commit is contained in:
parent
cfe2dffa44
commit
6f65603942
8 changed files with 52 additions and 33 deletions
|
|
@ -5,23 +5,24 @@ import org.specs2.mutable._
|
|||
import net.psforever.packet._
|
||||
import net.psforever.packet.game._
|
||||
import scodec.bits._
|
||||
import net.psforever.types.BailType
|
||||
|
||||
class DismountVehicleMsgTest extends Specification {
|
||||
val string = hex"0F C609 00"
|
||||
|
||||
"decode" in {
|
||||
PacketCoding.DecodePacket(string).require match {
|
||||
case DismountVehicleMsg(player_guid, unk1, unk2) =>
|
||||
case DismountVehicleMsg(player_guid, bailType, wasKickedByDriver) =>
|
||||
player_guid mustEqual PlanetSideGUID(2502)
|
||||
unk1 mustEqual 0
|
||||
unk2 mustEqual false
|
||||
bailType mustEqual 0
|
||||
wasKickedByDriver mustEqual false
|
||||
case _ =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"encode" in {
|
||||
val msg = DismountVehicleMsg(PlanetSideGUID(2502), 0, false)
|
||||
val msg = DismountVehicleMsg(PlanetSideGUID(2502), BailType.Normal, false)
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue