//
// 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.PacketSerializer.Abstractions.Attributes;
namespace NosSmooth.Packets.Server.Battle;
///
/// Represents skill used.
///
/// The type of the caster entity.
/// The entity id of the caster.
/// The type of the target entity.
/// The entity id of the target.
/// The VNum of the used skill.
/// The cooldown of the skill.
/// The number of the attack animation.
/// The number of the skill effect.
/// The x position where the skill target is.
/// The y position where the skill target is.
/// Whether the target of the skill is alive.
/// The hp percentage of the entity after the attack.
/// The damage the entity has taken.
/// The hit mode.
/// The skill type of the skill.
[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;