namespace NeonSprawl.Server.Game.Encounters; /// Clears per-player encounter stores for dev Bruno/QA resets (NEO-108). internal static class EncounterDevFixtureOperations { /// Removes progress, completion, and event rows for across catalog encounters. public static void ClearPlayerEncounterState( string playerId, IEncounterDefinitionRegistry encounterRegistry, IEncounterProgressStore progressStore, IEncounterCompletionStore completionStore, IEncounterCompleteEventStore eventStore) { foreach (var def in encounterRegistry.GetDefinitionsInIdOrder()) { if (progressStore is InMemoryEncounterProgressStore inMemoryProgress) { inMemoryProgress.TryClear(playerId, def.Id); } if (completionStore is InMemoryEncounterCompletionStore inMemoryCompletion) { inMemoryCompletion.TryClear(playerId, def.Id); } if (eventStore is InMemoryEncounterCompleteEventStore inMemoryEvent) { inMemoryEvent.TryClear(playerId, def.Id); } } } }