From e73d04ce2d1a253c1b422203664cb3516f403d68 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Fri, 3 Jan 2025 11:18:45 +0100 Subject: [PATCH] Add a minimum delay to redeeming item rewards --- .../Controller/Steps/Shared/RedeemRewardItems.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Questionable/Controller/Steps/Shared/RedeemRewardItems.cs b/Questionable/Controller/Steps/Shared/RedeemRewardItems.cs index 4d11e72b..e03d989d 100644 --- a/Questionable/Controller/Steps/Shared/RedeemRewardItems.cs +++ b/Questionable/Controller/Steps/Shared/RedeemRewardItems.cs @@ -49,6 +49,7 @@ internal static class RedeemRewardItems GameFunctions gameFunctions, ICondition condition) : TaskExecutor { + private static readonly TimeSpan MinimumCastTime = TimeSpan.FromSeconds(4); private DateTime _continueAt; protected override bool Start() @@ -56,7 +57,13 @@ internal static class RedeemRewardItems if (condition[ConditionFlag.Mounted]) return false; - _continueAt = DateTime.Now.Add(Task.ItemReward.CastTime).AddSeconds(1); + TimeSpan castTime = Task.ItemReward.CastTime; + if (castTime < MinimumCastTime) + castTime = MinimumCastTime; + + _continueAt = DateTime.Now + .Add(castTime) + .AddSeconds(1); return gameFunctions.UseItem(Task.ItemReward.ItemId); }