Table of Contents

Interface ICharacterPetService

Namespace
FishMMO.Database.Npgsql.Services.Interfaces
Assembly
FishMMO-DB.dll

Service interface for managing a character's pets, one row per pet slot.

public interface ICharacterPetService : IPersistAction<CharacterPetData>, IPersistManyAction<CharacterPetData>, IPersistManyOwnedAction<CharacterPetData>, IDeleteByKeyVersionedAction<long>, IFetchCollectionByKeyAction<long, CharacterPetData>
Inherited Members

Remarks

Pet persistence and deletion should be version-gated via the logical Version so stale updates are rejected and newer authoritative updates win.

Methods

FetchSpawnedAsync(long, CancellationToken)

Fetches the pets the specified character had out, in slot order.

Task<DatabaseResult<IReadOnlyList<CharacterPetData>>> FetchSpawnedAsync(long characterId, CancellationToken cancellationToken = default)

Parameters

characterId long

The character ID.

cancellationToken CancellationToken

Token to cancel the operation.

Returns

Task<DatabaseResult<IReadOnlyList<CharacterPetData>>>

A DatabaseResult<T> containing the spawned pets on success; empty when none was out.