mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-04-20 03:15:19 +00:00
Packet: DropItemMessage
* Add DropItemMessage packet * Add DropItemMessage test * Add DropItemMessage handler stub
This commit is contained in:
parent
3e980bbe15
commit
47bef6e83b
4 changed files with 43 additions and 1 deletions
|
|
@ -285,5 +285,25 @@ class GamePacketTest extends Specification {
|
|||
pkt mustEqual string
|
||||
}
|
||||
}
|
||||
|
||||
"DropItemMessage" should {
|
||||
val string = hex"37 4C00"
|
||||
|
||||
"decode" in {
|
||||
PacketCoding.DecodePacket(string).require match {
|
||||
case DropItemMessage(item_guid) =>
|
||||
item_guid mustEqual PlanetSideGUID(76)
|
||||
case default =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"encode" in {
|
||||
val msg = DropItemMessage(PlanetSideGUID(76))
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual string
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue