//
// 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 NosCore.Shared.Enumerations;
using NosSmooth.Packets.Attributes;
using NosSmooth.Packets.Common;
namespace NosSmooth.Packets.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.
[GenerateSerializer]
[PacketHeader(null, PacketSource.Server)]
public record PinitSubPacket
(
[PacketIndex(0)]
VisualType 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 Morph,
[PacketConditionalIndex(9, "EntityType", false, VisualType.Player)]
byte? HeroLevel,
[PacketConditionalIndex(10, "EntityType", false, VisualType.Player)]
int? Unknown1,
[PacketConditionalIndex(11, "EntityType", false, VisualType.Player)]
int? Unknown2
) : IPacket;