Class CurrencyLedgerService
Appends completed currency movements to the economy ledger.
public sealed class CurrencyLedgerService : BaseService<CurrencyLedgerEntity>, ICurrencyLedgerService
- Inheritance
-
CurrencyLedgerService
- Implements
- Inherited Members
Constructors
CurrencyLedgerService(INpgsqlDbContextFactory)
public CurrencyLedgerService(INpgsqlDbContextFactory dbContextFactory)
Parameters
dbContextFactoryINpgsqlDbContextFactory
Methods
RecordAsync(long, long, int, int, CancellationToken)
Appends one completed movement.
public Task<DatabaseResult> RecordAsync(long characterID, long amount, int reason, int state, CancellationToken cancellationToken = default)
Parameters
characterIDlongThe character whose balance moved.
amountlongAmount moved. Must be positive.
reasonintMaps to FishMMO.Shared.CurrencyMovementReason.
stateintMaps to FishMMO.Shared.CurrencyMovementState. Absorbed or Returned.
cancellationTokenCancellationToken