// // CancelResponder.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.Core.Packets; using NosSmooth.Packets.Server.Skills; using Remora.Results; namespace NosSmooth.Extensions.Combat.Responders; /// /// Responds to cancel packet. /// public class CancelResponder : IPacketResponder { private readonly CombatManager _combatManager; /// /// Initializes a new instance of the class. /// /// The combat manager. public CancelResponder(CombatManager combatManager) { _combatManager = combatManager; } /// public Task Respond(PacketEventArgs packetArgs, CancellationToken ct = default) { _combatManager.CancelSkillTokensAsync(ct); return Task.FromResult(Result.FromSuccess()); } }