refactor(calendar): expose AllTime via GameCalendarPeriods, not the concrete service
Move the "all-time" constant out of GameCalendarService (concrete) into a new static class GameCalendarPeriods. Consumers using IGameCalendarService no longer have to reach through the concrete class to name the lifetime bucket. Migrates 5 callsites (mission progress/assembler, admin, item purchase, tests). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -107,7 +107,7 @@ public sealed class MissionAssembler : IMissionAssembler
|
||||
foreach (var a in viewerAchievements.OrderBy(a => a.AchievementType))
|
||||
{
|
||||
if (!achievementCatalogByKey.TryGetValue((a.AchievementType, a.Level), out var catalog)) continue;
|
||||
int total = catalog.EventType is null ? 0 : GetCounter(catalog.EventType, GameCalendarService.AllTime);
|
||||
int total = catalog.EventType is null ? 0 : GetCounter(catalog.EventType, GameCalendarPeriods.AllTime);
|
||||
int maxLevel = maxLevelByType.TryGetValue(a.AchievementType, out var ml) ? ml : a.Level;
|
||||
dto.UserAchievementList.Add(new UserAchievementDto
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user