refactor(controllers): migrate practice/story/item_purchase to MissionEventKeys
PracticeController.Finish now uses MissionEventKeys.Practice.WinAll — the counter keys emitted match the catalog's named form (practice_win:elite:arisa etc.), closing the numeric-vs-named mismatch that had all practice-elite achievements silently at zero. Also removes the "bridging is a follow-up" TODO. StoryController.Finish uses MissionEventKeys.Story.ChapterFinishAll for the same shape. ItemPurchaseController.CounterKey routes through MissionEventKeys.ItemPurchase so the "item_purchase:" prefix has one owner. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SVSim.Database.Entities.Story;
|
||||
using SVSim.Database.Services;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Story;
|
||||
using SVSim.EmulatedEntrypoint.Services;
|
||||
|
||||
@@ -83,12 +84,8 @@ public class StoryController : SVSimController
|
||||
};
|
||||
if (prefix is not null && req.StoryId != 0)
|
||||
{
|
||||
await _missionProgress.RecordEventAsync(vid, new[]
|
||||
{
|
||||
"story_chapter_finish",
|
||||
$"story_chapter_finish:{prefix}",
|
||||
$"story_chapter_finish:{prefix}:{req.StoryId}",
|
||||
});
|
||||
await _missionProgress.RecordEventAsync(
|
||||
vid, MissionEventKeys.Story.ChapterFinishAll(prefix, req.StoryId));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user