mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-27 02:43:15 +00:00
Add sub-quest data only in BinOutput
could fix things sometimes
This commit is contained in:
parent
1a8d7e901a
commit
fb686b2afc
@ -2,11 +2,13 @@ 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.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
public class MainQuestData {
|
public class MainQuestData {
|
||||||
@ -59,17 +61,14 @@ public class MainQuestData {
|
|||||||
this.talks = talks.stream().filter(Objects::nonNull).toList();
|
this.talks = talks.stream().filter(Objects::nonNull).toList();
|
||||||
Arrays.stream(this.subQuests).forEach(quest -> {
|
Arrays.stream(this.subQuests).forEach(quest -> {
|
||||||
var questData = GameData.getQuestDataMap().get(quest.getSubId());
|
var questData = GameData.getQuestDataMap().get(quest.getSubId());
|
||||||
if (questData != null) questData.applyFrom(quest);
|
if (questData != null)
|
||||||
|
questData.applyFrom(quest);
|
||||||
|
else
|
||||||
|
GameData.getQuestDataMap().put(quest.getSubId(), quest);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Data
|
public static class SubQuestData extends QuestData { }
|
||||||
public static class SubQuestData {
|
|
||||||
private int subId;
|
|
||||||
private int order;
|
|
||||||
private boolean isRewind;
|
|
||||||
private boolean finishParent;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Entity
|
@Entity
|
||||||
|
Loading…
Reference in New Issue
Block a user