mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-02-21 23:53:36 +00:00
bringing over zip line work from aux repo
This commit is contained in:
parent
b4d87bac54
commit
d46381d5c8
4 changed files with 114 additions and 1 deletions
|
|
@ -1139,6 +1139,32 @@ class GamePacketTest extends Specification {
|
|||
}
|
||||
}
|
||||
|
||||
"ZipLineMessage" should {
|
||||
val string = hex"BF 4B00 19 80000010 5bb4089c 52116881 cf76e840"
|
||||
|
||||
"decode" in {
|
||||
PacketCoding.DecodePacket(string).require match {
|
||||
case ZipLineMessage(player_guid, origin_side, action, uid, x, y, z) =>
|
||||
player_guid mustEqual PlanetSideGUID(75)
|
||||
origin_side mustEqual false
|
||||
action mustEqual 0
|
||||
uid mustEqual 204
|
||||
x mustEqual 1286.9221f
|
||||
y mustEqual 1116.5276f
|
||||
z mustEqual 91.74034f
|
||||
case _ =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"encode" in {
|
||||
val msg = ZipLineMessage(PlanetSideGUID(75), false, 0, 204, 1286.9221f, 1116.5276f, 91.74034f)
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual string
|
||||
}
|
||||
}
|
||||
|
||||
"PlayerStateShiftMessage" should {
|
||||
val string_short = hex"BE 68"
|
||||
val string_pos = hex"BE 95 A0 89 13 91 B8 B0 BF F0"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue