baseline: OpenMU upstream b5a0961 (fresh source)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
// <copyright file="SkillCancellationTokenSource.cs" company="MUnique">
|
||||
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
|
||||
// </copyright>
|
||||
|
||||
namespace MUnique.OpenMU.GameLogic.PlayerActions.Skills;
|
||||
|
||||
using System.Threading;
|
||||
|
||||
/// <summary>
|
||||
/// A <see cref="CancellationTokenSource"/> which allows to specify an explicit target when cancelling the nova skill.
|
||||
/// </summary>
|
||||
/// <seealso cref="CancellationTokenSource" />
|
||||
public class SkillCancellationTokenSource : CancellationTokenSource
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the explicit target identifier.
|
||||
/// </summary>
|
||||
public ushort? ExplicitTargetId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Communicates a request for cancellation, <see cref="CancellationTokenSource.Cancel()"/>.
|
||||
/// </summary>
|
||||
/// <param name="extraTarget">The extra target.</param>
|
||||
public void CancelWithExtraTarget(ushort? extraTarget)
|
||||
{
|
||||
this.ExplicitTargetId = extraTarget;
|
||||
this.Cancel();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user