~ruther/NosSmooth

ref: 6334c0f5e711b3d9567687ae3ebf72fa41691b43 NosSmooth/Packets/NosSmooth.Packets/Server/Chat/SayitemtPacket.cs -rw-r--r-- 1.5 KiB
6334c0f5 — František Boháček tests: add ptctl deserialization test 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
//
//  SayitemtPacket.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 System.Runtime.InteropServices;
using NosSmooth.Packets.Enums.Chat;
using NosSmooth.Packets.Enums.Entities;
using NosSmooth.PacketSerializer.Abstractions.Attributes;
using NosSmooth.PacketSerializer.Abstractions.Common;

namespace NosSmooth.Packets.Server.Chat;

/// <summary>
/// Information about an item sent to chat.
/// </summary>
/// <param name="EntityType">The type of the entity that spoke.</param>
/// <param name="EntityId">The id of the entity that spoke.</param>
/// <param name="Color">The say/message color.</param>
/// <param name="Amount">The amount.</param>
/// <param name="ItemVNum">The vnum of the item.</param>
/// <param name="Name">The name of the item.</param>
/// <param name="Message">The message template. Usully "{%s%}"</param>
/// <param name="ItemInfo">TODO information about an item, e_info packet.</param>
[PacketHeader("sayitemt", PacketSource.Server)]
[GenerateSerializer(true)]
public record SayitemtPacket
(
    [PacketIndex(0)]
    EntityType EntityType,
    [PacketIndex(1)]
    long EntityId,
    [PacketIndex(2)]
    SayColor Color,
    [PacketIndex(3)]
    short Amount,
    [PacketIndex(4)]
    int ItemVNum,
    [PacketIndex(5)]
    NameString Name,
    [PacketIndex(6)]
    string Message,
    [PacketGreedyIndex(7)]
    string ItemInfo
) : IPacket;
Do not follow this link