Fix main story chapter 9

This commit is contained in:
Melledy committed 2026-10-06 15:14:18 -07:00
1 parent 4377fb114b
commit 4bf52f127d
3 files changed
+38 -4

No files matched your search

+2 -2
View File
@@ -12,7 +12,7 @@ Latest nightly compiled server jar: [Nightly](https://nightly.link/Melledy/Nebul
- Inventory/Discs working - Inventory/Discs working
- Energy system - Energy system
- Mail system - Mail system
- Story (untested) - Story
- Daily quests - Daily quests
- Battle pass - Battle pass
- Gacha - Gacha
@@ -27,7 +27,7 @@ Latest nightly compiled server jar: [Nightly](https://nightly.link/Melledy/Nebul
- Proving Grounds - Proving Grounds
- Catacylsm Survivor (talents not fully working) - Catacylsm Survivor (talents not fully working)
- Boss Blitz - Boss Blitz
- Events (Only tower defense and trials) - Events (Only tower defense and trials. Other events may work)
### Supported regions ### Supported regions
@@ -83,14 +83,15 @@ public class StoryManager extends PlayerManager implements GameDatabaseObject {
// Handle regular story // Handle regular story
for (var settle : list) { for (var settle : list) {
// Get id // Get story id
int id = settle.getIdx(); int id = settle.getIdx();
// Get story data // Get story data
var data = GameData.getStoryDataTable().get(id); var data = GameData.getStoryDataTable().get(id);
if (data == null) continue; if (data == null) continue;
// Settle options (Must be before the completion check as we need to do the same story multiple times to get all the endings) // Settle options
// Important: Must be before the completion check as we need to do the same story multiple times to get all the endings
this.settleOptions(settle); this.settleOptions(settle);
// Check if we already completed the story // Check if we already completed the story
@@ -122,6 +123,9 @@ public class StoryManager extends PlayerManager implements GameDatabaseObject {
continue; continue;
} }
// Add evidence
this.getEvidences().add(id);
// Save to db // Save to db
Nebula.getGameDatabase().addToSet(this, this.getPlayerUid(), "evidences", id); Nebula.getGameDatabase().addToSet(this, this.getPlayerUid(), "evidences", id);
} }
@@ -252,8 +256,10 @@ public class StoryManager extends PlayerManager implements GameDatabaseObject {
@PostLoad @PostLoad
public void onLoad() { public void onLoad() {
// Simple flag to check if we need to save this manager to the database
boolean save = false; boolean save = false;
// Create evidences/option data if we are missing them
if (this.evidences == null) { if (this.evidences == null) {
this.evidences = new IntOpenHashSet(); this.evidences = new IntOpenHashSet();
save = true; save = true;
@@ -264,6 +270,19 @@ public class StoryManager extends PlayerManager implements GameDatabaseObject {
save = true; save = true;
} }
// Hardcoded fix if the player is missing the last option in main story chapter 9
if (this.getCompletedStories().contains(1025)) {
if (!this.getEvidences().contains(1004)) {
this.getEvidences().add(1004);
save = true;
}
if (!this.getEvidences().contains(1007)) {
this.getEvidences().add(1007);
save = true;
}
}
// Save to database
if (save) { if (save) {
this.save(); this.save();
} }
@@ -1451,5 +1451,20 @@
"Id": 633, "Id": 633,
"Param1": 309, "Param1": 309,
"ParamCond1": 0 "ParamCond1": 0
},
{
"Id": 635,
"Param1": 825,
"ParamCond1": 0
},
{
"Id": 636,
"Param1": 926,
"ParamCond1": 0
},
{
"Id": 657,
"Param1": 1026,
"ParamCond1": 0
} }
] ]