mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-24 22:39:07 +00:00
initial coding for packet and its tests; includes commented-out extended functionality
This commit is contained in:
parent
daa22c572e
commit
38a4e128b6
3 changed files with 84 additions and 1 deletions
|
|
@ -299,6 +299,29 @@ class GamePacketTest extends Specification {
|
|||
}
|
||||
}
|
||||
|
||||
"ObjectAttachMessage" should {
|
||||
val stringToInventory = hex"2A 9F05 D405 86"
|
||||
val stringToCursor = hex"2A 9F05 D405 00FA"
|
||||
|
||||
"encode" in {
|
||||
PacketCoding.DecodePacket(stringToInventory).require match {
|
||||
case ObjectAttachMessage(player_guid, item_guid, index) =>
|
||||
player_guid mustEqual PlanetSideGUID(1439)
|
||||
item_guid mustEqual PlanetSideGUID(1492)
|
||||
index mustEqual 134
|
||||
case default =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"decode" in {
|
||||
val msg = ObjectAttachMessage(PlanetSideGUID(1439), PlanetSideGUID(1492), 134)
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual stringToInventory
|
||||
}
|
||||
}
|
||||
|
||||
"DropItemMessage" should {
|
||||
val string = hex"37 4C00"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue