//
// GidxPacket.cs
//
// Copyright (c) František Boháček. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using NosSmooth.Packets.Enums.Entities;
using NosSmooth.Packets.Server.Character;
using NosSmooth.PacketSerializer.Abstractions;
using NosSmooth.PacketSerializer.Abstractions.Attributes;
using NosSmooth.PacketSerializer.Abstractions.Common;
namespace NosSmooth.Packets.Server.Families;
///
/// Information about player's family.
///
/// The type of the entity (always a player).
/// The id of the player.
/// The sub packet with information about the family, or null, if not in family.
/// The name of the family.
/// The rank of the family.
/// The icons of the family.
[PacketHeader("gidx", PacketSource.Server)]
[GenerateSerializer(true)]
public record GidxPacket
(
[PacketIndex(0)]
EntityType EntityType,
[PacketIndex(1)]
long EntityId,
[PacketIndex(2, InnerSeparator = '.')]
NullableWrapper FamilySubPacket,
[PacketIndex(3)]
NameString? FamilyName,
[PacketIndex(4)]
NameString? FamilyCustomRank,
[PacketListIndex(5, ListSeparator = '|', IsOptional = true)]
IReadOnlyList? FamilyIcons
) : IPacket;