18 lines
1009 B
C#
18 lines
1009 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 active cooldown end when <paramref name="now"/> is strictly before that end; removes expired entries (same hygiene as <see cref="IsOnCooldown"/>).</summary>
|
|
bool TryGetCooldownEndUtc(string playerId, int slotIndex, DateTimeOffset now, out DateTimeOffset endUtc);
|
|
|
|
/// <summary>Clears all slot cooldowns for <paramref name="playerId"/> (dev Bruno fixture).</summary>
|
|
void ClearPlayer(string playerId);
|
|
}
|