~ruther/NosSmooth

ref: 5b880eadd917d5af4c6f84bea3b1640d63a65722 NosSmooth/Packets/NosSmooth.Packets/Server/Entities/StPacket.cs -rw-r--r-- 1.4 KiB
5b880ead — František Boháček feat(packets)!: let the user add the default packet converters 3 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
//
//  StPacket.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.PacketSerializer.Abstractions.Attributes;

namespace NosSmooth.Packets.Server.Entities;

/// <summary>
/// Sent as a response to "ncif" packet.
/// </summary>
/// <param name="EntityType">The type of the entity.</param>
/// <param name="EntityId">The id of the entity.</param>
/// <param name="Level">The level of the entity.</param>
/// <param name="HeroLevel">The hero level. (for players only)</param>
/// <param name="HpPercentage">The current hp percentage.</param>
/// <param name="MpPercentage">The current mp percentage.</param>
/// <param name="Hp">The current amount of hp.</param>
/// <param name="Mp">The current amount of mp.</param>
/// <param name="BuffVNums">The list of the buffs the entity has.</param>
[PacketHeader("st", PacketSource.Server)]
[GenerateSerializer(true)]
public record StPacket
(
    [PacketIndex(0)]
    EntityType EntityType,
    [PacketIndex(1)]
    long EntityId,
    [PacketIndex(2)]
    byte Level,
    [PacketIndex(3)]
    byte HeroLevel,
    [PacketIndex(4)]
    short HpPercentage,
    [PacketIndex(5)]
    short MpPercentage,
    [PacketIndex(6)]
    long Hp,
    [PacketIndex(7)]
    long Mp,
    [PacketListIndex(8, ListSeparator = ' ', IsOptional = true)]
    List<long>? BuffVNums
) : IPacket;
Do not follow this link