From 4ffda39b1265ff40f7096cd82607a96b08a3d587 Mon Sep 17 00:00:00 2001 From: ImmuState Date: Sat, 4 Jun 2022 12:05:03 -0700 Subject: [PATCH] Add handling for ForgeExcelConfigData. --- .../java/emu/grasscutter/data/GameData.java | 1 + .../data/common/MaterialItemsData.java | 22 +++++++ .../grasscutter/data/excels/ForgeData.java | 63 +++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 src/main/java/emu/grasscutter/data/common/MaterialItemsData.java create mode 100644 src/main/java/emu/grasscutter/data/excels/ForgeData.java diff --git a/src/main/java/emu/grasscutter/data/GameData.java b/src/main/java/emu/grasscutter/data/GameData.java index 1a3663784..9863afdee 100644 --- a/src/main/java/emu/grasscutter/data/GameData.java +++ b/src/main/java/emu/grasscutter/data/GameData.java @@ -87,6 +87,7 @@ public class GameData { private static final Int2ObjectMap towerFloorDataMap = new Int2ObjectOpenHashMap<>(); private static final Int2ObjectMap towerLevelDataMap = new Int2ObjectOpenHashMap<>(); private static final Int2ObjectMap towerScheduleDataMap = new Int2ObjectOpenHashMap<>(); + private static final Int2ObjectMap forgeDataMap = new Int2ObjectOpenHashMap<>(); // Cache private static Map> fetters = new HashMap<>(); diff --git a/src/main/java/emu/grasscutter/data/common/MaterialItemsData.java b/src/main/java/emu/grasscutter/data/common/MaterialItemsData.java new file mode 100644 index 000000000..682b92fb2 --- /dev/null +++ b/src/main/java/emu/grasscutter/data/common/MaterialItemsData.java @@ -0,0 +1,22 @@ +package emu.grasscutter.data.common; + +import java.util.List; + +public class MaterialItemsData { + private int id; + private int count; + + public int getId() { + return this.id; + } + public void setId(int value) { + this.id = value; + } + + public int getCount() { + return this.count; + } + public void setCount(int value) { + this.count = value; + } +} diff --git a/src/main/java/emu/grasscutter/data/excels/ForgeData.java b/src/main/java/emu/grasscutter/data/excels/ForgeData.java new file mode 100644 index 000000000..e8cd7e8d1 --- /dev/null +++ b/src/main/java/emu/grasscutter/data/excels/ForgeData.java @@ -0,0 +1,63 @@ +package emu.grasscutter.data.excels; + +import java.util.List; + +import emu.grasscutter.data.GameResource; +import emu.grasscutter.data.ResourceType; +import emu.grasscutter.data.ResourceType.LoadPriority; +import emu.grasscutter.data.common.MaterialItemsData; +import emu.grasscutter.data.common.OpenCondData; + +@ResourceType(name = {"ForgeExcelConfigData.json"}, loadPriority = LoadPriority.HIGHEST) +public class ForgeData extends GameResource { + private int id; + private int playerLevel; + private int forgeType; + private int resultItemCount; + private int forgeTime; + private int queueNum; + private int scoinCost; + private int priority; + private List materialItems; + + @Override + public int getId() { + return this.id; + } + + public int getPlayerLevel() { + return playerLevel; + } + + public int getForgeType() { + return forgeType; + } + + public int getResultItemCount() { + return resultItemCount; + } + + public int getForgeTime() { + return forgeTime; + } + + public int getQueueNum() { + return queueNum; + } + + public int getScoinCost() { + return scoinCost; + } + + public int getPriority() { + return priority; + } + + public List getMaterialItems() { + return materialItems; + } + + @Override + public void onLoad() { + } +}