Add campaign bonuses; fix parts variant/sub-stat grants and menu-pick quest resume state
Build and Push Docker images to Docker Hub / build-and-push (push) Has been cancelled

This commit is contained in:
Ilya Groshev
2026-05-25 09:31:53 +03:00
parent 2d0c0d8ef0
commit dc7c1df4fd
21 changed files with 825 additions and 69 deletions
+4
View File
@@ -158,5 +158,9 @@ func buildPartsStatusMain() (map[int32]PartsStatusMainDef, map[int32][]int32) {
id++
}
}
// Newer parts groups (PartsGroupId 401-490) use PartsStatusSubLotteryGroupId
// 11/12 for rarities 10/20 instead of 1/2. Same stat pools — alias them.
pool[11] = pool[1]
pool[12] = pool[2]
return defs, pool
}
+15
View File
@@ -37,6 +37,8 @@ type QuestCatalog struct {
RoutesBySeason map[int32][]int32
RouteCompletionQuestId map[int32]int32
BattleOnlyTargetSceneByQuestId map[int32]int32
MainQuestChapterIdByQuestId map[int32]int32
EventQuestTypeByChapterId map[int32]int32
UserExpThresholds []int32
CharacterExpThresholds []int32
@@ -382,12 +384,23 @@ func LoadQuestCatalog(partsCatalog *PartsCatalog) (*QuestCatalog, error) {
chapterBySequenceId[chapter.MainQuestSequenceGroupId] = chapter
}
routeIdByQuestId := make(map[int32]int32)
mainQuestChapterIdByQuestId := make(map[int32]int32)
for _, sequence := range sequences {
if chapter, ok := chapterBySequenceId[sequence.MainQuestSequenceId]; ok {
routeIdByQuestId[sequence.QuestId] = chapter.MainQuestRouteId
mainQuestChapterIdByQuestId[sequence.QuestId] = chapter.MainQuestChapterId
}
}
eventChapters, err := utils.ReadTable[EntityMEventQuestChapter]("m_event_quest_chapter")
if err != nil {
return nil, fmt.Errorf("load event quest chapter table: %w", err)
}
eventQuestTypeByChapterId := make(map[int32]int32, len(eventChapters))
for _, ec := range eventChapters {
eventQuestTypeByChapterId[ec.EventQuestChapterId] = ec.EventQuestType
}
sortedChapters := make([]EntityMMainQuestChapter, len(chapters))
copy(sortedChapters, chapters)
sort.Slice(sortedChapters, func(i, j int) bool {
@@ -589,6 +602,8 @@ func LoadQuestCatalog(partsCatalog *PartsCatalog) (*QuestCatalog, error) {
RoutesBySeason: routesBySeason,
RouteCompletionQuestId: routeCompletionQuestId,
BattleOnlyTargetSceneByQuestId: battleOnlyTargetSceneByQuestId,
MainQuestChapterIdByQuestId: mainQuestChapterIdByQuestId,
EventQuestTypeByChapterId: eventQuestTypeByChapterId,
UserExpThresholds: BuildExpThresholds(paramMapRows, 1),
CharacterExpThresholds: BuildExpThresholds(paramMapRows, 31),