mirror of
https://github.com/Melledy/Nebula.git
synced 2025-12-16 14:24:57 +01:00
Implement character stories
This commit is contained in:
@@ -43,6 +43,7 @@ public class GameData {
|
||||
@Getter private static DataTable<WorldClassDef> WorldClassDataTable = new DataTable<>();
|
||||
@Getter private static DataTable<GuideGroupDef> GuideGroupDataTable = new DataTable<>();
|
||||
@Getter private static DataTable<StoryDef> StoryDataTable = new DataTable<>();
|
||||
@Getter private static DataTable<StorySetSectionDef> StorySetSectionDataTable = new DataTable<>();
|
||||
|
||||
@Getter private static DataTable<StarTowerDef> StarTowerDataTable = new DataTable<>();
|
||||
@Getter private static DataTable<StarTowerStageDef> StarTowerStageDataTable = new DataTable<>();
|
||||
|
||||
@@ -2,6 +2,7 @@ package emu.nebula.data.resources;
|
||||
|
||||
import emu.nebula.data.BaseDef;
|
||||
import emu.nebula.data.ResourceType;
|
||||
import emu.nebula.game.inventory.ItemParamMap;
|
||||
import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
|
||||
import it.unimi.dsi.fastutil.ints.IntSet;
|
||||
import lombok.Getter;
|
||||
@@ -12,6 +13,11 @@ public class StorySetSectionDef extends BaseDef {
|
||||
private int Id;
|
||||
private int ChapterId;
|
||||
|
||||
private int RewardItem1Tid;
|
||||
private int RewardItem1Qty;
|
||||
|
||||
private transient ItemParamMap rewards;
|
||||
|
||||
@Getter
|
||||
private static IntSet chapterIds = new IntOpenHashSet();
|
||||
|
||||
@@ -22,6 +28,14 @@ public class StorySetSectionDef extends BaseDef {
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
// Add to chapter ids
|
||||
chapterIds.add(this.getChapterId());
|
||||
|
||||
// Parse rewards
|
||||
this.rewards = new ItemParamMap();
|
||||
|
||||
if (this.RewardItem1Tid > 0) {
|
||||
this.rewards.add(this.RewardItem1Tid, this.RewardItem1Qty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user