mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-02-21 23:53:36 +00:00
added initial HotSpotUpdateMessage packet and tests for the clear condition (size=0)
This commit is contained in:
parent
daa22c572e
commit
6786d9934d
3 changed files with 72 additions and 1 deletions
|
|
@ -915,6 +915,27 @@ class GamePacketTest extends Specification {
|
|||
}
|
||||
}
|
||||
|
||||
"HotSpotUpdateMessage" should {
|
||||
val stringClear = hex"9F 0500 10 00"
|
||||
|
||||
"decode (clear)" in {
|
||||
PacketCoding.DecodePacket(stringClear).require match {
|
||||
case HotSpotUpdateMessage(continent_guid, unk, spots) =>
|
||||
continent_guid mustEqual PlanetSideGUID(5)
|
||||
unk mustEqual 16
|
||||
spots.size mustEqual 0
|
||||
case _ =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"encode (clear)" in {
|
||||
val msg = HotSpotUpdateMessage(PlanetSideGUID(5),16)
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
pkt mustEqual stringClear
|
||||
}
|
||||
}
|
||||
|
||||
"BuildingInfoUpdateMessage" should {
|
||||
val string = hex"a0 04 00 09 00 16 00 00 00 00 80 00 00 00 17 00 00 00 00 00 00 40"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue