missed some bytes of the packet, avatar_guid is wrong

This commit is contained in:
Resaec 2025-08-17 15:07:42 +02:00
parent b242c4c4bf
commit 868439bb21

View file

@ -9,8 +9,11 @@ import shapeless.{::, HNil}
final case class OutfitMemberUpdate( final case class OutfitMemberUpdate(
outfit_guid: Long, outfit_guid: Long,
avatar_guid: PlanetSideGUID, unk1: Int,
unk2: Int,
unk3: Int, unk3: Int,
unk4: Int,
unk5: Int,
) extends PlanetSideGamePacket { ) extends PlanetSideGamePacket {
type Packet = OutfitMemberUpdate type Packet = OutfitMemberUpdate
def opcode = GamePacketOpcode.OutfitMemberUpdate def opcode = GamePacketOpcode.OutfitMemberUpdate
@ -20,16 +23,19 @@ final case class OutfitMemberUpdate(
object OutfitMemberUpdate extends Marshallable[OutfitMemberUpdate] { object OutfitMemberUpdate extends Marshallable[OutfitMemberUpdate] {
implicit val codec: Codec[OutfitMemberUpdate] = ( implicit val codec: Codec[OutfitMemberUpdate] = (
("outfit_guid" | uint32L) :: ("outfit_guid" | uint32L) ::
("avatar_guid" | PlanetSideGUID.codec) :: ("unk1" | uint8L) ::
("unk3" | uint8L) ("unk2" | uint8L) ::
("unk3" | uint8L) ::
("unk4" | uint8L) ::
("unk5" | uint8L)
).xmap[OutfitMemberUpdate]( ).xmap[OutfitMemberUpdate](
{ {
case outfit_guid :: u2 :: u3 :: HNil => case outfit_guid :: u1 :: u2 :: u3 :: u4 :: u5 :: HNil =>
OutfitMemberUpdate(outfit_guid, u2, u3) OutfitMemberUpdate(outfit_guid, u1, u2, u3, u4, u5)
}, },
{ {
case OutfitMemberUpdate(outfit_guid, u2, u3) => case OutfitMemberUpdate(outfit_guid, u1, u2, u3, u4, u5) =>
outfit_guid :: u2 :: u3 :: HNil outfit_guid :: u1 :: u2 :: u3 :: u4 :: u5 :: HNil
} }
) )
} }