Table of Contents

Interface ICharacterPetService

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

Service interface for managing a character's pet.

public interface ICharacterPetService : IPersistAction<CharacterPetData>, IPersistManyAction<CharacterPetData>, IDeleteByKeyVersionedAction<long>, IFetchByKeyAction<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 spawned pet for the specified character.

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

Parameters

characterId long

The character ID.

cancellationToken CancellationToken

Token to cancel the operation.

Returns

Task<DatabaseResult<CharacterPetData?>>

A DatabaseResult<T> containing the spawned pet on success, or null when not spawned.