mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-11 08:00:30 +00:00
Packet: ChangeFireStateMessage
* Add ChangeFireStateMessage packets * Add ChangeFireStateMessage tests * Add ChangeFireStateMessage handler stubs
This commit is contained in:
parent
f11b3d17c0
commit
4c4f1341be
5 changed files with 88 additions and 4 deletions
|
|
@ -224,5 +224,45 @@ class GamePacketTest extends Specification {
|
|||
pkt mustEqual string
|
||||
}
|
||||
}
|
||||
|
||||
"ChangeFireStateMessage_Start" should {
|
||||
val string = hex"39 4C00"
|
||||
|
||||
"decode" in {
|
||||
PacketCoding.DecodePacket(string).require match {
|
||||
case ChangeFireStateMessage_Start(item_guid) =>
|
||||
item_guid mustEqual PlanetSideGUID(76)
|
||||
case default =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"encode" in {
|
||||
val msg = ChangeFireStateMessage_Start(PlanetSideGUID(76))
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual string
|
||||
}
|
||||
}
|
||||
|
||||
"ChangeFireStateMessage_Stop" should {
|
||||
val string = hex"3A 4C00"
|
||||
|
||||
"decode" in {
|
||||
PacketCoding.DecodePacket(string).require match {
|
||||
case ChangeFireStateMessage_Stop(item_guid) =>
|
||||
item_guid mustEqual PlanetSideGUID(76)
|
||||
case default =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"encode" in {
|
||||
val msg = ChangeFireStateMessage_Stop(PlanetSideGUID(76))
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual string
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue