R Core/NosSmooth.Core/Commands/Walking/PetWalkCommand.cs => Core/NosSmooth.Core/Commands/Walking/MateWalkCommand.cs +3 -3
@@ 11,16 11,16 @@ namespace NosSmooth.Core.Commands.Walking;
/// <summary>
/// Walk the given pet to the specified position.
/// </summary>
-/// <param name="PetSelector">Index of the pet to move.</param>
+/// <param name="MateId">The id of the mate.</param>
/// <param name="TargetX">The target x coordinate.</param>
/// <param name="TargetY">The target y coordinate.</param>
/// <param name="ReturnDistanceTolerance">The distance tolerance to the target when to return successful result.</param>
/// <param name="CanBeCancelledByAnother">Whether the command may be cancelled by another task within the same group.</param>
/// <param name="WaitForCancellation">Whether to wait for finish of the previous task</param>
/// <param name="AllowUserCancel">Whether to allow the user to cancel by taking any walk/focus/unfollow action</param>
-public record PetWalkCommand
+public record MateWalkCommand
(
- int PetSelector,
+ long MateId,
short TargetX,
short TargetY,
ushort ReturnDistanceTolerance,
M Core/NosSmooth.Core/Commands/Walking/WalkCommand.cs => Core/NosSmooth.Core/Commands/Walking/WalkCommand.cs +1 -1
@@ 23,8 23,8 @@ public record WalkCommand
(
short TargetX,
short TargetY,
- IReadOnlyList<(int PetSelector, short TargetX, short TargetY)>? Pets,
ushort ReturnDistanceTolerance,
+ IReadOnlyList<(long MateId, short TargetX, short TargetY)>? Pets = default,
bool CanBeCancelledByAnother = true,
bool WaitForCancellation = true,
bool AllowUserCancel = true
M Core/NosSmooth.Core/Commands/Walking/WalkCommandHandler.cs => Core/NosSmooth.Core/Commands/Walking/WalkCommandHandler.cs +3 -3
@@ 36,7 36,7 @@ internal class WalkCommandHandler : ICommandHandler<WalkCommand>
public async Task<Result> HandleCommand(WalkCommand command, CancellationToken ct = default)
{
var tasks = new List<Task<Result>>();
- foreach (var pet in command.Pets ?? Array.Empty<(int, short, short)>())
+ foreach (var pet in command.Pets ?? Array.Empty<(long, short, short)>())
{
int x = pet.TargetX;
int y = pet.TargetY;
@@ 45,9 45,9 @@ internal class WalkCommandHandler : ICommandHandler<WalkCommand>
(
_nostaleClient.SendCommandAsync
(
- new PetWalkCommand
+ new MateWalkCommand
(
- pet.PetSelector,
+ pet.MateId,
(short)x,
(short)y,
command.ReturnDistanceTolerance,