//
// InPlayerSubPacket.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.Packets.Enums.Entities;
using NosSmooth.Packets.Enums.Players;
using NosSmooth.Packets.Server.Character;
using NosSmooth.Packets.Server.Weapons;
using NosSmooth.PacketSerializer.Abstractions;
using NosSmooth.PacketSerializer.Abstractions.Attributes;
namespace NosSmooth.Packets.Server.Maps;
///
/// Sub packet for
/// sent for players.
///
/// The authority of the player.
/// The sex of the player.
/// The hair style of the player.
/// The hair color of the player.
/// The class of the player.
/// The equipment sub packet of the player containing vnums of his equipment data.
/// The percentage of hp.
/// The percentage of mp.
/// Whether the player is sitting.
/// What group does the player belong to.
/// The vnum of the fairy the player has.
/// The element of the fairy.
/// Unknown TODO.
/// The vnum of the morph (used for special cards and such).
/// Unknown TODO
/// Unknown TODO
/// Weapon upgrade and rare sub packet.
/// Armor upgrade and rare sub packet.
/// Family information sub packet.
/// The name of the family.
/// The reputation icon number.
/// Whether the player is invisible.
/// The upgrade of the morph. (wings)
/// The faction the player belongs to.
/// Unknown TODO.
/// The level of the player.
/// The level of the family the player belongs to.
/// The family icons list.
/// Whether the player is an arena winner.
/// Unknown TODO
/// The size of the player.
/// The hero level of the player.
/// The title of the player.
[PacketHeader(null, PacketSource.Server)]
[GenerateSerializer(true)]
public record InPlayerSubPacket
(
[PacketIndex(0)]
AuthorityType Authority,
[PacketIndex(1)]
SexType Sex,
[PacketIndex(2)]
HairStyle HairStyle,
[PacketIndex(3)]
HairColor HairColor,
[PacketIndex(4)]
PlayerClass Class,
[PacketIndex(5, InnerSeparator = '.')]
InEquipmentSubPacket Equipment,
[PacketIndex(6)]
short HpPercentage,
[PacketIndex(7)]
short MpPercentage,
[PacketIndex(8)]
bool IsSitting,
[PacketIndex(9)]
long? GroupId,
[PacketIndex(10)]
short Fairy,
[PacketIndex(11)]
Element FairyElement,
[PacketIndex(12)]
byte Unknown,
[PacketIndex(13)]
long MorphVNum,
[PacketIndex(14)]
byte Unknown2,
[PacketIndex(15)]
short Unknown3,
[PacketIndex(16)]
UpgradeRareSubPacket WeaponUpgradeRareSubPacket,
[PacketIndex(17)]
UpgradeRareSubPacket ArmorUpgradeRareSubPacket,
[PacketIndex(18, InnerSeparator = '.')]
NullableWrapper FamilySubPacket,
[PacketIndex(19)]
string? FamilyName,
[PacketIndex(20)]
short ReputationIcon,
[PacketIndex(21)]
bool IsInvisible,
[PacketIndex(22)]
byte MorphUpgrade,
[PacketIndex(23)]
FactionType Faction,
[PacketIndex(24)]
byte MorphUpgrade2,
[PacketIndex(25)]
byte Level,
[PacketIndex(26)]
byte FamilyLevel,
[PacketListIndex(27, ListSeparator = '|')]
IReadOnlyList FamilyIcons,
[PacketIndex(28)]
bool ArenaWinner,
[PacketIndex(29)]
short Compliment,
[PacketIndex(30)]
byte Size,
[PacketIndex(31)]
byte HeroLevel,
[PacketIndex(32)]
short Title
) : IPacket;