mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-09 23:20:28 +00:00
found the purpose of the unknown value
This commit is contained in:
parent
055a6096a1
commit
50bf69fc91
2 changed files with 34 additions and 11 deletions
|
|
@ -2184,8 +2184,9 @@ class GamePacketTest extends Specification {
|
|||
|
||||
"ZoneInfoMessage" should {
|
||||
val string = hex"C6 0C 00 80 00 00 00 00"
|
||||
val string_cavern = hex"C6 1B 00 1D F9 F3 00 00"
|
||||
|
||||
"decode" in {
|
||||
"decode (normal)" in {
|
||||
PacketCoding.DecodePacket(string).require match {
|
||||
case ZoneInfoMessage(zone, empire_status, unk) =>
|
||||
zone mustEqual 12
|
||||
|
|
@ -2196,12 +2197,30 @@ class GamePacketTest extends Specification {
|
|||
}
|
||||
}
|
||||
|
||||
"encode" in {
|
||||
"decode (cavern)" in {
|
||||
PacketCoding.DecodePacket(string_cavern).require match {
|
||||
case ZoneInfoMessage(zone, empire_status, unk) =>
|
||||
zone mustEqual 27
|
||||
empire_status mustEqual false
|
||||
unk mustEqual 15135547
|
||||
case default =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"encode (normal)" in {
|
||||
val msg = ZoneInfoMessage(12, true, 0)
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual string
|
||||
}
|
||||
|
||||
"encode (cavern)" in {
|
||||
val msg = ZoneInfoMessage(27, false, 15135547)
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual string_cavern
|
||||
}
|
||||
}
|
||||
|
||||
"PingMsg" should {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue