// // WalkPacket.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.PacketSerializer.Abstractions.Attributes; namespace NosSmooth.Packets.Client.Movement; /// /// Packet sent when moving. /// /// /// This packet is sent every x seconds /// when moving. The packet is sent before the /// player has actually reached the position. /// /// The server should respond with "at" packet. /// /// The position the character is walking to. /// /// The check sum. Has value: (walkPacket.PositionX + walkPacket.PositionY) % 3 % 2. /// The movement speed. [PacketHeader("walk", PacketSource.Client)] [GenerateSerializer(true)] public record WalkPacket ( [PacketIndex(0)] short PositionX, [PacketIndex(1)] short PositionY, [PacketIndex(2)] byte CheckSum, [PacketIndex(3)] short Speed ) : IPacket;