mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-14 01:20:34 +00:00
Packet: ReloadMessage
* Add ReloadMessage packet * Add ReloadMessage test * Add ReloadMessage handler stub
This commit is contained in:
parent
47bef6e83b
commit
60e7a76de5
4 changed files with 50 additions and 1 deletions
|
|
@ -305,5 +305,27 @@ class GamePacketTest extends Specification {
|
|||
pkt mustEqual string
|
||||
}
|
||||
}
|
||||
|
||||
"ReloadMessage" should {
|
||||
val string = hex"0D 4C00 7B000000 FFFFFFFF"
|
||||
|
||||
"decode" in {
|
||||
PacketCoding.DecodePacket(string).require match {
|
||||
case ReloadMessage(item_guid, ammo_clip, unk1) =>
|
||||
item_guid mustEqual PlanetSideGUID(76)
|
||||
ammo_clip mustEqual 123
|
||||
unk1 mustEqual -1
|
||||
case default =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"encode" in {
|
||||
val msg = ReloadMessage(PlanetSideGUID(76), 123, -1)
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual string
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue