Files
SVSimServer/SVSim.EmulatedEntrypoint/Services/IViewerMissionStateService.cs
gamer147 5693ec0302 feat(missions): /load/index materializes viewer mission/achievement state
EnsureCurrentAsync now takes viewerId (was Viewer), so it works with
LoadController's AsNoTracking-loaded detached viewers.

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

13 lines
501 B
C#

namespace SVSim.EmulatedEntrypoint.Services;
/// <summary>
/// Lazy-initializes viewer mission/achievement state. Idempotent. Called from
/// LoadController on every /load/index and as belt-and-braces from /mission/info.
/// Takes viewerId (not Viewer) so it works against both tracked and detached viewer loads.
/// Caller is responsible for SaveChangesAsync.
/// </summary>
public interface IViewerMissionStateService
{
Task EnsureCurrentAsync(long viewerId, CancellationToken ct = default);
}