// // PstPacket.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.Enums.Mates; using NosSmooth.Packets.Enums.Players; using NosSmooth.Packets.Server.Entities; using NosSmooth.PacketSerializer.Abstractions.Attributes; namespace NosSmooth.Packets.Server.Groups; /// /// Party status packet. /// /// The type of the entity. /// The id of the entity. /// The position in the group of a player. Present only for players. /// The type of a mate. Present only for mates. /// The hp percentage of the entity. /// The mp percentage of the entity. /// The hp of the entity. /// The mp of the entity. /// The player class, present for player. /// The sex of the player, present for player. /// The player morph vnum, present for player. /// The effects vnums. [PacketHeader("pst", PacketSource.Server)] [GenerateSerializer(true)] public record PstPacket ( [PacketIndex(0)] EntityType EntityType, [PacketIndex(1)] long EntityId, [PacketConditionalIndex(2, "EntityType", false, EntityType.Player)] byte? GroupPosition, [PacketConditionalIndex(3, "EntityType", false, EntityType.Npc)] MateType? MateType, [PacketIndex(4)] byte HpPercentage, [PacketIndex(5)] byte MpPercentage, [PacketIndex(6)] int Hp, [PacketIndex(7)] int Mp, [PacketIndex(8)] PlayerClass? PlayerClass, [PacketIndex(9)] SexType? PlayerSex, [PacketIndex(10)] int? PlayerMorphVNum, [PacketIndex(11, IsOptional = true)] IReadOnlyList? Effects ) : IPacket;