Fix menu pick black screen for quests without a difficulty relation
Build and Push Docker images to Docker Hub / build-and-push (push) Has been cancelled

This commit is contained in:
Ilya Groshev
2026-05-12 11:21:19 +03:00
parent 479ace5c8e
commit cc9dc4f1c5
2 changed files with 1 additions and 21 deletions
-20
View File
@@ -34,7 +34,6 @@ type QuestCatalog struct {
TutorialUnlockConditions []EntityMTutorialUnlockCondition
ChapterLastSceneByQuestId map[int32]int32
SeasonIdByRouteId map[int32]int32
QuestsWithDifficulty map[int32]bool // any questId referenced in m_quest_relation_main_flow
BattleOnlyTargetSceneByQuestId map[int32]int32
UserExpThresholds []int32
@@ -240,21 +239,6 @@ func LoadQuestCatalog(partsCatalog *PartsCatalog) (*QuestCatalog, error) {
return nil, fmt.Errorf("load tutorial unlock condition table: %w", err)
}
relations, err := utils.ReadTable[EntityMQuestRelationMainFlow]("m_quest_relation_main_flow")
if err != nil {
return nil, fmt.Errorf("load quest relation main flow table: %w", err)
}
questsWithDifficulty := make(map[int32]bool, len(relations)*3)
for _, r := range relations {
questsWithDifficulty[r.MainFlowQuestId] = true
if r.ReplayFlowQuestId != 0 {
questsWithDifficulty[r.ReplayFlowQuestId] = true
}
if r.SubFlowQuestId != 0 {
questsWithDifficulty[r.SubFlowQuestId] = true
}
}
battleOnlyTargetSceneByQuestId := make(map[int32]int32)
for _, scene := range scenes {
if scene.IsBattleOnlyTarget {
@@ -555,7 +539,6 @@ func LoadQuestCatalog(partsCatalog *PartsCatalog) (*QuestCatalog, error) {
TutorialUnlockConditions: tutorialUnlockConds,
ChapterLastSceneByQuestId: chapterLastSceneByQuestId,
SeasonIdByRouteId: seasonIdByRouteId,
QuestsWithDifficulty: questsWithDifficulty,
BattleOnlyTargetSceneByQuestId: battleOnlyTargetSceneByQuestId,
UserExpThresholds: BuildExpThresholds(paramMapRows, 1),
@@ -579,6 +562,3 @@ func (q *QuestCatalog) BattleOnlyTargetSceneIdFor(questId int32) (int32, bool) {
return v, ok
}
func (q *QuestCatalog) QuestHasDifficulty(questId int32) bool {
return q.QuestsWithDifficulty[questId]
}