mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-02-26 09:43:37 +00:00
Packet: WargateRequest packet and tests (#75)
This commit is contained in:
parent
f8ee593a9a
commit
5f02d73f99
4 changed files with 79 additions and 1 deletions
|
|
@ -1490,6 +1490,31 @@ class GamePacketTest extends Specification {
|
|||
pkt mustEqual string
|
||||
}
|
||||
}
|
||||
|
||||
"WarpgateRequest" should {
|
||||
val string = hex"A4 1D00 1F00 1327 1F00 00 00" // an Extinction warp gate to a Desolation warp gate
|
||||
|
||||
"decode" in {
|
||||
PacketCoding.DecodePacket(string).require match {
|
||||
case WarpgateRequest(continent_guid, building_guid, dest_building_guid, dest_continent_guid, unk1, unk2) =>
|
||||
continent_guid mustEqual PlanetSideGUID(29)
|
||||
building_guid mustEqual PlanetSideGUID(31)
|
||||
dest_building_guid mustEqual PlanetSideGUID(10003)
|
||||
dest_continent_guid mustEqual PlanetSideGUID(31)
|
||||
unk1 mustEqual 0
|
||||
unk2 mustEqual 0
|
||||
case default =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"encode" in {
|
||||
val msg = WarpgateRequest(PlanetSideGUID(29), PlanetSideGUID(31), PlanetSideGUID(10003), PlanetSideGUID(31), 0, 0)
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual string
|
||||
}
|
||||
}
|
||||
|
||||
"ContinentalLockUpdateMessage" should {
|
||||
val string = hex"A8 16 00 40"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue