mirror of
https://github.com/Melledy/Nebula.git
synced 2026-09-19 17:19:58 +02:00
Implement basic quest stuff
This commit is contained in:
@@ -62,6 +62,8 @@ public class GameData {
|
||||
@Getter private static DataTable<StoryDef> StoryDataTable = new DataTable<>();
|
||||
@Getter private static DataTable<StorySetSectionDef> StorySetSectionDataTable = new DataTable<>();
|
||||
|
||||
@Getter private static DataTable<DailyQuestDef> DailyQuestDataTable = new DataTable<>();
|
||||
|
||||
@Getter private static DataTable<StarTowerDef> StarTowerDataTable = new DataTable<>();
|
||||
@Getter private static DataTable<StarTowerStageDef> StarTowerStageDataTable = new DataTable<>();
|
||||
@Getter private static DataTable<PotentialDef> PotentialDataTable = new DataTable<>();
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package emu.nebula.data.resources;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import emu.nebula.data.BaseDef;
|
||||
import emu.nebula.data.ResourceType;
|
||||
import emu.nebula.data.ResourceType.LoadPriority;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@ResourceType(name = "DailyQuest.json", loadPriority = LoadPriority.LOW)
|
||||
public class DailyQuestDef extends BaseDef {
|
||||
private int Id;
|
||||
private boolean Apear;
|
||||
private int Active;
|
||||
private int ItemTid;
|
||||
private int ItemQty;
|
||||
|
||||
private int CompleteCond;
|
||||
private int CompleteCondClient;
|
||||
private String CompleteCondParams;
|
||||
|
||||
private transient int[] condParams;
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return Id;
|
||||
}
|
||||
|
||||
public int[] getCompleteCondParams() {
|
||||
return this.condParams;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
this.condParams = Arrays.stream(this.CompleteCondParams.split("[\\[,\\]]"))
|
||||
.filter(s -> !s.isEmpty())
|
||||
.mapToInt(Integer::parseInt)
|
||||
.toArray();
|
||||
|
||||
this.CompleteCondParams = null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user