Files
SVSimServer/SVSim.EmulatedEntrypoint/Services/IMissionProgressService.cs
gamer147 aad604a589 feat(missions): MissionProgressService — counter upsert + achievement claimable on threshold
Also wires IMissionCatalogRepository + IViewerMissionRepository +
IMissionProgressService into DI. Task 17's separate DI step is now
subsumed by these registrations.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 10:25:13 -04:00

18 lines
991 B
C#

namespace SVSim.EmulatedEntrypoint.Services;
/// <summary>
/// Single primitive for "something happened that mission/achievement progress should react to."
/// Emitters at battle/story finish call this with the FULL list of event keys their event matches
/// at all granularity levels (broad → narrow). Service does dumb exact-match against catalog.
/// </summary>
public interface IMissionProgressService
{
/// <param name="viewerId">Viewer the event applies to.</param>
/// <param name="eventKeys">Broad-to-narrow keys. Example: a swordcraft ranked win
/// passes ["ranked_win", "ranked_win:swordcraft"]. The order doesn't matter for counter
/// increments (each key gets its own counter) but the order is the conventional one used
/// by emitters for readability.</param>
/// <param name="delta">Count delta per key (default 1).</param>
Task RecordEventAsync(long viewerId, IReadOnlyList<string> eventKeys, int delta = 1, CancellationToken ct = default);
}