mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-02-22 08:03:34 +00:00
Packet: GenericObjectStateMsg (#36)
* Add GenericObjectStateMsg packet * Add GenericObjectStateMsg test * Add GenericObjectStateMsg handler stub
This commit is contained in:
parent
5b5bf28c52
commit
d496fc1c2e
4 changed files with 48 additions and 1 deletions
|
|
@ -498,5 +498,26 @@ class GamePacketTest extends Specification {
|
|||
pkt mustEqual string
|
||||
}
|
||||
}
|
||||
|
||||
"GenericObjectStateMsg" should {
|
||||
val string = hex"1D 6401 10000000"
|
||||
|
||||
"decode" in {
|
||||
PacketCoding.DecodePacket(string).require match {
|
||||
case GenericObjectStateMsg(object_guid, state) =>
|
||||
object_guid mustEqual PlanetSideGUID(356)
|
||||
state mustEqual 16
|
||||
case default =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"encode" in {
|
||||
val msg = GenericObjectStateMsg(PlanetSideGUID(356), 16)
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual string
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue