mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-27 03:59:16 +00:00
Fix main quest data loading issue
This commit is contained in:
parent
486582b81c
commit
25c72a19e0
@ -2,9 +2,9 @@ package emu.grasscutter.data.binout;
|
|||||||
|
|
||||||
import dev.morphia.annotations.Entity;
|
import dev.morphia.annotations.Entity;
|
||||||
import emu.grasscutter.data.GameData;
|
import emu.grasscutter.data.GameData;
|
||||||
import emu.grasscutter.data.excels.QuestData;
|
|
||||||
import emu.grasscutter.game.quest.enums.QuestType;
|
import emu.grasscutter.game.quest.enums.QuestType;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@ -58,7 +58,9 @@ public class MainQuestData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onLoad() {
|
public void onLoad() {
|
||||||
if (this.talks != null)
|
if (this.talks == null) this.talks = new ArrayList<>();
|
||||||
|
if (this.subQuests == null) this.subQuests = new SubQuestData[0];
|
||||||
|
|
||||||
this.talks = this.talks.stream()
|
this.talks = this.talks.stream()
|
||||||
.filter(Objects::nonNull).toList();
|
.filter(Objects::nonNull).toList();
|
||||||
Arrays.stream(this.subQuests).forEach(quest -> {
|
Arrays.stream(this.subQuests).forEach(quest -> {
|
||||||
|
Loading…
Reference in New Issue
Block a user