~ruther/NosSmooth

ref: 58b1e1aff9662048065b2c194d52eaeaba2d5ba7 NosSmooth/Packets/NosSmooth.Packets/Server/Battle/SuPacket.cs -rw-r--r-- 2.3 KiB
58b1e1af — František Boháček fix(packets): implement IPacket in Sayi2Packet 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
59
60
61
62
63
64
65
66
//
//  SuPacket.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.Battle;
using NosSmooth.Packets.Enums.Entities;
using NosSmooth.PacketSerializer.Abstractions.Attributes;

namespace NosSmooth.Packets.Server.Battle;

/// <summary>
/// Represents skill used.
/// </summary>
/// <param name="CasterEntityType">The type of the caster entity.</param>
/// <param name="CasterEntityId">The entity id of the caster.</param>
/// <param name="TargetEntityType">The type of the target entity.</param>
/// <param name="TargetEntityId">The entity id of the target.</param>
/// <param name="SkillVNum">The VNum of the used skill.</param>
/// <param name="SkillCooldown">The cooldown of the skill.</param>
/// <param name="AttackAnimation">The number of the attack animation.</param>
/// <param name="SkillEffect">The number of the skill effect.</param>
/// <param name="PositionX">The x position where the skill target is.</param>
/// <param name="PositionY">The y position where the skill target is.</param>
/// <param name="TargetIsAlive">Whether the target of the skill is alive.</param>
/// <param name="HpPercentage">The hp percentage of the entity after the attack.</param>
/// <param name="Damage">The damage the entity has taken.</param>
/// <param name="HitMode">The hit mode.</param>
/// <param name="SkillTypeMinusOne">The skill type of the skill.</param>
[PacketHeader("su", PacketSource.Server)]
[GenerateSerializer(true)]
public record SuPacket
(
    [PacketIndex(0)]
    EntityType CasterEntityType,
    [PacketIndex(1)]
    long CasterEntityId,
    [PacketIndex(2)]
    EntityType TargetEntityType,
    [PacketIndex(3)]
    long TargetEntityId,
    [PacketIndex(4)]
    int? SkillVNum,
    [PacketIndex(5)]
    long SkillCooldown,
    [PacketIndex(6)]
    long AttackAnimation,
    [PacketIndex(7)]
    long? SkillEffect,
    [PacketIndex(8)]
    short PositionX,
    [PacketIndex(9)]
    short PositionY,
    [PacketIndex(10)]
    bool TargetIsAlive,
    [PacketIndex(11)]
    byte HpPercentage,
    [PacketIndex(12)]
    uint Damage,
    [PacketIndex(13)]
    HitMode? HitMode,
    [PacketIndex(14)]
    int SkillTypeMinusOne
) : IPacket;
Do not follow this link