Interface IArenaPenaltyService
- Namespace
- FishMMO.Database.Npgsql.Services.Interfaces
- Assembly
- FishMMO-DB.dll
Service interface for arena queue locks: the deserter penalty.
public interface IArenaPenaltyService
Methods
ClearAsync(long, CancellationToken)
Removes a character's lock, if any. For a disconnected player who came back in time.
Task<DatabaseResult<bool>> ClearAsync(long characterId, CancellationToken cancellationToken = default)
Parameters
characterIdlongcancellationTokenCancellationToken
Returns
FetchActiveAsync(IReadOnlyList<long>, CancellationToken)
Reads the locks that are still in force for the given characters.
Task<DatabaseResult<IReadOnlyList<ArenaPenaltyData>>> FetchActiveAsync(IReadOnlyList<long> characterIds, CancellationToken cancellationToken = default)
Parameters
characterIdsIReadOnlyList<long>cancellationTokenCancellationToken
Returns
SetAsync(long, DateTime, string, CancellationToken)
Locks a character out of the arena queue until an instant. Replaces an earlier lock.
Task<DatabaseResult<bool>> SetAsync(long characterId, DateTime lockedUntilUtc, string reason, CancellationToken cancellationToken = default)
Parameters
characterIdlonglockedUntilUtcDateTimereasonstringcancellationTokenCancellationToken