mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-02-21 23:53:36 +00:00
Packet: LoadMapMessage (#61)
* Add LoadMapMessage packet * Add LoadMapMessage test
This commit is contained in:
parent
83264de081
commit
a37fb3214c
4 changed files with 65 additions and 2 deletions
|
|
@ -837,6 +837,31 @@ class GamePacketTest extends Specification {
|
|||
}
|
||||
}
|
||||
|
||||
"LoadMapMessage" should {
|
||||
val string = hex"31 85 6D61703130 83 7A3130 0FA0 19000000 F6 F1 60 86 80"
|
||||
|
||||
"decode" in {
|
||||
PacketCoding.DecodePacket(string).require match {
|
||||
case LoadMapMessage(map_name, nav_map_name, unk1, unk2, weapons_unlocked, unk3) =>
|
||||
map_name mustEqual "map10"
|
||||
nav_map_name mustEqual "z10"
|
||||
unk1 mustEqual 40975
|
||||
unk2 mustEqual 25
|
||||
weapons_unlocked mustEqual true
|
||||
unk3 mustEqual 230810349
|
||||
case default =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"encode" in {
|
||||
val msg = LoadMapMessage("map10","z10",40975,25,true,230810349)
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
pkt mustEqual string
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
"QuantityUpdateMessage" should {
|
||||
val string = hex"3D 5300 7B000000"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue