Story fixes

This commit is contained in:
gamer147
2026-05-25 15:21:35 -04:00
parent c530809449
commit 9b051c444c
3 changed files with 710 additions and 11 deletions

View File

@@ -10,8 +10,13 @@ public class StoryMasterRepository : IStoryMasterRepository
public Task<List<StorySection>> GetSectionsByFamilyAsync(StoryApiType apiType)
{
// /story/section (AllStory) returns BOTH Main and Limited sections — they share world_list
// entries in prod. The Story Mode UI's "Special" submenu in world 1 is populated by the
// limited-story sections (section_id >= 9000, story_type_overwrite=2) appearing alongside
// the Prologue (section 0). Event-story sections never appear here — they live behind their
// own menu and are fetched via /event_story/section.
var families = apiType == StoryApiType.AllStory
? new[] { StoryApiType.Main } // AllStory effectively returns Main per spec
? new[] { StoryApiType.Main, StoryApiType.Limited }
: new[] { apiType };
return _db.StorySections.Where(s => families.Contains(s.StoryApiType))
.OrderBy(s => s.AllStoryOrderId)