Table of Contents

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

characterId long
cancellationToken CancellationToken

Returns

Task<DatabaseResult<bool>>

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

characterIds IReadOnlyList<long>
cancellationToken CancellationToken

Returns

Task<DatabaseResult<IReadOnlyList<ArenaPenaltyData>>>

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

characterId long
lockedUntilUtc DateTime
reason string
cancellationToken CancellationToken

Returns

Task<DatabaseResult<bool>>