mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-01-19 18:14:44 +00:00
changed last field to boolean
This commit is contained in:
parent
5564d98395
commit
b444b4b503
|
|
@ -13,7 +13,7 @@ import scodec.codecs._
|
|||
*/
|
||||
final case class FriendsResponse(player_guid : PlanetSideGUID,
|
||||
friend : String,
|
||||
unk : Int)
|
||||
unk : Boolean)
|
||||
extends PlanetSideGamePacket {
|
||||
type Packet = FriendsResponse
|
||||
def opcode = GamePacketOpcode.FriendsResponse
|
||||
|
|
@ -24,6 +24,6 @@ object FriendsReponse extends Marshallable[FriendsResponse] {
|
|||
implicit val codec : Codec[FriendsResponse] = (
|
||||
("player_guid" | PlanetSideGUID.codec) ::
|
||||
("friend" | PacketHelpers.specSizeWideStringAligned(uint(5), 3)) ::
|
||||
("unk" | uint8L)
|
||||
("unk" | bool)
|
||||
).as[FriendsResponse]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -839,14 +839,14 @@ class GamePacketTest extends Specification {
|
|||
player_guid mustEqual PlanetSideGUID(35937)
|
||||
friend.length mustEqual 12
|
||||
friend mustEqual "KurtHectic-G"
|
||||
unk mustEqual 0
|
||||
unk mustEqual false
|
||||
case default =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"encode" in {
|
||||
val msg = FriendsResponse(PlanetSideGUID(35937), "KurtHectic-G", 0)
|
||||
val msg = FriendsResponse(PlanetSideGUID(35937), "KurtHectic-G", false)
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual string
|
||||
|
|
|
|||
Loading…
Reference in a new issue