//
//  PinitSubPacket.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;
using NosSmooth.PacketSerializer.Abstractions.Attributes;
using NosSmooth.PacketSerializer.Abstractions.Common;
namespace NosSmooth.Packets.Server.Groups;
/// 
/// Sub packet of  containing information
/// about one of the group members.
/// 
/// The type of the entity.
/// The id of the entity.
/// The position in the group.
/// The level of the entity.
/// The name of the entity.
/// Unknown.
/// The VNum of the pet for pets.
/// The race of the entity.
/// The morph of the entity.
/// The hero level of the entity.
/// Unknown.
/// Unknown.
[GenerateSerializer(true)]
[PacketHeader(null, PacketSource.Server)]
public record PinitSubPacket
(
    [PacketIndex(0)]
    EntityType EntityType,
    [PacketIndex(1)]
    long EntityId,
    [PacketIndex(2)]
    int GroupPosition,
    [PacketIndex(3)]
    byte Level,
    [PacketIndex(4)]
    NameString? Name,
    [PacketIndex(5)]
    int? Unknown,
    [PacketIndex(6)]
    long VNum,
    [PacketIndex(7)]
    short Race,
    [PacketIndex(8)]
    short MorphVNum,
    [PacketConditionalIndex(9, "EntityType", false, EntityType.Player)]
    byte? HeroLevel,
    [PacketConditionalIndex(10, "EntityType", false, EntityType.Player)]
    int? Unknown1,
    [PacketConditionalIndex(11, "EntityType", false, EntityType.Player)]
    int? Unknown2
) : IPacket;