~ruther/NosSmooth

ref: 550dc6367d265d82d0ee66ad1f4bd33af6522f36 NosSmooth/Packets/NosSmooth.Packets/Server/Groups/PinitSubPacket.cs -rw-r--r-- 1.3 KiB
550dc636 — František Boháček chore: update versions 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
//
//  PinitSubPacket.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.Mates;
using NosSmooth.Packets.Enums.Players;
using NosSmooth.PacketSerializer.Abstractions.Attributes;
using NosSmooth.PacketSerializer.Abstractions.Common;

namespace NosSmooth.Packets.Server.Groups;

/// <summary>
/// Sub packet of <see cref="PinitSubPacket"/> containing information
/// about one of the group members.
/// </summary>
/// <param name="EntityType">The type of the entity.</param>
/// <param name="EntityId">The id of the entity.</param>
/// <param name="MateSubPacket">Present for pets and partners.</param>
/// <param name="PlayerSubPacket">Present for players.</param>
[PacketHeader(null, PacketSource.Server)]
[GenerateSerializer(true)]
public record PinitSubPacket
(
    [PacketIndex(0)]
    EntityType EntityType,
    [PacketIndex(1)]
    long EntityId,
    [PacketConditionalIndex(2, "EntityType", false, EntityType.Npc, IsOptional = true)]
    PinitMateSubPacket? MateSubPacket,
    [PacketConditionalIndex(3, "EntityType", false, EntityType.Player, IsOptional = true)]
    PinitPlayerSubPacket? PlayerSubPacket
) : IPacket;
Do not follow this link