//
// InNonPlayerSubPacket.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.PacketSerializer.Abstractions.Attributes;
using NosSmooth.PacketSerializer.Abstractions.Common;
namespace NosSmooth.Packets.Server.Maps;
///
/// Sub packet of present if the in packet
/// is for a monster or npc.
///
/// The hp percentage of the entity.
/// The mp percentage of the entity.
/// Unknown TODO
/// The faction of the entity.
/// Unknown TODO
/// The id of the owner entity.
/// The effect the entity does on spawning.
/// Whether the entity is sitting.
/// The id of the morph (for special cards an such).
/// The name of the entity, if any.
/// Unknown.
/// Unknown.
/// Unknown.
/// The first skill VNum of the entity.
/// The second skill VNum of the entity.
/// The third skill VNum of the entity.
/// The rank of the first skill.
/// The rank of the second skill.
/// The rank of the third skill.
/// Whether the entity is invisible.
/// Unknown.
/// Unknown.
[PacketHeader(null, PacketSource.Server)]
[GenerateSerializer(true)]
public record InNonPlayerSubPacket
(
[PacketIndex(0)]
byte HpPercentage,
[PacketIndex(1)]
byte MpPercentage,
[PacketIndex(2)]
short Dialog,
[PacketIndex(3)]
FactionType Faction,
[PacketIndex(4)]
short GroupEffect,
[PacketIndex(5)]
long? OwnerId,
[PacketIndex(6)]
SpawnEffect SpawnEffect,
[PacketIndex(7)]
bool IsSitting,
[PacketIndex(8)]
long? MorphVNum,
[PacketIndex(9)]
NameString? Name,
[PacketIndex(10)]
string? Unknown,
[PacketIndex(11)]
string? Unknown2,
[PacketIndex(12)]
string? Unknown3,
[PacketIndex(13)]
short Skill1,
[PacketIndex(14)]
short Skill2,
[PacketIndex(15)]
short Skill3,
[PacketIndex(16)]
short SkillRank1,
[PacketIndex(17)]
short SkillRank2,
[PacketIndex(18)]
short SkillRank3,
[PacketIndex(19)]
bool IsInvisible,
[PacketIndex(20, IsOptional = true)]
string? Unknown4,
[PacketIndex(21, IsOptional = true)]
string? Unknown5
) : IPacket;