15 lines
771 B
C#
15 lines
771 B
C#
namespace NeonSprawl.Server.Game.AbilityInput;
|
|
|
|
/// <summary>In-memory per-player hotbar slot cooldown ends (NEO-32).</summary>
|
|
public interface IPlayerAbilityCooldownStore
|
|
{
|
|
/// <summary>Returns true when the slot has a cooldown end strictly after <paramref name="now"/>.</summary>
|
|
bool IsOnCooldown(string playerId, int slotIndex, DateTimeOffset now);
|
|
|
|
/// <summary>Sets cooldown end for a slot to <paramref name="now"/> + <paramref name="duration"/>.</summary>
|
|
void StartCooldown(string playerId, int slotIndex, DateTimeOffset now, TimeSpan duration);
|
|
|
|
/// <summary>Gets stored end instant for the slot when an entry exists (may be in the past).</summary>
|
|
bool TryGetCooldownEndUtc(string playerId, int slotIndex, out DateTimeOffset endUtc);
|
|
}
|