Derive main-quest season routes at projection time

This commit is contained in:
Ilya Groshev
2026-05-22 17:24:30 +03:00
parent ef69c54949
commit 810adcf990
11 changed files with 101 additions and 96 deletions
+4 -2
View File
@@ -101,8 +101,9 @@ func ChangedTables(before, after *store.UserState) []string {
add("IUserMainQuestMainFlowStatus")
add("IUserMainQuestProgressStatus")
add("IUserMainQuestReplayFlowStatus")
}
if !mapsEqualStruct(before.MainQuestSeasonRoutes, after.MainQuestSeasonRoutes) {
// IUserMainQuestSeasonRoute is derived from MainQuest + Quests at projection
// time (see proj_quest.go / questflow.QuestHandler.SeasonRoutesFor) — flag it
// whenever either of those upstream inputs changes.
add("IUserMainQuestSeasonRoute")
}
if before.EventQuest != after.EventQuest {
@@ -202,6 +203,7 @@ func ChangedTables(before, after *store.UserState) []string {
}
if !mapsEqualStruct(before.Quests, after.Quests) {
add("IUserQuest")
add("IUserMainQuestSeasonRoute")
}
if !mapsEqualStruct(before.QuestMissions, after.QuestMissions) {
add("IUserQuestMission")