~ruther/NosSmooth

ref: 71f75d62e6cd62b378e55c5325c8a8f021a16598 NosSmooth/Packets/NosSmooth.Packets/Server/Groups/PstPacket.cs -rw-r--r-- 2.1 KiB
71f75d62 — František Boháček fix(packets): implement IPacket in RaidBfPacket 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//
//  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;

/// <summary>
/// Party status packet.
/// </summary>
/// <param name="EntityType">The type of the entity.</param>
/// <param name="EntityId">The id of the entity.</param>
/// <param name="GroupPosition">The position in the group of a player. Present only for players.</param>
/// <param name="MateType">The type of a mate. Present only for mates.</param>
/// <param name="HpPercentage">The hp percentage of the entity.</param>
/// <param name="MpPercentage">The mp percentage of the entity.</param>
/// <param name="Hp">The hp of the entity.</param>
/// <param name="Mp">The mp of the entity.</param>
/// <param name="PlayerClass">The player class, present for player.</param>
/// <param name="PlayerSex">The sex of the player, present for player.</param>
/// <param name="PlayerMorphVNum">The player morph vnum, present for player.</param>
/// <param name="Effects">The effects vnums.</param>
[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)]
    long? PlayerMorphVNum,
    [PacketIndex(11, IsOptional = true)]
    IReadOnlyList<EffectsSubPacket>? Effects
) : IPacket;
Do not follow this link