//
//  CondPacket.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.PacketSerializer.Abstractions.Attributes;
namespace NosSmooth.Packets.Server.Entities;
/// 
/// Cond packet is sent when the player is moving or when attacking an entity.
/// 
/// The type of the entity.
/// The id of the entity.
/// Whether the entity cant attack.
/// Whether the entity cant move.
/// The speed of the entity.
[PacketHeader("cond", PacketSource.Server)]
[GenerateSerializer(true)]
public record CondPacket
(
    [PacketIndex(0)]
    EntityType EntityType,
    [PacketIndex(1)]
    long EntityId,
    [PacketIndex(2)]
    bool CantAttack,
    [PacketIndex(3)]
    bool CantMove,
    [PacketIndex(4)]
    int Speed
) : IPacket;