~ruther/NosSmooth

f0214a2f19a144cf2e1f9f4f4fe317e630918b27 — Rutherther 2 years ago ec26b3e
fix(combat): wait for a second after casting a skill

This seems to be the "reload" period needed until
the character may move again
1 files changed, 3 insertions(+), 2 deletions(-)

M Extensions/NosSmooth.Extensions.Combat/Operations/UseSkillOperation.cs
M Extensions/NosSmooth.Extensions.Combat/Operations/UseSkillOperation.cs => Extensions/NosSmooth.Extensions.Combat/Operations/UseSkillOperation.cs +3 -2
@@ 72,14 72,15 @@ public record UseSkillOperation(Skill Skill, ILivingEntity Target) : ICombatOper

        try
        {
            await Task.Delay(Skill.Info.CastTime * 200 * 5, linkedSource.Token);
            // wait 10 times the cast delay in case su is not received.
            await Task.Delay(Skill.Info.CastTime * 1000, linkedSource.Token);
        }
        catch (TaskCanceledException)
        {
            // ignored
        }
        await combatState.CombatManager.UnregisterSkillCancellationTokenAsync(linkedSource, ct);
        await Task.Delay(100, ct);
        await Task.Delay(1000, ct);

        return Result.FromSuccess();
    }

Do not follow this link