mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-02-20 23:23:35 +00:00
Packet: QuantityUpdateMessage
This commit is contained in:
parent
93fe7d6be8
commit
0bed8ce5b8
3 changed files with 51 additions and 1 deletions
|
|
@ -837,6 +837,27 @@ class GamePacketTest extends Specification {
|
|||
}
|
||||
}
|
||||
|
||||
"QuantityUpdateMessage" should {
|
||||
val string = hex"3D 5300 7B000000"
|
||||
|
||||
"decode" in {
|
||||
PacketCoding.DecodePacket(string).require match {
|
||||
case QuantityUpdateMessage(item_guid, quantity) =>
|
||||
item_guid mustEqual PlanetSideGUID(83)
|
||||
quantity mustEqual 123
|
||||
case default =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"encode" in {
|
||||
val msg = QuantityUpdateMessage(PlanetSideGUID(83), 123)
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual string
|
||||
}
|
||||
}
|
||||
|
||||
"PingMsg" should {
|
||||
val packet = hex"1a 00000000 b0360000"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue