same same, same same... uint32L?

This commit is contained in:
Resaec 2025-08-17 21:20:29 +02:00
parent d19cd744d5
commit 308ea20dee
3 changed files with 13 additions and 21 deletions

View file

@ -9,10 +9,8 @@ import shapeless.{::, HNil}
final case class OutfitMemberEvent(
unk00: Int,
outfit_id: Long,
unk3: Int,
unk4: Int,
unk5: Int,
unk6: Int,
unk3: Int, // OMR(Unk1) target_guid
unk5: Int, // OMR(Unk1) unk3
member_name: String,
unk8: Int,
unk9: Int,
@ -33,10 +31,8 @@ object OutfitMemberEvent extends Marshallable[OutfitMemberEvent] {
implicit val codec: Codec[OutfitMemberEvent] = (
("unk00" | uintL(2)) ::
("outfit_id" | uint32L) ::
("unk3" | uint8L) ::
("unk4" | uint8L) ::
("unk5" | uint8L) ::
("unk6" | uint8L) ::
("unk3" | uint16L) :: // OMR(Unk1) unk2
("unk5" | uint16L) ::
("member_name" | PacketHelpers.encodedWideStringAligned(6)) ::
("unk8" | uint8L) ::
("unk9" | uint8L) ::
@ -49,12 +45,12 @@ object OutfitMemberEvent extends Marshallable[OutfitMemberEvent] {
("unk16" | uint8L)
).xmap[OutfitMemberEvent](
{
case unk00 :: outfit_id :: u3 :: u4 :: u5 :: u6 :: member_name :: u8 :: u9 :: u10 :: u11 :: u12 :: u13 :: u14 :: u15 :: u16 :: HNil =>
OutfitMemberEvent(unk00, outfit_id, u3, u4, u5, u6, member_name, u8, u9, u10, u11, u12, u13, u14, u15, u16)
case unk00 :: outfit_id :: u3 :: u5 :: member_name :: u8 :: u9 :: u10 :: u11 :: u12 :: u13 :: u14 :: u15 :: u16 :: HNil =>
OutfitMemberEvent(unk00, outfit_id, u3, u5, member_name, u8, u9, u10, u11, u12, u13, u14, u15, u16)
},
{
case OutfitMemberEvent(unk00, outfit_id, u3, u4, u5, u6, member_name, u8, u9, u10, u11, u12, u13, u14, u15, u16) =>
unk00 :: outfit_id :: u3 :: u4 :: u5 :: u6 :: member_name :: u8 :: u9 :: u10 :: u11 :: u12 :: u13 :: u14 :: u15 :: u16 :: HNil
case OutfitMemberEvent(unk00, outfit_id, u3, u5, member_name, u8, u9, u10, u11, u12, u13, u14, u15, u16) =>
unk00 :: outfit_id :: u3 :: u5 :: member_name :: u8 :: u9 :: u10 :: u11 :: u12 :: u13 :: u14 :: u15 :: u16 :: HNil
}
)
}

View file

@ -13,7 +13,7 @@ final case class OutfitMembershipResponse(
response_type: OutfitMembershipResponse.ResponseType.Type,
unk0: Int,
outfit_id: Long,
unk2: PlanetSideGUID,
target_guid: PlanetSideGUID,
unk3: Int,
//unk4: Boolean,
action: OutfitMembershipResponseAction
@ -190,7 +190,7 @@ object OutfitMembershipResponse extends Marshallable[OutfitMembershipResponse] {
type Type = Value
val CreateResponse: ResponseType.Value = Value(0)
val Unk1: ResponseType.Value = Value(1)
val Unk1: ResponseType.Value = Value(1) // Info: Player has been invited / response to OutfitMembershipRequest Unk2 for that player
val Unk2: ResponseType.Value = Value(2) // Invited / Accepted / Added
val Unk3: ResponseType.Value = Value(3)
val Unk4: ResponseType.Value = Value(4)

View file

@ -31,13 +31,11 @@ val unk0_ABC_Lazer: ByteVector = hex"90 048640001030c28022404c0061007a00650
"decode Unk0 ABC" in {
PacketCoding.decodePacket(unk0_ABC_Lazer).require match {
case OutfitMemberEvent(unk00, outfit_guid, unk3, unk4, unk5, unk6, member_name, unk8, unk9, unk10, unk11, unk12, unk13,unk14,unk15,unk16) =>
case OutfitMemberEvent(unk00, outfit_guid, unk3, unk5, member_name, unk8, unk9, unk10, unk11, unk12, unk13,unk14,unk15,unk16) =>
unk00 mustEqual 0
outfit_guid mustEqual 6418L
unk3 mustEqual 64
unk4 mustEqual 195
unk3 mustEqual 49984
unk5 mustEqual 10
unk6 mustEqual 0
member_name mustEqual "Lazer1982"
unk8 mustEqual 244
unk9 mustEqual 58
@ -57,10 +55,8 @@ val unk0_ABC_Lazer: ByteVector = hex"90 048640001030c28022404c0061007a00650
val msg = OutfitMemberEvent(
unk00 = 0,
outfit_id = 6418L,
unk3 = 64,
unk4 = 195,
unk3 = 49984,
unk5 = 10,
unk6 = 0,
member_name = "Lazer1982",
unk8 = 244,
unk9 = 58,