From f0214a2f19a144cf2e1f9f4f4fe317e630918b27 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Sat, 31 Dec 2022 15:09:17 +0100 Subject: [PATCH] fix(combat): wait for a second after casting a skill This seems to be the "reload" period needed until the character may move again --- .../Operations/UseSkillOperation.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Extensions/NosSmooth.Extensions.Combat/Operations/UseSkillOperation.cs b/Extensions/NosSmooth.Extensions.Combat/Operations/UseSkillOperation.cs index 6b206ba..7e61073 100644 --- a/Extensions/NosSmooth.Extensions.Combat/Operations/UseSkillOperation.cs +++ b/Extensions/NosSmooth.Extensions.Combat/Operations/UseSkillOperation.cs @@ -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(); } -- 2.49.0