diff --git a/src/main/java/emu/grasscutter/command/commands/DropCommand.java b/src/main/java/emu/grasscutter/command/commands/DropCommand.java index 08f472b81..ce1a1761b 100644 --- a/src/main/java/emu/grasscutter/command/commands/DropCommand.java +++ b/src/main/java/emu/grasscutter/command/commands/DropCommand.java @@ -4,7 +4,7 @@ import emu.grasscutter.Grasscutter; import emu.grasscutter.command.Command; import emu.grasscutter.command.CommandHandler; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.ItemData; +import emu.grasscutter.data.excels.ItemData; import emu.grasscutter.game.entity.EntityItem; import emu.grasscutter.game.player.Player; import emu.grasscutter.utils.Position; diff --git a/src/main/java/emu/grasscutter/command/commands/GiveAllCommand.java b/src/main/java/emu/grasscutter/command/commands/GiveAllCommand.java index 5af409e3b..e71385c7d 100644 --- a/src/main/java/emu/grasscutter/command/commands/GiveAllCommand.java +++ b/src/main/java/emu/grasscutter/command/commands/GiveAllCommand.java @@ -4,8 +4,8 @@ import emu.grasscutter.Grasscutter; import emu.grasscutter.command.Command; import emu.grasscutter.command.CommandHandler; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.AvatarData; -import emu.grasscutter.data.def.ItemData; +import emu.grasscutter.data.excels.AvatarData; +import emu.grasscutter.data.excels.ItemData; import emu.grasscutter.game.avatar.Avatar; import emu.grasscutter.game.inventory.GameItem; import emu.grasscutter.game.inventory.ItemType; diff --git a/src/main/java/emu/grasscutter/command/commands/GiveArtifactCommand.java b/src/main/java/emu/grasscutter/command/commands/GiveArtifactCommand.java index 3d3337bc2..eaa0635dc 100644 --- a/src/main/java/emu/grasscutter/command/commands/GiveArtifactCommand.java +++ b/src/main/java/emu/grasscutter/command/commands/GiveArtifactCommand.java @@ -4,7 +4,7 @@ import emu.grasscutter.Grasscutter; import emu.grasscutter.command.Command; import emu.grasscutter.command.CommandHandler; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.ItemData; +import emu.grasscutter.data.excels.ItemData; import emu.grasscutter.game.inventory.GameItem; import emu.grasscutter.game.inventory.ItemType; import emu.grasscutter.game.player.Player; diff --git a/src/main/java/emu/grasscutter/command/commands/GiveCharCommand.java b/src/main/java/emu/grasscutter/command/commands/GiveCharCommand.java index 700f5cb47..34592fb81 100644 --- a/src/main/java/emu/grasscutter/command/commands/GiveCharCommand.java +++ b/src/main/java/emu/grasscutter/command/commands/GiveCharCommand.java @@ -4,7 +4,7 @@ import emu.grasscutter.Grasscutter; import emu.grasscutter.command.Command; import emu.grasscutter.command.CommandHandler; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.AvatarData; +import emu.grasscutter.data.excels.AvatarData; import emu.grasscutter.game.avatar.Avatar; import emu.grasscutter.game.player.Player; diff --git a/src/main/java/emu/grasscutter/command/commands/GiveCommand.java b/src/main/java/emu/grasscutter/command/commands/GiveCommand.java index d86ee42f6..dbe02a1cd 100644 --- a/src/main/java/emu/grasscutter/command/commands/GiveCommand.java +++ b/src/main/java/emu/grasscutter/command/commands/GiveCommand.java @@ -3,7 +3,7 @@ package emu.grasscutter.command.commands; import emu.grasscutter.command.Command; import emu.grasscutter.command.CommandHandler; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.ItemData; +import emu.grasscutter.data.excels.ItemData; import emu.grasscutter.game.inventory.GameItem; import emu.grasscutter.game.inventory.ItemType; import emu.grasscutter.game.player.Player; diff --git a/src/main/java/emu/grasscutter/command/commands/SpawnCommand.java b/src/main/java/emu/grasscutter/command/commands/SpawnCommand.java index f921daf56..60d4c3c17 100644 --- a/src/main/java/emu/grasscutter/command/commands/SpawnCommand.java +++ b/src/main/java/emu/grasscutter/command/commands/SpawnCommand.java @@ -4,10 +4,10 @@ import emu.grasscutter.Grasscutter; import emu.grasscutter.command.Command; import emu.grasscutter.command.CommandHandler; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.AvatarData; -import emu.grasscutter.data.def.GadgetData; -import emu.grasscutter.data.def.ItemData; -import emu.grasscutter.data.def.MonsterData; +import emu.grasscutter.data.excels.AvatarData; +import emu.grasscutter.data.excels.GadgetData; +import emu.grasscutter.data.excels.ItemData; +import emu.grasscutter.data.excels.MonsterData; import emu.grasscutter.game.avatar.Avatar; import emu.grasscutter.game.entity.*; import emu.grasscutter.game.player.Player; diff --git a/src/main/java/emu/grasscutter/command/commands/TalentCommand.java b/src/main/java/emu/grasscutter/command/commands/TalentCommand.java index 00cd54273..27ed8de4e 100644 --- a/src/main/java/emu/grasscutter/command/commands/TalentCommand.java +++ b/src/main/java/emu/grasscutter/command/commands/TalentCommand.java @@ -3,7 +3,7 @@ package emu.grasscutter.command.commands; import emu.grasscutter.Grasscutter; import emu.grasscutter.command.Command; import emu.grasscutter.command.CommandHandler; -import emu.grasscutter.data.def.AvatarSkillDepotData; +import emu.grasscutter.data.excels.AvatarSkillDepotData; import emu.grasscutter.game.avatar.Avatar; import emu.grasscutter.game.entity.EntityAvatar; import emu.grasscutter.game.player.Player; diff --git a/src/main/java/emu/grasscutter/data/GameData.java b/src/main/java/emu/grasscutter/data/GameData.java index 823c0cc14..9d38d08eb 100644 --- a/src/main/java/emu/grasscutter/data/GameData.java +++ b/src/main/java/emu/grasscutter/data/GameData.java @@ -8,12 +8,12 @@ import java.util.Map; import emu.grasscutter.Grasscutter; import emu.grasscutter.utils.Utils; -import emu.grasscutter.data.custom.AbilityEmbryoEntry; -import emu.grasscutter.data.custom.AbilityModifierEntry; -import emu.grasscutter.data.custom.OpenConfigEntry; -import emu.grasscutter.data.custom.MainQuestData; -import emu.grasscutter.data.custom.ScenePointEntry; -import emu.grasscutter.data.def.*; +import emu.grasscutter.data.binout.AbilityEmbryoEntry; +import emu.grasscutter.data.binout.AbilityModifierEntry; +import emu.grasscutter.data.binout.MainQuestData; +import emu.grasscutter.data.binout.OpenConfigEntry; +import emu.grasscutter.data.binout.ScenePointEntry; +import emu.grasscutter.data.excels.*; import it.unimi.dsi.fastutil.ints.Int2ObjectLinkedOpenHashMap; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; diff --git a/src/main/java/emu/grasscutter/data/GameDepot.java b/src/main/java/emu/grasscutter/data/GameDepot.java index fa5aecba5..851e6c464 100644 --- a/src/main/java/emu/grasscutter/data/GameDepot.java +++ b/src/main/java/emu/grasscutter/data/GameDepot.java @@ -7,8 +7,8 @@ import org.danilopianini.util.FlexibleQuadTree; import org.danilopianini.util.SpatialIndex; import emu.grasscutter.Grasscutter; -import emu.grasscutter.data.def.ReliquaryAffixData; -import emu.grasscutter.data.def.ReliquaryMainPropData; +import emu.grasscutter.data.excels.ReliquaryAffixData; +import emu.grasscutter.data.excels.ReliquaryMainPropData; import emu.grasscutter.game.world.SpawnDataEntry; import emu.grasscutter.game.world.SpawnDataEntry.SpawnGroupEntry; import emu.grasscutter.utils.WeightedList; diff --git a/src/main/java/emu/grasscutter/data/ResourceLoader.java b/src/main/java/emu/grasscutter/data/ResourceLoader.java index 6fe9b19fb..1c1e61c90 100644 --- a/src/main/java/emu/grasscutter/data/ResourceLoader.java +++ b/src/main/java/emu/grasscutter/data/ResourceLoader.java @@ -14,17 +14,17 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; import emu.grasscutter.Grasscutter; +import emu.grasscutter.data.binout.AbilityEmbryoEntry; +import emu.grasscutter.data.binout.AbilityModifier; +import emu.grasscutter.data.binout.AbilityModifierEntry; +import emu.grasscutter.data.binout.MainQuestData; +import emu.grasscutter.data.binout.OpenConfigEntry; +import emu.grasscutter.data.binout.ScenePointEntry; +import emu.grasscutter.data.binout.AbilityModifier.AbilityConfigData; +import emu.grasscutter.data.binout.AbilityModifier.AbilityModifierAction; +import emu.grasscutter.data.binout.AbilityModifier.AbilityModifierActionType; import emu.grasscutter.data.common.PointData; import emu.grasscutter.data.common.ScenePointConfig; -import emu.grasscutter.data.custom.AbilityEmbryoEntry; -import emu.grasscutter.data.custom.AbilityModifier; -import emu.grasscutter.data.custom.AbilityModifier.AbilityConfigData; -import emu.grasscutter.data.custom.AbilityModifier.AbilityModifierAction; -import emu.grasscutter.data.custom.AbilityModifier.AbilityModifierActionType; -import emu.grasscutter.data.custom.AbilityModifierEntry; -import emu.grasscutter.data.custom.OpenConfigEntry; -import emu.grasscutter.data.custom.MainQuestData; -import emu.grasscutter.data.custom.ScenePointEntry; import emu.grasscutter.game.world.SpawnDataEntry.*; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; @@ -138,18 +138,14 @@ public class ResourceLoader { @SuppressWarnings({"rawtypes", "unchecked"}) protected static void loadFromResource(Class c, String fileName, Int2ObjectMap map) throws Exception { - FileReader fileReader = new FileReader(RESOURCE("ExcelBinOutput/" + fileName)); - Gson gson = Grasscutter.getGsonFactory(); - List list = gson.fromJson(fileReader, List.class); + try (FileReader fileReader = new FileReader(RESOURCE("ExcelBinOutput/" + fileName))) { + List list = Grasscutter.getGsonFactory().fromJson(fileReader, TypeToken.getParameterized(Collection.class, c).getType()); - for (Object o : list) { - Map tempMap = Utils.switchPropertiesUpperLowerCase((Map) o, c); - GameResource res = gson.fromJson(gson.toJson(tempMap), TypeToken.get(c).getType()); - res.onLoad(); - if(map.containsKey(res.getId())) { - map.remove(res.getId()); + for (Object o : list) { + GameResource res = (GameResource) o; + res.onLoad(); + map.put(res.getId(), res); } - map.put(res.getId(), res); } } diff --git a/src/main/java/emu/grasscutter/data/custom/AbilityEmbryoEntry.java b/src/main/java/emu/grasscutter/data/binout/AbilityEmbryoEntry.java similarity index 90% rename from src/main/java/emu/grasscutter/data/custom/AbilityEmbryoEntry.java rename to src/main/java/emu/grasscutter/data/binout/AbilityEmbryoEntry.java index 9c5510145..e0a047a58 100644 --- a/src/main/java/emu/grasscutter/data/custom/AbilityEmbryoEntry.java +++ b/src/main/java/emu/grasscutter/data/binout/AbilityEmbryoEntry.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.custom; +package emu.grasscutter.data.binout; public class AbilityEmbryoEntry { private String name; diff --git a/src/main/java/emu/grasscutter/data/custom/AbilityModifier.java b/src/main/java/emu/grasscutter/data/binout/AbilityModifier.java similarity index 95% rename from src/main/java/emu/grasscutter/data/custom/AbilityModifier.java rename to src/main/java/emu/grasscutter/data/binout/AbilityModifier.java index 5a1394c65..38e82db01 100644 --- a/src/main/java/emu/grasscutter/data/custom/AbilityModifier.java +++ b/src/main/java/emu/grasscutter/data/binout/AbilityModifier.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.custom; +package emu.grasscutter.data.binout; import java.util.Map; diff --git a/src/main/java/emu/grasscutter/data/custom/AbilityModifierEntry.java b/src/main/java/emu/grasscutter/data/binout/AbilityModifierEntry.java similarity index 88% rename from src/main/java/emu/grasscutter/data/custom/AbilityModifierEntry.java rename to src/main/java/emu/grasscutter/data/binout/AbilityModifierEntry.java index b31e0eefe..348c0f2c4 100644 --- a/src/main/java/emu/grasscutter/data/custom/AbilityModifierEntry.java +++ b/src/main/java/emu/grasscutter/data/binout/AbilityModifierEntry.java @@ -1,9 +1,9 @@ -package emu.grasscutter.data.custom; +package emu.grasscutter.data.binout; import java.util.ArrayList; import java.util.List; -import emu.grasscutter.data.custom.AbilityModifier.AbilityModifierAction; +import emu.grasscutter.data.binout.AbilityModifier.AbilityModifierAction; public class AbilityModifierEntry { private String name; // Custom value diff --git a/src/main/java/emu/grasscutter/data/custom/MainQuestData.java b/src/main/java/emu/grasscutter/data/binout/MainQuestData.java similarity index 96% rename from src/main/java/emu/grasscutter/data/custom/MainQuestData.java rename to src/main/java/emu/grasscutter/data/binout/MainQuestData.java index e405e3598..96075bd61 100644 --- a/src/main/java/emu/grasscutter/data/custom/MainQuestData.java +++ b/src/main/java/emu/grasscutter/data/binout/MainQuestData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.custom; +package emu.grasscutter.data.binout; import emu.grasscutter.game.quest.enums.LogicType; import emu.grasscutter.game.quest.enums.QuestTrigger; diff --git a/src/main/java/emu/grasscutter/data/custom/OpenConfigEntry.java b/src/main/java/emu/grasscutter/data/binout/OpenConfigEntry.java similarity index 97% rename from src/main/java/emu/grasscutter/data/custom/OpenConfigEntry.java rename to src/main/java/emu/grasscutter/data/binout/OpenConfigEntry.java index 8ff646fa9..01d9c9833 100644 --- a/src/main/java/emu/grasscutter/data/custom/OpenConfigEntry.java +++ b/src/main/java/emu/grasscutter/data/binout/OpenConfigEntry.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.custom; +package emu.grasscutter.data.binout; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/emu/grasscutter/data/custom/ScenePointEntry.java b/src/main/java/emu/grasscutter/data/binout/ScenePointEntry.java similarity index 86% rename from src/main/java/emu/grasscutter/data/custom/ScenePointEntry.java rename to src/main/java/emu/grasscutter/data/binout/ScenePointEntry.java index 3e904f5c8..603701246 100644 --- a/src/main/java/emu/grasscutter/data/custom/ScenePointEntry.java +++ b/src/main/java/emu/grasscutter/data/binout/ScenePointEntry.java @@ -1,21 +1,21 @@ -package emu.grasscutter.data.custom; - -import emu.grasscutter.data.common.PointData; - -public class ScenePointEntry { - private String name; - private PointData pointData; - - public ScenePointEntry(String name, PointData pointData) { - this.name = name; - this.pointData = pointData; - } - - public String getName() { - return name; - } - - public PointData getPointData() { - return pointData; - } -} +package emu.grasscutter.data.binout; + +import emu.grasscutter.data.common.PointData; + +public class ScenePointEntry { + private String name; + private PointData pointData; + + public ScenePointEntry(String name, PointData pointData) { + this.name = name; + this.pointData = pointData; + } + + public String getName() { + return name; + } + + public PointData getPointData() { + return pointData; + } +} diff --git a/src/main/java/emu/grasscutter/data/common/CurveInfo.java b/src/main/java/emu/grasscutter/data/common/CurveInfo.java index 00c3de3f8..bd53b9a42 100644 --- a/src/main/java/emu/grasscutter/data/common/CurveInfo.java +++ b/src/main/java/emu/grasscutter/data/common/CurveInfo.java @@ -1,17 +1,17 @@ package emu.grasscutter.data.common; public class CurveInfo { - private String Type; - private String Arith; - private float Value; + private String type; + private String arith; + private float value; public String getType() { - return Type; + return type; } public String getArith() { - return Arith; + return arith; } public float getValue() { - return Value; + return value; } } diff --git a/src/main/java/emu/grasscutter/data/common/FightPropData.java b/src/main/java/emu/grasscutter/data/common/FightPropData.java index aee15a6c5..aed67227b 100644 --- a/src/main/java/emu/grasscutter/data/common/FightPropData.java +++ b/src/main/java/emu/grasscutter/data/common/FightPropData.java @@ -3,16 +3,16 @@ package emu.grasscutter.data.common; import emu.grasscutter.game.props.FightProperty; public class FightPropData { - private String PropType; + private String propType; private FightProperty prop; - private float Value; + private float value; public String getPropType() { - return PropType; + return propType; } public float getValue() { - return Value; + return value; } public FightProperty getProp() { @@ -20,6 +20,6 @@ public class FightPropData { } public void onLoad() { - this.prop = FightProperty.getPropByName(PropType); + this.prop = FightProperty.getPropByName(propType); } } \ No newline at end of file diff --git a/src/main/java/emu/grasscutter/data/common/ItemParamData.java b/src/main/java/emu/grasscutter/data/common/ItemParamData.java index db740e1e8..130640654 100644 --- a/src/main/java/emu/grasscutter/data/common/ItemParamData.java +++ b/src/main/java/emu/grasscutter/data/common/ItemParamData.java @@ -3,31 +3,31 @@ package emu.grasscutter.data.common; import com.google.gson.annotations.SerializedName; public class ItemParamData { - @SerializedName(value="Id", alternate={"ItemId"}) - private int Id; + @SerializedName(value="Id", alternate={"itemId"}) + private int id; - @SerializedName(value="Count", alternate={"ItemCount"}) - private int Count; + @SerializedName(value="Count", alternate={"itemCount"}) + private int count; public ItemParamData() {} public ItemParamData(int id, int count) { - this.Id = id; - this.Count = count; + this.id = id; + this.count = count; } public int getId() { - return Id; + return id; } public int getItemId() { - return Id; + return id; } public int getCount() { - return Count; + return count; } public int getItemCount() { - return Count; + return count; } } diff --git a/src/main/java/emu/grasscutter/data/common/ItemParamStringData.java b/src/main/java/emu/grasscutter/data/common/ItemParamStringData.java index 5fad12511..573065925 100644 --- a/src/main/java/emu/grasscutter/data/common/ItemParamStringData.java +++ b/src/main/java/emu/grasscutter/data/common/ItemParamStringData.java @@ -1,26 +1,26 @@ package emu.grasscutter.data.common; public class ItemParamStringData { - private int Id; - private String Count; + private int id; + private String count; public ItemParamStringData() {} public int getId() { - return Id; + return id; } public String getCount() { - return Count; + return count; } public ItemParamData toItemParamData() { - if (Count.contains(";")) { - String[] split = Count.split(";"); - Count = Count.split(";")[split.length - 1]; - } else if (Count.contains(".")) { - return new ItemParamData(Id, (int) Math.ceil(Double.parseDouble(Count))); + if (count.contains(";")) { + String[] split = count.split(";"); + count = count.split(";")[split.length - 1]; + } else if (count.contains(".")) { + return new ItemParamData(id, (int) Math.ceil(Double.parseDouble(count))); } - return new ItemParamData(Id, Integer.parseInt(Count)); + return new ItemParamData(id, Integer.parseInt(count)); } } diff --git a/src/main/java/emu/grasscutter/data/common/OpenCondData.java b/src/main/java/emu/grasscutter/data/common/OpenCondData.java index 9e7b62b11..112bed1ac 100644 --- a/src/main/java/emu/grasscutter/data/common/OpenCondData.java +++ b/src/main/java/emu/grasscutter/data/common/OpenCondData.java @@ -3,22 +3,22 @@ package emu.grasscutter.data.common; import java.util.List; public class OpenCondData { - private String CondType; - private List ParamList; + private String condType; + private List paramList; public String getCondType() { - return CondType; + return condType; } public void setCondType(String condType) { - CondType = condType; + condType = condType; } public List getParamList() { - return ParamList; + return paramList; } public void setParamList(List paramList) { - ParamList = paramList; + paramList = paramList; } } diff --git a/src/main/java/emu/grasscutter/data/common/PointData.java b/src/main/java/emu/grasscutter/data/common/PointData.java index 492f1fc60..df3f2ab0a 100644 --- a/src/main/java/emu/grasscutter/data/common/PointData.java +++ b/src/main/java/emu/grasscutter/data/common/PointData.java @@ -2,7 +2,7 @@ package emu.grasscutter.data.common; import emu.grasscutter.Grasscutter; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.DailyDungeonData; +import emu.grasscutter.data.excels.DailyDungeonData; import emu.grasscutter.utils.Position; import it.unimi.dsi.fastutil.ints.IntArrayList; import it.unimi.dsi.fastutil.ints.IntList; diff --git a/src/main/java/emu/grasscutter/data/common/PropGrowCurve.java b/src/main/java/emu/grasscutter/data/common/PropGrowCurve.java index b8f11233c..ac8cac5f0 100644 --- a/src/main/java/emu/grasscutter/data/common/PropGrowCurve.java +++ b/src/main/java/emu/grasscutter/data/common/PropGrowCurve.java @@ -1,13 +1,15 @@ package emu.grasscutter.data.common; public class PropGrowCurve { - private String Type; - private String GrowCurve; + private String type; + private String growCurve; public String getType(){ - return this.Type; + return this.type; } + public String getGrowCurve(){ - return this.GrowCurve; + return this.growCurve; } + } diff --git a/src/main/java/emu/grasscutter/data/def/AvatarSkillData.java b/src/main/java/emu/grasscutter/data/def/AvatarSkillData.java deleted file mode 100644 index 3efc2a142..000000000 --- a/src/main/java/emu/grasscutter/data/def/AvatarSkillData.java +++ /dev/null @@ -1,84 +0,0 @@ -package emu.grasscutter.data.def; - -import java.util.List; - -import emu.grasscutter.data.GameResource; -import emu.grasscutter.data.ResourceType; -import emu.grasscutter.data.ResourceType.LoadPriority; - -@ResourceType(name = "AvatarSkillExcelConfigData.json", loadPriority = LoadPriority.HIGHEST) -public class AvatarSkillData extends GameResource { - private int Id; - private float CdTime; - private int CostElemVal; - private int MaxChargeNum; - private int TriggerID; - private boolean IsAttackCameraLock; - private int ProudSkillGroupId; - private String CostElemType; - private List LockWeightParams; - - private long NameTextMapHash; - - private String AbilityName; - private String LockShape; - private String GlobalValueKey; - - @Override - public int getId(){ - return this.Id; - } - - public float getCdTime() { - return CdTime; - } - - public int getCostElemVal() { - return CostElemVal; - } - - public int getMaxChargeNum() { - return MaxChargeNum; - } - - public int getTriggerID() { - return TriggerID; - } - - public boolean isIsAttackCameraLock() { - return IsAttackCameraLock; - } - - public int getProudSkillGroupId() { - return ProudSkillGroupId; - } - - public String getCostElemType() { - return CostElemType; - } - - public List getLockWeightParams() { - return LockWeightParams; - } - - public long getNameTextMapHash() { - return NameTextMapHash; - } - - public String getAbilityName() { - return AbilityName; - } - - public String getLockShape() { - return LockShape; - } - - public String getGlobalValueKey() { - return GlobalValueKey; - } - - @Override - public void onLoad() { - - } -} diff --git a/src/main/java/emu/grasscutter/data/def/CombineData.java b/src/main/java/emu/grasscutter/data/def/CombineData.java deleted file mode 100644 index bfcf6af68..000000000 --- a/src/main/java/emu/grasscutter/data/def/CombineData.java +++ /dev/null @@ -1,173 +0,0 @@ -package emu.grasscutter.data.def; - -import emu.grasscutter.data.GameResource; -import emu.grasscutter.data.ResourceType; - -import java.util.List; -import java.util.stream.Collectors; - -@ResourceType(name = "CombineExcelConfigData.json") -public class CombineData extends GameResource { - - private int CombineId; - - private int PlayerLevel; - - private boolean IsDefaultShow; - - private int CombineType; - - private int SubCombineType; - - private int ResultItemId; - - private int ResultItemCount; - - private int ScoinCost; - - private List RandomItems; - - private List MaterialItems; - - private long EffectDescTextMapHash; - - private String RecipeType; - - @Override - public int getId() { - return this.CombineId; - } - - @Override - public void onLoad() { - super.onLoad(); - // clean data - RandomItems = RandomItems.stream().filter(item -> item.Id > 0).collect(Collectors.toList()); - MaterialItems = MaterialItems.stream().filter(item -> item.Id > 0).collect(Collectors.toList()); - } - - public static class CombineItemPair { - - private int Id; - - private int Count; - - public CombineItemPair(int id, int count) { - Id = id; - Count = count; - } - - public int getId() { - return Id; - } - - public void setId(int id) { - Id = id; - } - - public int getCount() { - return Count; - } - - public void setCount(int count) { - Count = count; - } - } - - public int getCombineId() { - return CombineId; - } - - public void setCombineId(int combineId) { - CombineId = combineId; - } - - public int getPlayerLevel() { - return PlayerLevel; - } - - public void setPlayerLevel(int playerLevel) { - PlayerLevel = playerLevel; - } - - public boolean isDefaultShow() { - return IsDefaultShow; - } - - public void setDefaultShow(boolean defaultShow) { - IsDefaultShow = defaultShow; - } - - public int getCombineType() { - return CombineType; - } - - public void setCombineType(int combineType) { - CombineType = combineType; - } - - public int getSubCombineType() { - return SubCombineType; - } - - public void setSubCombineType(int subCombineType) { - SubCombineType = subCombineType; - } - - public int getResultItemId() { - return ResultItemId; - } - - public void setResultItemId(int resultItemId) { - ResultItemId = resultItemId; - } - - public int getResultItemCount() { - return ResultItemCount; - } - - public void setResultItemCount(int resultItemCount) { - ResultItemCount = resultItemCount; - } - - public int getScoinCost() { - return ScoinCost; - } - - public void setScoinCost(int scoinCost) { - ScoinCost = scoinCost; - } - - public List getRandomItems() { - return RandomItems; - } - - public void setRandomItems(List randomItems) { - RandomItems = randomItems; - } - - public List getMaterialItems() { - return MaterialItems; - } - - public void setMaterialItems(List materialItems) { - MaterialItems = materialItems; - } - - public long getEffectDescTextMapHash() { - return EffectDescTextMapHash; - } - - public void setEffectDescTextMapHash(long effectDescTextMapHash) { - EffectDescTextMapHash = effectDescTextMapHash; - } - - public String getRecipeType() { - return RecipeType; - } - - public void setRecipeType(String recipeType) { - RecipeType = recipeType; - } -} - diff --git a/src/main/java/emu/grasscutter/data/def/TowerFloorData.java b/src/main/java/emu/grasscutter/data/def/TowerFloorData.java deleted file mode 100644 index d9d0082c7..000000000 --- a/src/main/java/emu/grasscutter/data/def/TowerFloorData.java +++ /dev/null @@ -1,73 +0,0 @@ -package emu.grasscutter.data.def; - -import emu.grasscutter.data.GameResource; -import emu.grasscutter.data.ResourceType; - -@ResourceType(name = "TowerFloorExcelConfigData.json") -public class TowerFloorData extends GameResource { - - private int FloorId; - private int FloorIndex; - private int LevelId; - private int OverrideMonsterLevel; - private int TeamNum; - private int FloorLevelConfigId; - - @Override - public int getId() { - return this.FloorId; - } - - @Override - public void onLoad() { - super.onLoad(); - } - - public int getFloorId() { - return FloorId; - } - - public void setFloorId(int floorId) { - FloorId = floorId; - } - - public int getFloorIndex() { - return FloorIndex; - } - - public void setFloorIndex(int floorIndex) { - FloorIndex = floorIndex; - } - - public int getLevelId() { - return LevelId; - } - - public void setLevelId(int levelId) { - LevelId = levelId; - } - - public int getOverrideMonsterLevel() { - return OverrideMonsterLevel; - } - - public void setOverrideMonsterLevel(int overrideMonsterLevel) { - OverrideMonsterLevel = overrideMonsterLevel; - } - - public int getTeamNum() { - return TeamNum; - } - - public void setTeamNum(int teamNum) { - TeamNum = teamNum; - } - - public int getFloorLevelConfigId() { - return FloorLevelConfigId; - } - - public void setFloorLevelConfigId(int floorLevelConfigId) { - FloorLevelConfigId = floorLevelConfigId; - } -} diff --git a/src/main/java/emu/grasscutter/data/def/TowerLevelData.java b/src/main/java/emu/grasscutter/data/def/TowerLevelData.java deleted file mode 100644 index 6cc45cc06..000000000 --- a/src/main/java/emu/grasscutter/data/def/TowerLevelData.java +++ /dev/null @@ -1,55 +0,0 @@ -package emu.grasscutter.data.def; - -import emu.grasscutter.data.GameResource; -import emu.grasscutter.data.ResourceType; - -@ResourceType(name = "TowerLevelExcelConfigData.json") -public class TowerLevelData extends GameResource { - - private int ID; - private int LevelId; - private int LevelIndex; - private int DungeonId; - - @Override - public int getId() { - return this.ID; - } - - @Override - public void onLoad() { - super.onLoad(); - } - - public int getID() { - return ID; - } - - public void setID(int ID) { - this.ID = ID; - } - - public int getLevelId() { - return LevelId; - } - - public void setLevelId(int levelId) { - LevelId = levelId; - } - - public int getLevelIndex() { - return LevelIndex; - } - - public void setLevelIndex(int levelIndex) { - LevelIndex = levelIndex; - } - - public int getDungeonId() { - return DungeonId; - } - - public void setDungeonId(int dungeonId) { - DungeonId = dungeonId; - } -} diff --git a/src/main/java/emu/grasscutter/data/def/TowerScheduleData.java b/src/main/java/emu/grasscutter/data/def/TowerScheduleData.java deleted file mode 100644 index 017776c06..000000000 --- a/src/main/java/emu/grasscutter/data/def/TowerScheduleData.java +++ /dev/null @@ -1,70 +0,0 @@ -package emu.grasscutter.data.def; - -import emu.grasscutter.data.GameResource; -import emu.grasscutter.data.ResourceType; - -import java.util.List; - -@ResourceType(name = "TowerScheduleExcelConfigData.json") -public class TowerScheduleData extends GameResource { - private int ScheduleId; - private List EntranceFloorId; - private List Schedules; - private int MonthlyLevelConfigId; - @Override - public int getId() { - return ScheduleId; - } - - @Override - public void onLoad() { - super.onLoad(); - this.Schedules = this.Schedules.stream() - .filter(item -> item.getFloorList().size() > 0) - .toList(); - } - - public int getScheduleId() { - return ScheduleId; - } - - public void setScheduleId(int scheduleId) { - ScheduleId = scheduleId; - } - - public List getEntranceFloorId() { - return EntranceFloorId; - } - - public void setEntranceFloorId(List entranceFloorId) { - EntranceFloorId = entranceFloorId; - } - - public List getSchedules() { - return Schedules; - } - - public void setSchedules(List schedules) { - Schedules = schedules; - } - - public int getMonthlyLevelConfigId() { - return MonthlyLevelConfigId; - } - - public void setMonthlyLevelConfigId(int monthlyLevelConfigId) { - MonthlyLevelConfigId = monthlyLevelConfigId; - } - - public static class ScheduleDetail{ - private List FloorList; - - public List getFloorList() { - return FloorList; - } - - public void setFloorList(List floorList) { - FloorList = floorList; - } - } -} diff --git a/src/main/java/emu/grasscutter/data/def/AvatarCostumeData.java b/src/main/java/emu/grasscutter/data/excels/AvatarCostumeData.java similarity index 72% rename from src/main/java/emu/grasscutter/data/def/AvatarCostumeData.java rename to src/main/java/emu/grasscutter/data/excels/AvatarCostumeData.java index c6166bd71..342a30652 100644 --- a/src/main/java/emu/grasscutter/data/def/AvatarCostumeData.java +++ b/src/main/java/emu/grasscutter/data/excels/AvatarCostumeData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameData; import emu.grasscutter.data.GameResource; @@ -6,21 +6,21 @@ import emu.grasscutter.data.ResourceType; @ResourceType(name = "AvatarCostumeExcelConfigData.json") public class AvatarCostumeData extends GameResource { - private int CostumeId; - private int ItemId; - private int AvatarId; + private int costumeId; + private int itemId; + private int avatarId; @Override public int getId() { - return this.CostumeId; + return this.costumeId; } public int getItemId() { - return this.ItemId; + return this.itemId; } public int getAvatarId() { - return AvatarId; + return avatarId; } @Override diff --git a/src/main/java/emu/grasscutter/data/def/AvatarCurveData.java b/src/main/java/emu/grasscutter/data/excels/AvatarCurveData.java similarity index 59% rename from src/main/java/emu/grasscutter/data/def/AvatarCurveData.java rename to src/main/java/emu/grasscutter/data/excels/AvatarCurveData.java index 586c0517d..9fb219da4 100644 --- a/src/main/java/emu/grasscutter/data/def/AvatarCurveData.java +++ b/src/main/java/emu/grasscutter/data/excels/AvatarCurveData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import java.util.HashMap; import java.util.Map; @@ -10,27 +10,27 @@ import emu.grasscutter.data.common.CurveInfo; @ResourceType(name = "AvatarCurveExcelConfigData.json") public class AvatarCurveData extends GameResource { - private int Level; - private CurveInfo[] CurveInfos; + private int level; + private CurveInfo[] curveInfos; - private Map curveInfos; + private Map curveInfoMap; @Override public int getId() { - return this.Level; + return this.level; } public int getLevel() { - return Level; + return level; } public Map getCurveInfos() { - return curveInfos; + return curveInfoMap; } @Override public void onLoad() { - this.curveInfos = new HashMap<>(); - Stream.of(this.CurveInfos).forEach(info -> this.curveInfos.put(info.getType(), info.getValue())); + this.curveInfoMap = new HashMap<>(); + Stream.of(this.curveInfos).forEach(info -> this.curveInfoMap.put(info.getType(), info.getValue())); } } diff --git a/src/main/java/emu/grasscutter/data/def/AvatarData.java b/src/main/java/emu/grasscutter/data/excels/AvatarData.java similarity index 66% rename from src/main/java/emu/grasscutter/data/def/AvatarData.java rename to src/main/java/emu/grasscutter/data/excels/AvatarData.java index 27555fc0d..b4d5f384e 100644 --- a/src/main/java/emu/grasscutter/data/def/AvatarData.java +++ b/src/main/java/emu/grasscutter/data/excels/AvatarData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import java.util.List; @@ -6,8 +6,8 @@ import emu.grasscutter.data.GameData; import emu.grasscutter.data.GameResource; import emu.grasscutter.data.ResourceType; import emu.grasscutter.data.ResourceType.LoadPriority; +import emu.grasscutter.data.binout.AbilityEmbryoEntry; import emu.grasscutter.data.common.PropGrowCurve; -import emu.grasscutter.data.custom.AbilityEmbryoEntry; import emu.grasscutter.game.props.FightProperty; import emu.grasscutter.utils.Utils; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; @@ -17,38 +17,36 @@ import it.unimi.dsi.fastutil.ints.IntList; @ResourceType(name = "AvatarExcelConfigData.json", loadPriority = LoadPriority.LOW) public class AvatarData extends GameResource { - private String name; - private String IconName; - private String BodyType; - private String QualityType; - private int ChargeEfficiency; - private int InitialWeapon; - private String WeaponType; - private String ImageName; - private int AvatarPromoteId; - private String CutsceneShow; - private int SkillDepotId; - private int StaminaRecoverSpeed; - private List CandSkillDepotIds; - private long DescTextMapHash; - private String AvatarIdentityType; - private List AvatarPromoteRewardLevelList; - private List AvatarPromoteRewardIdList; - private int FeatureTagGroupID; - - private long NameTextMapHash; - private long GachaImageNameHashSuffix; - private long InfoDescTextMapHash; - - private float HpBase; - private float AttackBase; - private float DefenseBase; - private float Critical; - private float CriticalHurt; + private String iconName; + private String bodyType; + private String qualityType; + private int chargeEfficiency; + private int initialWeapon; + private String weaponType; + private String imageName; + private int avatarPromoteId; + private String cutsceneShow; + private int skillDepotId; + private int staminaRecoverSpeed; + private List candSkillDepotIds; + private String avatarIdentityType; + private List avatarPromoteRewardLevelList; + private List avatarPromoteRewardIdList; - private List PropGrowCurves; - private int Id; + private long nameTextMapHash; + private float hpBase; + private float attackBase; + private float defenseBase; + private float critical; + private float criticalHurt; + + private List propGrowCurves; + private int id; + + // Transient + private String name; + private Int2ObjectMap growthCurveMap; private float[] hpGrowthCurve; private float[] attackGrowthCurve; @@ -58,11 +56,11 @@ public class AvatarData extends GameResource { private List fetters; private int nameCardRewardId; - private int nameCardId; + private int nameCardId; @Override public int getId(){ - return this.Id; + return this.id; } public String getName() { @@ -70,107 +68,91 @@ public class AvatarData extends GameResource { } public String getBodyType(){ - return this.BodyType; + return this.bodyType; } public String getQualityType(){ - return this.QualityType; + return this.qualityType; } public int getChargeEfficiency(){ - return this.ChargeEfficiency; + return this.chargeEfficiency; } public int getInitialWeapon(){ - return this.InitialWeapon; + return this.initialWeapon; } public String getWeaponType(){ - return this.WeaponType; + return this.weaponType; } public String getImageName(){ - return this.ImageName; + return this.imageName; } public int getAvatarPromoteId(){ - return this.AvatarPromoteId; - } - - public long getGachaImageNameHashSuffix(){ - return this.GachaImageNameHashSuffix; + return this.avatarPromoteId; } public String getCutsceneShow(){ - return this.CutsceneShow; + return this.cutsceneShow; } public int getSkillDepotId(){ - return this.SkillDepotId; + return this.skillDepotId; } public int getStaminaRecoverSpeed(){ - return this.StaminaRecoverSpeed; + return this.staminaRecoverSpeed; } public List getCandSkillDepotIds(){ - return this.CandSkillDepotIds; + return this.candSkillDepotIds; } - - public long getDescTextMapHash(){ - return this.DescTextMapHash; - } - + public String getAvatarIdentityType(){ - return this.AvatarIdentityType; + return this.avatarIdentityType; } public List getAvatarPromoteRewardLevelList(){ - return this.AvatarPromoteRewardLevelList; + return this.avatarPromoteRewardLevelList; } public List getAvatarPromoteRewardIdList(){ - return this.AvatarPromoteRewardIdList; + return this.avatarPromoteRewardIdList; } - public int getFeatureTagGroupID(){ - return this.FeatureTagGroupID; - } - - public long getInfoDescTextMapHash(){ - return this.InfoDescTextMapHash; - } - public float getBaseHp(int level){ try { - return this.HpBase * this.hpGrowthCurve[level - 1]; + return this.hpBase * this.hpGrowthCurve[level - 1]; } catch (Exception e) { - return this.HpBase; + return this.hpBase; } } public float getBaseAttack(int level){ try { - return this.AttackBase * this.attackGrowthCurve[level - 1]; + return this.attackBase * this.attackGrowthCurve[level - 1]; } catch (Exception e) { - return this.AttackBase; + return this.attackBase; } } public float getBaseDefense(int level){ try { - return this.DefenseBase * this.defenseGrowthCurve[level - 1]; + return this.defenseBase * this.defenseGrowthCurve[level - 1]; } catch (Exception e) { - return this.DefenseBase; + return this.defenseBase; } } public float getBaseCritical(){ - return this.Critical; + return this.critical; } public float getBaseCriticalHurt(){ - return this.CriticalHurt; + return this.criticalHurt; } public float getGrowthCurveById(int level, FightProperty prop) { @@ -186,7 +168,7 @@ public class AvatarData extends GameResource { } public long getNameTextMapHash(){ - return this.NameTextMapHash; + return this.nameTextMapHash; } public AvatarSkillDepotData getSkillDepot() { @@ -211,13 +193,13 @@ public class AvatarData extends GameResource { @Override public void onLoad() { - this.skillDepot = GameData.getAvatarSkillDepotDataMap().get(this.SkillDepotId); + this.skillDepot = GameData.getAvatarSkillDepotDataMap().get(this.skillDepotId); // Get fetters from GameData - this.fetters = GameData.getFetterDataEntries().get(this.Id); + this.fetters = GameData.getFetterDataEntries().get(this.id); - if (GameData.getFetterCharacterCardDataMap().get(this.Id) != null) { - this.nameCardRewardId = GameData.getFetterCharacterCardDataMap().get(this.Id).getRewardId(); + if (GameData.getFetterCharacterCardDataMap().get(this.id) != null) { + this.nameCardRewardId = GameData.getFetterCharacterCardDataMap().get(this.id).getRewardId(); } if (GameData.getRewardDataMap().get(this.nameCardRewardId) != null) { @@ -230,7 +212,7 @@ public class AvatarData extends GameResource { this.defenseGrowthCurve = new float[size]; for (AvatarCurveData curveData : GameData.getAvatarCurveDataMap().values()) { int level = curveData.getLevel() - 1; - for (PropGrowCurve growCurve : this.PropGrowCurves) { + for (PropGrowCurve growCurve : this.propGrowCurves) { FightProperty prop = FightProperty.getPropByName(growCurve.getType()); switch (prop) { case FIGHT_PROP_BASE_HP: @@ -256,7 +238,7 @@ public class AvatarData extends GameResource { */ // Cache abilities - String[] split = this.IconName.split("_"); + String[] split = this.iconName.split("_"); if (split.length > 0) { this.name = split[split.length - 1]; diff --git a/src/main/java/emu/grasscutter/data/def/AvatarFetterLevelData.java b/src/main/java/emu/grasscutter/data/excels/AvatarFetterLevelData.java similarity index 63% rename from src/main/java/emu/grasscutter/data/def/AvatarFetterLevelData.java rename to src/main/java/emu/grasscutter/data/excels/AvatarFetterLevelData.java index a02915069..efc44147a 100644 --- a/src/main/java/emu/grasscutter/data/def/AvatarFetterLevelData.java +++ b/src/main/java/emu/grasscutter/data/excels/AvatarFetterLevelData.java @@ -1,23 +1,23 @@ -package emu.grasscutter.data.def; - -import emu.grasscutter.data.GameResource; -import emu.grasscutter.data.ResourceType; - -@ResourceType(name = "AvatarFettersLevelExcelConfigData.json") -public class AvatarFetterLevelData extends GameResource { - private int FetterLevel; - private int NeedExp; - - @Override - public int getId() { - return this.FetterLevel; - } - - public int getLevel() { - return FetterLevel; - } - - public int getExp() { - return NeedExp; - } -} +package emu.grasscutter.data.excels; + +import emu.grasscutter.data.GameResource; +import emu.grasscutter.data.ResourceType; + +@ResourceType(name = "AvatarFettersLevelExcelConfigData.json") +public class AvatarFetterLevelData extends GameResource { + private int fetterLevel; + private int needExp; + + @Override + public int getId() { + return this.fetterLevel; + } + + public int getLevel() { + return fetterLevel; + } + + public int getExp() { + return needExp; + } +} diff --git a/src/main/java/emu/grasscutter/data/def/AvatarFlycloakData.java b/src/main/java/emu/grasscutter/data/excels/AvatarFlycloakData.java similarity index 68% rename from src/main/java/emu/grasscutter/data/def/AvatarFlycloakData.java rename to src/main/java/emu/grasscutter/data/excels/AvatarFlycloakData.java index 100a6c87c..ab8106eab 100644 --- a/src/main/java/emu/grasscutter/data/def/AvatarFlycloakData.java +++ b/src/main/java/emu/grasscutter/data/excels/AvatarFlycloakData.java @@ -1,20 +1,20 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameResource; import emu.grasscutter.data.ResourceType; @ResourceType(name = "AvatarFlycloakExcelConfigData.json") public class AvatarFlycloakData extends GameResource { - private int FlycloakId; - private long NameTextMapHash; + private int flycloakId; + private long nameTextMapHash; @Override public int getId() { - return this.FlycloakId; + return this.flycloakId; } public long getNameTextMapHash() { - return NameTextMapHash; + return nameTextMapHash; } @Override diff --git a/src/main/java/emu/grasscutter/data/def/AvatarLevelData.java b/src/main/java/emu/grasscutter/data/excels/AvatarLevelData.java similarity index 69% rename from src/main/java/emu/grasscutter/data/def/AvatarLevelData.java rename to src/main/java/emu/grasscutter/data/excels/AvatarLevelData.java index bc6ca671c..3b37c3886 100644 --- a/src/main/java/emu/grasscutter/data/def/AvatarLevelData.java +++ b/src/main/java/emu/grasscutter/data/excels/AvatarLevelData.java @@ -1,23 +1,23 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameResource; import emu.grasscutter.data.ResourceType; @ResourceType(name = "AvatarLevelExcelConfigData.json") public class AvatarLevelData extends GameResource { - private int Level; - private int Exp; + private int level; + private int exp; @Override public int getId() { - return this.Level; + return this.level; } public int getLevel() { - return Level; + return level; } public int getExp() { - return Exp; + return exp; } } diff --git a/src/main/java/emu/grasscutter/data/def/AvatarPromoteData.java b/src/main/java/emu/grasscutter/data/excels/AvatarPromoteData.java similarity index 66% rename from src/main/java/emu/grasscutter/data/def/AvatarPromoteData.java rename to src/main/java/emu/grasscutter/data/excels/AvatarPromoteData.java index c397902e4..226105aac 100644 --- a/src/main/java/emu/grasscutter/data/def/AvatarPromoteData.java +++ b/src/main/java/emu/grasscutter/data/excels/AvatarPromoteData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import java.util.ArrayList; import emu.grasscutter.data.GameResource; @@ -9,45 +9,45 @@ import emu.grasscutter.data.common.ItemParamData; @ResourceType(name = "AvatarPromoteExcelConfigData.json") public class AvatarPromoteData extends GameResource { - private int AvatarPromoteId; - private int PromoteLevel; - private int ScoinCost; - private ItemParamData[] CostItems; - private int UnlockMaxLevel; - private FightPropData[] AddProps; - private int RequiredPlayerLevel; + private int avatarPromoteId; + private int promoteLevel; + private int scoinCost; + private ItemParamData[] costItems; + private int unlockMaxLevel; + private FightPropData[] addProps; + private int requiredPlayerLevel; @Override public int getId() { - return (AvatarPromoteId << 8) + PromoteLevel; + return (avatarPromoteId << 8) + promoteLevel; } public int getAvatarPromoteId() { - return AvatarPromoteId; + return avatarPromoteId; } public int getPromoteLevel() { - return PromoteLevel; + return promoteLevel; } public ItemParamData[] getCostItems() { - return CostItems; + return costItems; } public int getCoinCost() { - return ScoinCost; + return scoinCost; } public FightPropData[] getAddProps() { - return AddProps; + return addProps; } public int getUnlockMaxLevel() { - return UnlockMaxLevel; + return unlockMaxLevel; } public int getRequiredPlayerLevel() { - return RequiredPlayerLevel; + return requiredPlayerLevel; } @Override @@ -60,7 +60,7 @@ public class AvatarPromoteData extends GameResource { } trim.add(itemParam); } - this.CostItems = trim.toArray(new ItemParamData[trim.size()]); + this.costItems = trim.toArray(new ItemParamData[trim.size()]); // Trim fight prop data (just in case) ArrayList parsed = new ArrayList<>(getAddProps().length); for (FightPropData prop : getAddProps()) { @@ -69,6 +69,6 @@ public class AvatarPromoteData extends GameResource { parsed.add(prop); } } - this.AddProps = parsed.toArray(new FightPropData[parsed.size()]); + this.addProps = parsed.toArray(new FightPropData[parsed.size()]); } } diff --git a/src/main/java/emu/grasscutter/data/excels/AvatarSkillData.java b/src/main/java/emu/grasscutter/data/excels/AvatarSkillData.java new file mode 100644 index 000000000..76c56ef2e --- /dev/null +++ b/src/main/java/emu/grasscutter/data/excels/AvatarSkillData.java @@ -0,0 +1,85 @@ +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.game.props.ElementType; + +@ResourceType(name = "AvatarSkillExcelConfigData.json", loadPriority = LoadPriority.HIGHEST) +public class AvatarSkillData extends GameResource { + private int id; + private float cdTime; + private int costElemVal; + private int maxChargeNum; + private int triggerID; + private boolean isAttackCameraLock; + private int proudSkillGroupId; + private ElementType costElemType; + private List lockWeightParams; + + private long nameTextMapHash; + + private String abilityName; + private String lockShape; + private String globalValueKey; + + @Override + public int getId(){ + return this.id; + } + + public float getCdTime() { + return cdTime; + } + + public int getCostElemVal() { + return costElemVal; + } + + public int getMaxChargeNum() { + return maxChargeNum; + } + + public int getTriggerID() { + return triggerID; + } + + public boolean isIsAttackCameraLock() { + return isAttackCameraLock; + } + + public int getProudSkillGroupId() { + return proudSkillGroupId; + } + + public ElementType getCostElemType() { + return costElemType; + } + + public List getLockWeightParams() { + return lockWeightParams; + } + + public long getNameTextMapHash() { + return nameTextMapHash; + } + + public String getAbilityName() { + return abilityName; + } + + public String getLockShape() { + return lockShape; + } + + public String getGlobalValueKey() { + return globalValueKey; + } + + @Override + public void onLoad() { + + } +} diff --git a/src/main/java/emu/grasscutter/data/def/AvatarSkillDepotData.java b/src/main/java/emu/grasscutter/data/excels/AvatarSkillDepotData.java similarity index 59% rename from src/main/java/emu/grasscutter/data/def/AvatarSkillDepotData.java rename to src/main/java/emu/grasscutter/data/excels/AvatarSkillDepotData.java index 7916bfd45..152ec31bd 100644 --- a/src/main/java/emu/grasscutter/data/def/AvatarSkillDepotData.java +++ b/src/main/java/emu/grasscutter/data/excels/AvatarSkillDepotData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import java.util.List; @@ -6,7 +6,7 @@ import emu.grasscutter.data.GameData; import emu.grasscutter.data.GameResource; import emu.grasscutter.data.ResourceType; import emu.grasscutter.data.ResourceType.LoadPriority; -import emu.grasscutter.data.custom.AbilityEmbryoEntry; +import emu.grasscutter.data.binout.AbilityEmbryoEntry; import emu.grasscutter.game.props.ElementType; import emu.grasscutter.utils.Utils; import it.unimi.dsi.fastutil.ints.IntArrayList; @@ -15,62 +15,63 @@ import it.unimi.dsi.fastutil.ints.IntList; @ResourceType(name = "AvatarSkillDepotExcelConfigData.json", loadPriority = LoadPriority.HIGH) public class AvatarSkillDepotData extends GameResource { - private int Id; - private int EnergySkill; - private int AttackModeSkill; + private int id; + private int energySkill; + private int attackModeSkill; - private List Skills; - private List SubSkills; - private List ExtraAbilities; - private List Talents; - private List InherentProudSkillOpens; + private List skills; + private List subSkills; + private List extraAbilities; + private List talents; + private List inherentProudSkillOpens; - private String TalentStarName; - private String SkillDepotAbilityGroup; + private String talentStarName; + private String skillDepotAbilityGroup; + // Transient private AvatarSkillData energySkillData; private ElementType elementType; private IntList abilities; @Override public int getId(){ - return this.Id; + return this.id; } public int getEnergySkill(){ - return this.EnergySkill; + return this.energySkill; } public List getSkills(){ - return this.Skills; + return this.skills; } public List getSubSkills(){ - return this.SubSkills; + return this.subSkills; } public int getAttackModeSkill(){ - return this.AttackModeSkill; + return this.attackModeSkill; } public List getExtraAbilities(){ - return this.ExtraAbilities; + return this.extraAbilities; } public List getTalents(){ - return this.Talents; + return this.talents; } public String getTalentStarName(){ - return this.TalentStarName; + return this.talentStarName; } public List getInherentProudSkillOpens(){ - return this.InherentProudSkillOpens; + return this.inherentProudSkillOpens; } public String getSkillDepotAbilityGroup(){ - return this.SkillDepotAbilityGroup; + return this.skillDepotAbilityGroup; } public AvatarSkillData getEnergySkillData() { @@ -94,30 +95,24 @@ public class AvatarSkillDepotData extends GameResource { @Override public void onLoad() { - this.energySkillData = GameData.getAvatarSkillDataMap().get(this.EnergySkill); + this.energySkillData = GameData.getAvatarSkillDataMap().get(this.energySkill); if (getEnergySkillData() != null) { - this.elementType = ElementType.getTypeByName(getEnergySkillData().getCostElemType()); + this.elementType = getEnergySkillData().getCostElemType(); } else { this.elementType = ElementType.None; } } public static class InherentProudSkillOpens { - private int ProudSkillGroupId; + private int proudSkillGroupId; + private int needAvatarPromoteLevel; - private int NeedAvatarPromoteLevel; - - public void setProudSkillGroupId(int ProudSkillGroupId){ - this.ProudSkillGroupId = ProudSkillGroupId; - } public int getProudSkillGroupId(){ - return this.ProudSkillGroupId; - } - public void setNeedAvatarPromoteLevel(int NeedAvatarPromoteLevel){ - this.NeedAvatarPromoteLevel = NeedAvatarPromoteLevel; + return this.proudSkillGroupId; } + public int getNeedAvatarPromoteLevel(){ - return this.NeedAvatarPromoteLevel; + return this.needAvatarPromoteLevel; } } } diff --git a/src/main/java/emu/grasscutter/data/def/AvatarTalentData.java b/src/main/java/emu/grasscutter/data/excels/AvatarTalentData.java similarity index 63% rename from src/main/java/emu/grasscutter/data/def/AvatarTalentData.java rename to src/main/java/emu/grasscutter/data/excels/AvatarTalentData.java index fdf96875d..f02d2e50a 100644 --- a/src/main/java/emu/grasscutter/data/def/AvatarTalentData.java +++ b/src/main/java/emu/grasscutter/data/excels/AvatarTalentData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import java.util.ArrayList; import emu.grasscutter.data.GameResource; @@ -8,51 +8,51 @@ import emu.grasscutter.data.common.FightPropData; @ResourceType(name = "AvatarTalentExcelConfigData.json", loadPriority = LoadPriority.HIGHEST) public class AvatarTalentData extends GameResource { - private int TalentId; - private int PrevTalent; - private long NameTextMapHash; - private String Icon; - private int MainCostItemId; - private int MainCostItemCount; - private String OpenConfig; - private FightPropData[] AddProps; - private float[] ParamList; + private int talentId; + private int prevTalent; + private long nameTextMapHash; + private String icon; + private int mainCostItemId; + private int mainCostItemCount; + private String openConfig; + private FightPropData[] addProps; + private float[] paramList; @Override public int getId(){ - return this.TalentId; + return this.talentId; } public int PrevTalent() { - return PrevTalent; + return prevTalent; } public long getNameTextMapHash() { - return NameTextMapHash; + return nameTextMapHash; } public String getIcon() { - return Icon; + return icon; } public int getMainCostItemId() { - return MainCostItemId; + return mainCostItemId; } public int getMainCostItemCount() { - return MainCostItemCount; + return mainCostItemCount; } public String getOpenConfig() { - return OpenConfig; + return openConfig; } public FightPropData[] getAddProps() { - return AddProps; + return addProps; } public float[] getParamList() { - return ParamList; + return paramList; } @Override @@ -64,6 +64,6 @@ public class AvatarTalentData extends GameResource { parsed.add(prop); } } - this.AddProps = parsed.toArray(new FightPropData[parsed.size()]); + this.addProps = parsed.toArray(new FightPropData[parsed.size()]); } } diff --git a/src/main/java/emu/grasscutter/data/def/CodexAnimalData.java b/src/main/java/emu/grasscutter/data/excels/CodexAnimalData.java similarity index 68% rename from src/main/java/emu/grasscutter/data/def/CodexAnimalData.java rename to src/main/java/emu/grasscutter/data/excels/CodexAnimalData.java index b50ac02d2..0bc9c0521 100644 --- a/src/main/java/emu/grasscutter/data/def/CodexAnimalData.java +++ b/src/main/java/emu/grasscutter/data/excels/CodexAnimalData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameResource; import emu.grasscutter.data.ResourceType; @@ -6,10 +6,10 @@ import emu.grasscutter.data.ResourceType; @ResourceType(name = {"AnimalCodexExcelConfigData.json"}) public class CodexAnimalData extends GameResource { private int Id; - private String Type; - private int DescribeId; - private int SortOrder; - private CodexAnimalUnlockCondition BAINKHIIMJE; + private String type; + private int describeId; + private int sortOrder; + private CodexAnimalUnlockCondition OCCLHPBCDGL; @Override public int getId() { @@ -17,19 +17,19 @@ public class CodexAnimalData extends GameResource { } public String getType() { - return Type; + return type; } public int getDescribeId() { - return DescribeId; + return describeId; } public int getSortOrder() { - return SortOrder; + return sortOrder; } public CodexAnimalUnlockCondition getUnlockCondition() { - return BAINKHIIMJE; + return OCCLHPBCDGL; } public enum CodexAnimalUnlockCondition { diff --git a/src/main/java/emu/grasscutter/data/def/CodexMaterialData.java b/src/main/java/emu/grasscutter/data/excels/CodexMaterialData.java similarity index 78% rename from src/main/java/emu/grasscutter/data/def/CodexMaterialData.java rename to src/main/java/emu/grasscutter/data/excels/CodexMaterialData.java index a533afd09..3ab32be5c 100644 --- a/src/main/java/emu/grasscutter/data/def/CodexMaterialData.java +++ b/src/main/java/emu/grasscutter/data/excels/CodexMaterialData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameData; import emu.grasscutter.data.GameResource; @@ -7,15 +7,15 @@ import emu.grasscutter.data.ResourceType; @ResourceType(name = {"MaterialCodexExcelConfigData.json"}) public class CodexMaterialData extends GameResource { private int Id; - private int MaterialId; - private int SortOrder; + private int materialId; + private int sortOrder; public int getSortOrder() { - return SortOrder; + return sortOrder; } public int getMaterialId() { - return MaterialId; + return materialId; } public int getId() { diff --git a/src/main/java/emu/grasscutter/data/def/CodexQuestData.java b/src/main/java/emu/grasscutter/data/excels/CodexQuestData.java similarity index 71% rename from src/main/java/emu/grasscutter/data/def/CodexQuestData.java rename to src/main/java/emu/grasscutter/data/excels/CodexQuestData.java index fc02eeb6c..09ccf0b6b 100644 --- a/src/main/java/emu/grasscutter/data/def/CodexQuestData.java +++ b/src/main/java/emu/grasscutter/data/excels/CodexQuestData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameData; import emu.grasscutter.data.GameResource; @@ -7,13 +7,13 @@ import emu.grasscutter.data.ResourceType; @ResourceType(name = {"QuestCodexExcelConfigData.json"}) public class CodexQuestData extends GameResource { private int Id; - private int ParentQuestId; - private int ChapterId; - private int SortOrder; - private boolean IsDisuse; + private int parentQuestId; + private int chapterId; + private int sortOrder; + private boolean isDisuse; public int getParentQuestId() { - return ParentQuestId; + return parentQuestId; } public int getId() { @@ -21,15 +21,15 @@ public class CodexQuestData extends GameResource { } public int getChapterId() { - return ChapterId; + return chapterId; } public int getSortOrder() { - return SortOrder; + return sortOrder; } public boolean getIsDisuse() { - return IsDisuse; + return isDisuse; } @Override diff --git a/src/main/java/emu/grasscutter/data/def/CodexReliquaryData.java b/src/main/java/emu/grasscutter/data/excels/CodexReliquaryData.java similarity index 64% rename from src/main/java/emu/grasscutter/data/def/CodexReliquaryData.java rename to src/main/java/emu/grasscutter/data/excels/CodexReliquaryData.java index de177dab5..8ed747b53 100644 --- a/src/main/java/emu/grasscutter/data/def/CodexReliquaryData.java +++ b/src/main/java/emu/grasscutter/data/excels/CodexReliquaryData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameData; import emu.grasscutter.data.GameResource; @@ -7,17 +7,17 @@ import emu.grasscutter.data.ResourceType; @ResourceType(name = {"ReliquaryCodexExcelConfigData.json"}) public class CodexReliquaryData extends GameResource { private int Id; - private int SuitId; - private int Level; - private int CupId; - private int LeatherId; - private int CapId; - private int FlowerId; - private int SandId; - private int SortOrder; + private int suitId; + private int level; + private int cupId; + private int leatherId; + private int capId; + private int flowerId; + private int sandId; + private int sortOrder; public int getSortOrder() { - return SortOrder; + return sortOrder; } public int getId() { @@ -25,31 +25,31 @@ public class CodexReliquaryData extends GameResource { } public int getSuitId() { - return SuitId; + return suitId; } public int getLevel() { - return Level; + return level; } public int getCupId() { - return CupId; + return cupId; } public int getLeatherId() { - return LeatherId; + return leatherId; } public int getCapId() { - return CapId; + return capId; } public int getFlowerId() { - return FlowerId; + return flowerId; } public int getSandId() { - return SandId; + return sandId; } @Override diff --git a/src/main/java/emu/grasscutter/data/def/CodexWeaponData.java b/src/main/java/emu/grasscutter/data/excels/CodexWeaponData.java similarity index 78% rename from src/main/java/emu/grasscutter/data/def/CodexWeaponData.java rename to src/main/java/emu/grasscutter/data/excels/CodexWeaponData.java index 9dfcbc673..7b08290ec 100644 --- a/src/main/java/emu/grasscutter/data/def/CodexWeaponData.java +++ b/src/main/java/emu/grasscutter/data/excels/CodexWeaponData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameData; import emu.grasscutter.data.GameResource; @@ -7,15 +7,15 @@ import emu.grasscutter.data.ResourceType; @ResourceType(name = {"WeaponCodexExcelConfigData.json"}) public class CodexWeaponData extends GameResource { private int Id; - private int WeaponId; - private int SortOrder; + private int weaponId; + private int sortOrder; public int getSortOrder() { - return SortOrder; + return sortOrder; } public int getWeaponId() { - return WeaponId; + return weaponId; } public int getId() { diff --git a/src/main/java/emu/grasscutter/data/excels/CombineData.java b/src/main/java/emu/grasscutter/data/excels/CombineData.java new file mode 100644 index 000000000..38ac7f641 --- /dev/null +++ b/src/main/java/emu/grasscutter/data/excels/CombineData.java @@ -0,0 +1,83 @@ +package emu.grasscutter.data.excels; + +import emu.grasscutter.data.GameResource; +import emu.grasscutter.data.ResourceType; +import emu.grasscutter.data.common.ItemParamData; + +import java.util.List; +import java.util.stream.Collectors; + +@ResourceType(name = "CombineExcelConfigData.json") +public class CombineData extends GameResource { + + private int combineId; + private int playerLevel; + private boolean isDefaultShow; + private int combineType; + private int subCombineType; + private int resultItemId; + private int resultItemCount; + private int scoinCost; + private List randomItems; + private List materialItems; + private String recipeType; + + @Override + public int getId() { + return this.combineId; + } + + @Override + public void onLoad() { + super.onLoad(); + // clean data + randomItems = randomItems.stream().filter(item -> item.getId() > 0).collect(Collectors.toList()); + materialItems = materialItems.stream().filter(item -> item.getId() > 0).collect(Collectors.toList()); + } + + public int getCombineId() { + return combineId; + } + + public int getPlayerLevel() { + return playerLevel; + } + + public boolean isDefaultShow() { + return isDefaultShow; + } + + public int getCombineType() { + return combineType; + } + + public int getSubCombineType() { + return subCombineType; + } + + public int getResultItemId() { + return resultItemId; + } + + public int getResultItemCount() { + return resultItemCount; + } + + public int getScoinCost() { + return scoinCost; + } + + public List getRandomItems() { + return randomItems; + } + + public List getMaterialItems() { + return materialItems; + } + + public String getRecipeType() { + return recipeType; + } + +} + diff --git a/src/main/java/emu/grasscutter/data/def/DailyDungeonData.java b/src/main/java/emu/grasscutter/data/excels/DailyDungeonData.java similarity index 59% rename from src/main/java/emu/grasscutter/data/def/DailyDungeonData.java rename to src/main/java/emu/grasscutter/data/excels/DailyDungeonData.java index 8cd878125..39f1da4f3 100644 --- a/src/main/java/emu/grasscutter/data/def/DailyDungeonData.java +++ b/src/main/java/emu/grasscutter/data/excels/DailyDungeonData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import java.util.Calendar; @@ -12,14 +12,14 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; @ResourceType(name = "DailyDungeonConfigData.json") public class DailyDungeonData extends GameResource { - private int Id; - private int[] Monday; - private int[] Tuesday; - private int[] Wednesday; - private int[] Thursday; - private int[] Friday; - private int[] Saturday; - private int[] Sunday; + private int id; + private int[] monday; + private int[] tuesday; + private int[] wednesday; + private int[] thursday; + private int[] friday; + private int[] saturday; + private int[] sunday; private static final int[] empty = new int[0]; private final Int2ObjectMap map; @@ -30,7 +30,7 @@ public class DailyDungeonData extends GameResource { @Override public int getId() { - return this.Id; + return this.id; } public int[] getDungeonsByDay(int day) { @@ -39,12 +39,12 @@ public class DailyDungeonData extends GameResource { @Override public void onLoad() { - map.put(Calendar.MONDAY, Monday); - map.put(Calendar.TUESDAY, Tuesday); - map.put(Calendar.WEDNESDAY, Wednesday); - map.put(Calendar.THURSDAY, Thursday); - map.put(Calendar.FRIDAY, Friday); - map.put(Calendar.SATURDAY, Saturday); - map.put(Calendar.SUNDAY, Sunday); + map.put(Calendar.MONDAY, monday); + map.put(Calendar.TUESDAY, tuesday); + map.put(Calendar.WEDNESDAY, wednesday); + map.put(Calendar.THURSDAY, thursday); + map.put(Calendar.FRIDAY, friday); + map.put(Calendar.SATURDAY, saturday); + map.put(Calendar.SUNDAY, sunday); } } diff --git a/src/main/java/emu/grasscutter/data/def/DungeonData.java b/src/main/java/emu/grasscutter/data/excels/DungeonData.java similarity index 67% rename from src/main/java/emu/grasscutter/data/def/DungeonData.java rename to src/main/java/emu/grasscutter/data/excels/DungeonData.java index 086cbb6bf..3b18c01ef 100644 --- a/src/main/java/emu/grasscutter/data/def/DungeonData.java +++ b/src/main/java/emu/grasscutter/data/excels/DungeonData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameData; import emu.grasscutter.data.GameResource; @@ -8,25 +8,25 @@ import emu.grasscutter.game.props.SceneType; @ResourceType(name = "DungeonExcelConfigData.json") public class DungeonData extends GameResource { - private int Id; - private int SceneId; - private int ShowLevel; - private int PassRewardPreviewID; - private String InvolveType; // TODO enum + private int id; + private int sceneId; + private int showLevel; + private int passRewardPreviewID; + private String involveType; // TODO enum private RewardPreviewData previewData; @Override public int getId() { - return this.Id; + return this.id; } public int getSceneId() { - return SceneId; + return sceneId; } public int getShowLevel() { - return ShowLevel; + return showLevel; } public RewardPreviewData getRewardPreview() { @@ -35,8 +35,8 @@ public class DungeonData extends GameResource { @Override public void onLoad() { - if (this.PassRewardPreviewID > 0) { - this.previewData = GameData.getRewardPreviewDataMap().get(this.PassRewardPreviewID); + if (this.passRewardPreviewID > 0) { + this.previewData = GameData.getRewardPreviewDataMap().get(this.passRewardPreviewID); } } } diff --git a/src/main/java/emu/grasscutter/data/def/EquipAffixData.java b/src/main/java/emu/grasscutter/data/excels/EquipAffixData.java similarity index 65% rename from src/main/java/emu/grasscutter/data/def/EquipAffixData.java rename to src/main/java/emu/grasscutter/data/excels/EquipAffixData.java index 9020c7b46..e7356d939 100644 --- a/src/main/java/emu/grasscutter/data/def/EquipAffixData.java +++ b/src/main/java/emu/grasscutter/data/excels/EquipAffixData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import java.util.ArrayList; import emu.grasscutter.data.GameResource; @@ -8,41 +8,41 @@ import emu.grasscutter.data.common.FightPropData; @ResourceType(name = "EquipAffixExcelConfigData.json") public class EquipAffixData extends GameResource { - private int AffixId; - private int Id; - private int Level; - private long NameTextMapHash; - private String OpenConfig; - private FightPropData[] AddProps; - private float[] ParamList; + private int affixId; + private int id; + private int level; + private long nameTextMapHash; + private String openConfig; + private FightPropData[] addProps; + private float[] paramList; @Override public int getId() { - return AffixId; + return affixId; } public int getMainId() { - return Id; + return id; } public int getLevel() { - return Level; + return level; } public long getNameTextMapHash() { - return NameTextMapHash; + return nameTextMapHash; } public String getOpenConfig() { - return OpenConfig; + return openConfig; } public FightPropData[] getAddProps() { - return AddProps; + return addProps; } public float[] getParamList() { - return ParamList; + return paramList; } @Override @@ -54,6 +54,6 @@ public class EquipAffixData extends GameResource { parsed.add(prop); } } - this.AddProps = parsed.toArray(new FightPropData[parsed.size()]); + this.addProps = parsed.toArray(new FightPropData[parsed.size()]); } } diff --git a/src/main/java/emu/grasscutter/data/def/FetterCharacterCardData.java b/src/main/java/emu/grasscutter/data/excels/FetterCharacterCardData.java similarity index 73% rename from src/main/java/emu/grasscutter/data/def/FetterCharacterCardData.java rename to src/main/java/emu/grasscutter/data/excels/FetterCharacterCardData.java index 62e323509..771bd9cb2 100644 --- a/src/main/java/emu/grasscutter/data/def/FetterCharacterCardData.java +++ b/src/main/java/emu/grasscutter/data/excels/FetterCharacterCardData.java @@ -1,24 +1,24 @@ -package emu.grasscutter.data.def; - -import emu.grasscutter.data.GameResource; -import emu.grasscutter.data.ResourceType; -import emu.grasscutter.data.ResourceType.LoadPriority; - -@ResourceType(name = "FetterCharacterCardExcelConfigData.json", loadPriority = LoadPriority.HIGHEST) -public class FetterCharacterCardData extends GameResource { - private int AvatarId; - private int RewardId; - - @Override - public int getId() { - return AvatarId; - } - - public int getRewardId() { - return RewardId; - } - - @Override - public void onLoad() { - } -} +package emu.grasscutter.data.excels; + +import emu.grasscutter.data.GameResource; +import emu.grasscutter.data.ResourceType; +import emu.grasscutter.data.ResourceType.LoadPriority; + +@ResourceType(name = "FetterCharacterCardExcelConfigData.json", loadPriority = LoadPriority.HIGHEST) +public class FetterCharacterCardData extends GameResource { + private int avatarId; + private int rewardId; + + @Override + public int getId() { + return avatarId; + } + + public int getRewardId() { + return rewardId; + } + + @Override + public void onLoad() { + } +} diff --git a/src/main/java/emu/grasscutter/data/def/FetterData.java b/src/main/java/emu/grasscutter/data/excels/FetterData.java similarity index 75% rename from src/main/java/emu/grasscutter/data/def/FetterData.java rename to src/main/java/emu/grasscutter/data/excels/FetterData.java index 697843680..101f31915 100644 --- a/src/main/java/emu/grasscutter/data/def/FetterData.java +++ b/src/main/java/emu/grasscutter/data/excels/FetterData.java @@ -1,32 +1,32 @@ -package emu.grasscutter.data.def; - -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.OpenCondData; - -@ResourceType(name = {"FetterInfoExcelConfigData.json", "FettersExcelConfigData.json", "FetterStoryExcelConfigData.json", "PhotographExpressionExcelConfigData.json", "PhotographPosenameExcelConfigData.json"}, loadPriority = LoadPriority.HIGHEST) -public class FetterData extends GameResource { - private int AvatarId; - private int FetterId; - private List OpenCond; - - @Override - public int getId() { - return FetterId; - } - - public int getAvatarId() { - return AvatarId; - } - - public List getOpenConds() { - return OpenCond; - } - - @Override - public void onLoad() { - } -} +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.OpenCondData; + +@ResourceType(name = {"FetterInfoExcelConfigData.json", "FettersExcelConfigData.json", "FetterStoryExcelConfigData.json", "PhotographExpressionExcelConfigData.json", "PhotographPosenameExcelConfigData.json"}, loadPriority = LoadPriority.HIGHEST) +public class FetterData extends GameResource { + private int avatarId; + private int fetterId; + private List openCond; + + @Override + public int getId() { + return fetterId; + } + + public int getAvatarId() { + return avatarId; + } + + public List getOpenConds() { + return openCond; + } + + @Override + public void onLoad() { + } +} diff --git a/src/main/java/emu/grasscutter/data/def/GadgetData.java b/src/main/java/emu/grasscutter/data/excels/GadgetData.java similarity index 60% rename from src/main/java/emu/grasscutter/data/def/GadgetData.java rename to src/main/java/emu/grasscutter/data/excels/GadgetData.java index 6f1a8aa46..2cd79f6c2 100644 --- a/src/main/java/emu/grasscutter/data/def/GadgetData.java +++ b/src/main/java/emu/grasscutter/data/excels/GadgetData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameResource; import emu.grasscutter.data.ResourceType; @@ -6,53 +6,53 @@ import emu.grasscutter.game.props.EntityType; @ResourceType(name = "GadgetExcelConfigData.json") public class GadgetData extends GameResource { - private int Id; + private int id; - private EntityType Type; - private String JsonName; - private boolean IsInteractive; - private String[] Tags; - private String ItemJsonName; - private String InteeIconName; - private long NameTextMapHash; - private int CampID; + private EntityType type; + private String jsonName; + private boolean isInteractive; + private String[] tags; + private String itemJsonName; + private String inteeIconName; + private long nameTextMapHash; + private int campID; private String LODPatternName; @Override public int getId() { - return this.Id; + return this.id; } public EntityType getType() { - return Type; + return type; } public String getJsonName() { - return JsonName; + return jsonName; } public boolean isInteractive() { - return IsInteractive; + return isInteractive; } public String[] getTags() { - return Tags; + return tags; } public String getItemJsonName() { - return ItemJsonName; + return itemJsonName; } public String getInteeIconName() { - return InteeIconName; + return inteeIconName; } public long getNameTextMapHash() { - return NameTextMapHash; + return nameTextMapHash; } public int getCampID() { - return CampID; + return campID; } public String getLODPatternName() { return LODPatternName; } diff --git a/src/main/java/emu/grasscutter/data/def/ItemData.java b/src/main/java/emu/grasscutter/data/excels/ItemData.java similarity index 52% rename from src/main/java/emu/grasscutter/data/def/ItemData.java rename to src/main/java/emu/grasscutter/data/excels/ItemData.java index 5cd1df751..11a593edc 100644 --- a/src/main/java/emu/grasscutter/data/def/ItemData.java +++ b/src/main/java/emu/grasscutter/data/excels/ItemData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameResource; import emu.grasscutter.data.ResourceType; @@ -9,164 +9,164 @@ import it.unimi.dsi.fastutil.ints.IntSet; @ResourceType(name = {"MaterialExcelConfigData.json", "WeaponExcelConfigData.json", "ReliquaryExcelConfigData.json"}) public class ItemData extends GameResource { - private int Id; - private int StackLimit = 1; - private int MaxUseCount; - private int RankLevel; - private String EffectName; - private int[] SatiationParams; - private int Rank; - private int Weight; - private int GadgetId; + private int id; + private int stackLimit = 1; + private int maxUseCount; + private int rankLevel; + private String effectName; + private int[] satiationParams; + private int rank; + private int weight; + private int gadgetId; - private int[] DestroyReturnMaterial; - private int[] DestroyReturnMaterialCount; + private int[] destroyReturnMaterial; + private int[] destroyReturnMaterialCount; // Food - private String FoodQuality; - private String UseTarget; - private String[] UseParam; + private String foodQuality; + private String useTarget; + private String[] iseParam; // String enums - private String ItemType; - private String MaterialType; - private String EquipType; - private String EffectType; - private String DestroyRule; + private String itemType; + private String materialType; + private String equipType; + private String effectType; + private String destroyRule; // Relic - private int MainPropDepotId; - private int AppendPropDepotId; - private int AppendPropNum; - private int SetId; - private int[] AddPropLevels; - private int BaseConvExp; - private int MaxLevel; + private int mainPropDepotId; + private int appendPropDepotId; + private int appendPropNum; + private int setId; + private int[] addPropLevels; + private int baseConvExp; + private int maxLevel; // Weapon - private int WeaponPromoteId; - private int WeaponBaseExp; - private int StoryId; - private int AvatarPromoteId; - private int AwakenMaterial; - private int[] AwakenCosts; - private int[] SkillAffix; - private WeaponProperty[] WeaponProp; + private int weaponPromoteId; + private int weaponBaseExp; + private int storyId; + private int avatarPromoteId; + private int awakenMaterial; + private int[] awakenCosts; + private int[] skillAffix; + private WeaponProperty[] weaponProp; // Hash - private String Icon; - private long NameTextMapHash; + private String icon; + private long nameTextMapHash; // Post load - private transient emu.grasscutter.game.inventory.MaterialType materialType; - private transient emu.grasscutter.game.inventory.ItemType itemType; - private transient emu.grasscutter.game.inventory.EquipType equipType; + private transient emu.grasscutter.game.inventory.MaterialType materialEnumType; + private transient emu.grasscutter.game.inventory.ItemType itemEnumType; + private transient emu.grasscutter.game.inventory.EquipType equipEnumType; private IntSet addPropLevelSet; @Override public int getId(){ - return this.Id; + return this.id; } public String getMaterialTypeString(){ - return this.MaterialType; + return this.materialType; } public int getStackLimit(){ - return this.StackLimit; + return this.stackLimit; } public int getMaxUseCount(){ - return this.MaxUseCount; + return this.maxUseCount; } public String getUseTarget(){ - return this.UseTarget; + return this.useTarget; } public String[] getUseParam(){ - return this.UseParam; + return this.iseParam; } public int getRankLevel(){ - return this.RankLevel; + return this.rankLevel; } public String getFoodQuality(){ - return this.FoodQuality; + return this.foodQuality; } public String getEffectName(){ - return this.EffectName; + return this.effectName; } public int[] getSatiationParams(){ - return this.SatiationParams; + return this.satiationParams; } public int[] getDestroyReturnMaterial(){ - return this.DestroyReturnMaterial; + return this.destroyReturnMaterial; } public int[] getDestroyReturnMaterialCount(){ - return this.DestroyReturnMaterialCount; + return this.destroyReturnMaterialCount; } public long getNameTextMapHash(){ - return this.NameTextMapHash; + return this.nameTextMapHash; } public String getIcon(){ - return this.Icon; + return this.icon; } public String getItemTypeString(){ - return this.ItemType; + return this.itemType; } public int getRank(){ - return this.Rank; + return this.rank; } public int getGadgetId() { - return GadgetId; + return gadgetId; } public int getBaseConvExp() { - return BaseConvExp; + return baseConvExp; } public int getMainPropDepotId() { - return MainPropDepotId; + return mainPropDepotId; } public int getAppendPropDepotId() { - return AppendPropDepotId; + return appendPropDepotId; } public int getAppendPropNum() { - return AppendPropNum; + return appendPropNum; } public int getSetId() { - return SetId; + return setId; } public int getWeaponPromoteId() { - return WeaponPromoteId; + return weaponPromoteId; } public int getWeaponBaseExp() { - return WeaponBaseExp; + return weaponBaseExp; } public int getAwakenMaterial() { - return AwakenMaterial; + return awakenMaterial; } public int[] getAwakenCosts() { - return AwakenCosts; + return awakenCosts; } public IntSet getAddPropLevelSet() { @@ -174,27 +174,27 @@ public class ItemData extends GameResource { } public int[] getSkillAffix() { - return SkillAffix; + return skillAffix; } public WeaponProperty[] getWeaponProperties() { - return WeaponProp; + return weaponProp; } public int getMaxLevel() { - return MaxLevel; + return maxLevel; } public emu.grasscutter.game.inventory.ItemType getItemType() { - return this.itemType; + return this.itemEnumType; } public emu.grasscutter.game.inventory.MaterialType getMaterialType() { - return this.materialType; + return this.materialEnumType; } public emu.grasscutter.game.inventory.EquipType getEquipType() { - return this.equipType; + return this.equipEnumType; } public boolean canAddRelicProp(int level) { @@ -202,23 +202,23 @@ public class ItemData extends GameResource { } public boolean isEquip() { - return this.itemType == emu.grasscutter.game.inventory.ItemType.ITEM_RELIQUARY || this.itemType == emu.grasscutter.game.inventory.ItemType.ITEM_WEAPON; + return this.itemEnumType == emu.grasscutter.game.inventory.ItemType.ITEM_RELIQUARY || this.itemEnumType == emu.grasscutter.game.inventory.ItemType.ITEM_WEAPON; } @Override public void onLoad() { - this.itemType = emu.grasscutter.game.inventory.ItemType.getTypeByName(getItemTypeString()); - this.materialType = emu.grasscutter.game.inventory.MaterialType.getTypeByName(getMaterialTypeString()); + this.itemEnumType = emu.grasscutter.game.inventory.ItemType.getTypeByName(getItemTypeString()); + this.materialEnumType = emu.grasscutter.game.inventory.MaterialType.getTypeByName(getMaterialTypeString()); - if (this.itemType == emu.grasscutter.game.inventory.ItemType.ITEM_RELIQUARY) { - this.equipType = emu.grasscutter.game.inventory.EquipType.getTypeByName(this.EquipType); - if (this.AddPropLevels != null && this.AddPropLevels.length > 0) { - this.addPropLevelSet = new IntOpenHashSet(this.AddPropLevels); + if (this.itemEnumType == emu.grasscutter.game.inventory.ItemType.ITEM_RELIQUARY) { + this.equipEnumType = emu.grasscutter.game.inventory.EquipType.getTypeByName(this.equipType); + if (this.addPropLevels != null && this.addPropLevels.length > 0) { + this.addPropLevelSet = new IntOpenHashSet(this.addPropLevels); } - } else if (this.itemType == emu.grasscutter.game.inventory.ItemType.ITEM_WEAPON) { - this.equipType = emu.grasscutter.game.inventory.EquipType.EQUIP_WEAPON; + } else if (this.itemEnumType == emu.grasscutter.game.inventory.ItemType.ITEM_WEAPON) { + this.equipEnumType = emu.grasscutter.game.inventory.EquipType.EQUIP_WEAPON; } else { - this.equipType = emu.grasscutter.game.inventory.EquipType.EQUIP_NONE; + this.equipEnumType = emu.grasscutter.game.inventory.EquipType.EQUIP_NONE; } if (this.getWeaponProperties() != null) { diff --git a/src/main/java/emu/grasscutter/data/def/MonsterCurveData.java b/src/main/java/emu/grasscutter/data/excels/MonsterCurveData.java similarity index 57% rename from src/main/java/emu/grasscutter/data/def/MonsterCurveData.java rename to src/main/java/emu/grasscutter/data/excels/MonsterCurveData.java index 07c705403..29e7da2fb 100644 --- a/src/main/java/emu/grasscutter/data/def/MonsterCurveData.java +++ b/src/main/java/emu/grasscutter/data/excels/MonsterCurveData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import java.util.HashMap; import java.util.Map; @@ -10,23 +10,23 @@ import emu.grasscutter.data.common.CurveInfo; @ResourceType(name = "MonsterCurveExcelConfigData.json") public class MonsterCurveData extends GameResource { - private int Level; - private CurveInfo[] CurveInfos; + private int level; + private CurveInfo[] curveInfos; - private Map curveInfos; + private Map curveInfoMap; @Override public int getId() { - return Level; + return level; } public float getMultByProp(String fightProp) { - return curveInfos.getOrDefault(fightProp, 1f); + return curveInfoMap.getOrDefault(fightProp, 1f); } @Override public void onLoad() { - this.curveInfos = new HashMap<>(); - Stream.of(this.CurveInfos).forEach(info -> this.curveInfos.put(info.getType(), info.getValue())); + this.curveInfoMap = new HashMap<>(); + Stream.of(this.curveInfos).forEach(info -> this.curveInfoMap.put(info.getType(), info.getValue())); } } diff --git a/src/main/java/emu/grasscutter/data/def/MonsterData.java b/src/main/java/emu/grasscutter/data/excels/MonsterData.java similarity index 58% rename from src/main/java/emu/grasscutter/data/def/MonsterData.java rename to src/main/java/emu/grasscutter/data/excels/MonsterData.java index 341a10ce0..468ceb1dd 100644 --- a/src/main/java/emu/grasscutter/data/def/MonsterData.java +++ b/src/main/java/emu/grasscutter/data/excels/MonsterData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import java.util.List; @@ -10,152 +10,153 @@ import emu.grasscutter.data.common.PropGrowCurve; @ResourceType(name = "MonsterExcelConfigData.json", loadPriority = LoadPriority.LOW) public class MonsterData extends GameResource { - private int Id; + private int id; - private String MonsterName; - private String Type; - private String ServerScript; - private List Affix; - private String Ai; - private int[] Equips; - private List HpDrops; - private int KillDropId; - private String ExcludeWeathers; - private int FeatureTagGroupID; - private int MpPropID; - private String Skin; - private int DescribeId; - private int CombatBGMLevel; - private int EntityBudgetLevel; - private float HpBase; - private float AttackBase; - private float DefenseBase; - private float FireSubHurt; - private float ElecSubHurt; - private float GrassSubHurt; - private float WaterSubHurt; - private float WindSubHurt; - private float RockSubHurt; - private float IceSubHurt; - private float PhysicalSubHurt; - private List PropGrowCurves; - private long NameTextMapHash; - private int CampID; + private String monsterName; + private String type; + private String serverScript; + private List affix; + private String ai; + private int[] equips; + private List hpDrops; + private int killDropId; + private String excludeWeathers; + private int featureTagGroupID; + private int mpPropID; + private String skin; + private int describeId; + private int combatBGMLevel; + private int entityBudgetLevel; + private float hpBase; + private float attackBase; + private float defenseBase; + private float fireSubHurt; + private float elecSubHurt; + private float grassSubHurt; + private float waterSubHurt; + private float windSubHurt; + private float rockSubHurt; + private float iceSubHurt; + private float physicalSubHurt; + private List propGrowCurves; + private long nameTextMapHash; + private int campID; + // Transient private int weaponId; private MonsterDescribeData describeData; @Override public int getId() { - return this.Id; + return this.id; } public String getMonsterName() { - return MonsterName; + return monsterName; } public String getType() { - return Type; + return type; } public String getServerScript() { - return ServerScript; + return serverScript; } public List getAffix() { - return Affix; + return affix; } public String getAi() { - return Ai; + return ai; } public int[] getEquips() { - return Equips; + return equips; } public List getHpDrops() { - return HpDrops; + return hpDrops; } public int getKillDropId() { - return KillDropId; + return killDropId; } public String getExcludeWeathers() { - return ExcludeWeathers; + return excludeWeathers; } public int getFeatureTagGroupID() { - return FeatureTagGroupID; + return featureTagGroupID; } public int getMpPropID() { - return MpPropID; + return mpPropID; } public String getSkin() { - return Skin; + return skin; } public int getDescribeId() { - return DescribeId; + return describeId; } public int getCombatBGMLevel() { - return CombatBGMLevel; + return combatBGMLevel; } public int getEntityBudgetLevel() { - return EntityBudgetLevel; + return entityBudgetLevel; } public float getBaseHp() { - return HpBase; + return hpBase; } public float getBaseAttack() { - return AttackBase; + return attackBase; } public float getBaseDefense() { - return DefenseBase; + return defenseBase; } public float getElecSubHurt() { - return ElecSubHurt; + return elecSubHurt; } public float getGrassSubHurt() { - return GrassSubHurt; + return grassSubHurt; } public float getWaterSubHurt() { - return WaterSubHurt; + return waterSubHurt; } public float getWindSubHurt() { - return WindSubHurt; + return windSubHurt; } public float getIceSubHurt() { - return IceSubHurt; + return iceSubHurt; } public float getPhysicalSubHurt() { - return PhysicalSubHurt; + return physicalSubHurt; } public List getPropGrowCurves() { - return PropGrowCurves; + return propGrowCurves; } public long getNameTextMapHash() { - return NameTextMapHash; + return nameTextMapHash; } public int getCampID() { - return CampID; + return campID; } public MonsterDescribeData getDescribeData() { @@ -170,7 +171,7 @@ public class MonsterData extends GameResource { public void onLoad() { this.describeData = GameData.getMonsterDescribeDataMap().get(this.getDescribeId()); - for (int id : this.Equips) { + for (int id : this.equips) { if (id == 0) { continue; } diff --git a/src/main/java/emu/grasscutter/data/def/MonsterDescribeData.java b/src/main/java/emu/grasscutter/data/excels/MonsterDescribeData.java similarity index 65% rename from src/main/java/emu/grasscutter/data/def/MonsterDescribeData.java rename to src/main/java/emu/grasscutter/data/excels/MonsterDescribeData.java index 41b826c5b..9f6c81e25 100644 --- a/src/main/java/emu/grasscutter/data/def/MonsterDescribeData.java +++ b/src/main/java/emu/grasscutter/data/excels/MonsterDescribeData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameResource; import emu.grasscutter.data.ResourceType; @@ -6,31 +6,31 @@ import emu.grasscutter.data.ResourceType.LoadPriority; @ResourceType(name = "MonsterDescribeExcelConfigData.json", loadPriority = LoadPriority.HIGH) public class MonsterDescribeData extends GameResource { - private int Id; - private long NameTextMapHash; - private int TitleID; - private int SpecialNameLabID; - private String Icon; + private int id; + private long nameTextMapHash; + private int titleID; + private int specialNameLabID; + private String icon; @Override public int getId() { - return Id; + return id; } public long getNameTextMapHash() { - return NameTextMapHash; + return nameTextMapHash; } public int getTitleID() { - return TitleID; + return titleID; } public int getSpecialNameLabID() { - return SpecialNameLabID; + return specialNameLabID; } public String getIcon() { - return Icon; + return icon; } @Override diff --git a/src/main/java/emu/grasscutter/data/def/NpcData.java b/src/main/java/emu/grasscutter/data/excels/NpcData.java similarity index 51% rename from src/main/java/emu/grasscutter/data/def/NpcData.java rename to src/main/java/emu/grasscutter/data/excels/NpcData.java index 37fa78776..cd6323525 100644 --- a/src/main/java/emu/grasscutter/data/def/NpcData.java +++ b/src/main/java/emu/grasscutter/data/excels/NpcData.java @@ -1,68 +1,68 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameResource; import emu.grasscutter.data.ResourceType; @ResourceType(name = "NpcExcelConfigData.json") public class NpcData extends GameResource { - private int Id; + private int id; - private String JsonName; - private String Alias; - private String ScriptDataPath; - private String LuaDataPath; + private String jsonName; + private String alias; + private String scriptDataPath; + private String luaDataPath; - private boolean IsInteractive; - private boolean HasMove; - private String DyePart; - private String BillboardIcon; + private boolean isInteractive; + private boolean hasMove; + private String dyePart; + private String billboardIcon; - private long NameTextMapHash; - private int CampID; + private long nameTextMapHash; + private int campID; @Override public int getId() { - return this.Id; + return this.id; } public String getJsonName() { - return JsonName; + return jsonName; } public String getAlias() { - return Alias; + return alias; } public String getScriptDataPath() { - return ScriptDataPath; + return scriptDataPath; } public String getLuaDataPath() { - return LuaDataPath; + return luaDataPath; } public boolean isIsInteractive() { - return IsInteractive; + return isInteractive; } public boolean isHasMove() { - return HasMove; + return hasMove; } public String getDyePart() { - return DyePart; + return dyePart; } public String getBillboardIcon() { - return BillboardIcon; + return billboardIcon; } public long getNameTextMapHash() { - return NameTextMapHash; + return nameTextMapHash; } public int getCampID() { - return CampID; + return campID; } @Override diff --git a/src/main/java/emu/grasscutter/data/def/PlayerLevelData.java b/src/main/java/emu/grasscutter/data/excels/PlayerLevelData.java similarity index 61% rename from src/main/java/emu/grasscutter/data/def/PlayerLevelData.java rename to src/main/java/emu/grasscutter/data/excels/PlayerLevelData.java index 1e02e3eca..646c06e3b 100644 --- a/src/main/java/emu/grasscutter/data/def/PlayerLevelData.java +++ b/src/main/java/emu/grasscutter/data/excels/PlayerLevelData.java @@ -1,33 +1,33 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameResource; import emu.grasscutter.data.ResourceType; @ResourceType(name = "PlayerLevelExcelConfigData.json") public class PlayerLevelData extends GameResource { - private int Level; - private int Exp; - private int RewardId; - private int UnlockWorldLevel; + private int level; + private int exp; + private int rewardId; + private int unlockWorldLevel; @Override public int getId() { - return this.Level; + return this.level; } public int getLevel() { - return Level; + return level; } public int getExp() { - return Exp; + return exp; } public int getRewardId() { - return RewardId; + return rewardId; } public int getUnlockWorldLevel() { - return UnlockWorldLevel; + return unlockWorldLevel; } } diff --git a/src/main/java/emu/grasscutter/data/def/ProudSkillData.java b/src/main/java/emu/grasscutter/data/excels/ProudSkillData.java similarity index 57% rename from src/main/java/emu/grasscutter/data/def/ProudSkillData.java rename to src/main/java/emu/grasscutter/data/excels/ProudSkillData.java index 3eff8b94d..34701ffe5 100644 --- a/src/main/java/emu/grasscutter/data/def/ProudSkillData.java +++ b/src/main/java/emu/grasscutter/data/excels/ProudSkillData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import java.util.ArrayList; import java.util.List; @@ -11,82 +11,82 @@ import emu.grasscutter.data.common.ItemParamData; @ResourceType(name = "ProudSkillExcelConfigData.json") public class ProudSkillData extends GameResource { - private int ProudSkillId; - private int ProudSkillGroupId; - private int Level; - private int CoinCost; - private int BreakLevel; - private int ProudSkillType; - private String OpenConfig; - private List CostItems; - private List FilterConds; - private List LifeEffectParams; - private FightPropData[] AddProps; - private float[] ParamList; - private long[] ParamDescList; - private long NameTextMapHash; + private int proudSkillId; + private int proudSkillGroupId; + private int level; + private int coinCost; + private int breakLevel; + private int proudSkillType; + private String openConfig; + private List costItems; + private List filterConds; + private List lifeEffectParams; + private FightPropData[] addProps; + private float[] paramList; + private long[] paramDescList; + private long nameTextMapHash; @Override public int getId() { - return ProudSkillId; + return proudSkillId; } public int getProudSkillGroupId() { - return ProudSkillGroupId; + return proudSkillGroupId; } public int getLevel() { - return Level; + return level; } public int getCoinCost() { - return CoinCost; + return coinCost; } public int getBreakLevel() { - return BreakLevel; + return breakLevel; } public int getProudSkillType() { - return ProudSkillType; + return proudSkillType; } public String getOpenConfig() { - return OpenConfig; + return openConfig; } public List getCostItems() { - return CostItems; + return costItems; } public List getFilterConds() { - return FilterConds; + return filterConds; } public List getLifeEffectParams() { - return LifeEffectParams; + return lifeEffectParams; } public FightPropData[] getAddProps() { - return AddProps; + return addProps; } public float[] getParamList() { - return ParamList; + return paramList; } public long[] getParamDescList() { - return ParamDescList; + return paramDescList; } public long getNameTextMapHash() { - return NameTextMapHash; + return nameTextMapHash; } @Override public void onLoad() { if (this.getOpenConfig() != null & this.getOpenConfig().length() > 0) { - this.OpenConfig = "Avatar_" + this.getOpenConfig(); + this.openConfig = "Avatar_" + this.getOpenConfig(); } // Fight props ArrayList parsed = new ArrayList(getAddProps().length); @@ -96,6 +96,6 @@ public class ProudSkillData extends GameResource { parsed.add(prop); } } - this.AddProps = parsed.toArray(new FightPropData[parsed.size()]); + this.addProps = parsed.toArray(new FightPropData[parsed.size()]); } } diff --git a/src/main/java/emu/grasscutter/data/def/QuestData.java b/src/main/java/emu/grasscutter/data/excels/QuestData.java similarity index 64% rename from src/main/java/emu/grasscutter/data/def/QuestData.java rename to src/main/java/emu/grasscutter/data/excels/QuestData.java index 13e806dab..57ed245c7 100644 --- a/src/main/java/emu/grasscutter/data/def/QuestData.java +++ b/src/main/java/emu/grasscutter/data/excels/QuestData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import java.util.Arrays; import java.util.List; @@ -10,54 +10,54 @@ import emu.grasscutter.game.quest.enums.QuestTrigger; @ResourceType(name = "QuestExcelConfigData.json") public class QuestData extends GameResource { - private int SubId; - private int MainId; - private int Order; - private long DescTextMapHash; + private int subId; + private int mainId; + private int order; + private long descTextMapHash; - private boolean FinishParent; - private boolean IsRewind; + private boolean finishParent; + private boolean isRewind; - private LogicType AcceptCondComb; + private LogicType acceptCondComb; private QuestCondition[] acceptConditons; - private LogicType FinishCondComb; + private LogicType finishCondComb; private QuestCondition[] finishConditons; - private LogicType FailCondComb; + private LogicType failCondComb; private QuestCondition[] failConditons; - private List AcceptCond; - private List FinishCond; - private List FailCond; - private List BeginExec; - private List FinishExec; - private List FailExec; + private List acceptCond; + private List finishCond; + private List failCond; + private List beginExec; + private List finishExec; + private List failExec; public int getId() { - return SubId; + return subId; } public int getMainId() { - return MainId; + return mainId; } public int getOrder() { - return Order; + return order; } public long getDescTextMapHash() { - return DescTextMapHash; + return descTextMapHash; } public boolean finishParent() { - return FinishParent; + return finishParent; } public boolean isRewind() { - return IsRewind; + return isRewind; } public LogicType getAcceptCondComb() { - return AcceptCondComb; + return acceptCondComb; } public QuestCondition[] getAcceptCond() { @@ -65,7 +65,7 @@ public class QuestData extends GameResource { } public LogicType getFinishCondComb() { - return FinishCondComb; + return finishCondComb; } public QuestCondition[] getFinishCond() { @@ -73,7 +73,7 @@ public class QuestData extends GameResource { } public LogicType getFailCondComb() { - return FailCondComb; + return failCondComb; } public QuestCondition[] getFailCond() { @@ -81,12 +81,12 @@ public class QuestData extends GameResource { } public void onLoad() { - this.acceptConditons = AcceptCond.stream().filter(p -> p.Type != null).map(QuestCondition::new).toArray(QuestCondition[]::new); - AcceptCond = null; - this.finishConditons = FinishCond.stream().filter(p -> p.Type != null).map(QuestCondition::new).toArray(QuestCondition[]::new); - FinishCond = null; - this.failConditons = FailCond.stream().filter(p -> p.Type != null).map(QuestCondition::new).toArray(QuestCondition[]::new); - FailCond = null; + this.acceptConditons = acceptCond.stream().filter(p -> p.Type != null).map(QuestCondition::new).toArray(QuestCondition[]::new); + acceptCond = null; + this.finishConditons = finishCond.stream().filter(p -> p.Type != null).map(QuestCondition::new).toArray(QuestCondition[]::new); + finishCond = null; + this.failConditons = failCond.stream().filter(p -> p.Type != null).map(QuestCondition::new).toArray(QuestCondition[]::new); + failCond = null; } public class QuestParam { diff --git a/src/main/java/emu/grasscutter/data/def/ReliquaryAffixData.java b/src/main/java/emu/grasscutter/data/excels/ReliquaryAffixData.java similarity index 77% rename from src/main/java/emu/grasscutter/data/def/ReliquaryAffixData.java rename to src/main/java/emu/grasscutter/data/excels/ReliquaryAffixData.java index ba9b1d369..8aa228fa4 100644 --- a/src/main/java/emu/grasscutter/data/def/ReliquaryAffixData.java +++ b/src/main/java/emu/grasscutter/data/excels/ReliquaryAffixData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameResource; import emu.grasscutter.data.ResourceType; @@ -10,39 +10,37 @@ public class ReliquaryAffixData extends GameResource { private int DepotId; private int GroupId; - private String PropType; + private FightProperty PropType; private float PropValue; private int Weight; private int UpgradeWeight; - private FightProperty fightProp; - @Override public int getId() { return Id; } + public int getDepotId() { return DepotId; } + public int getGroupId() { return GroupId; } + public float getPropValue() { return PropValue; } + public int getWeight() { return Weight; } + public int getUpgradeWeight() { return UpgradeWeight; } public FightProperty getFightProp() { - return fightProp; - } - - @Override - public void onLoad() { - this.fightProp = FightProperty.getPropByName(this.PropType); + return PropType; } } diff --git a/src/main/java/emu/grasscutter/data/def/ReliquaryLevelData.java b/src/main/java/emu/grasscutter/data/excels/ReliquaryLevelData.java similarity index 74% rename from src/main/java/emu/grasscutter/data/def/ReliquaryLevelData.java rename to src/main/java/emu/grasscutter/data/excels/ReliquaryLevelData.java index b4e37dd90..488cca1e6 100644 --- a/src/main/java/emu/grasscutter/data/def/ReliquaryLevelData.java +++ b/src/main/java/emu/grasscutter/data/excels/ReliquaryLevelData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import java.util.List; @@ -13,10 +13,10 @@ public class ReliquaryLevelData extends GameResource { private int id; private Int2ObjectMap propMap; - private int Rank; - private int Level; - private int Exp; - private List AddProps; + private int rank; + private int level; + private int exp; + private List addProps; @Override public int getId() { @@ -24,15 +24,15 @@ public class ReliquaryLevelData extends GameResource { } public int getRank() { - return Rank; + return rank; } public int getLevel() { - return Level; + return level; } public int getExp() { - return Exp; + return exp; } public float getPropValue(FightProperty prop) { @@ -45,23 +45,23 @@ public class ReliquaryLevelData extends GameResource { @Override public void onLoad() { - this.id = (Rank << 8) + this.getLevel(); + this.id = (rank << 8) + this.getLevel(); this.propMap = new Int2ObjectOpenHashMap<>(); - for (RelicLevelProperty p : AddProps) { + for (RelicLevelProperty p : addProps) { this.propMap.put(FightProperty.getPropByName(p.getPropType()).getId(), (Float) p.getValue()); } } public class RelicLevelProperty { - private String PropType; - private float Value; + private String propType; + private float value; public String getPropType() { - return PropType; + return propType; } public float getValue() { - return Value; + return value; } } } diff --git a/src/main/java/emu/grasscutter/data/def/ReliquaryMainPropData.java b/src/main/java/emu/grasscutter/data/excels/ReliquaryMainPropData.java similarity index 53% rename from src/main/java/emu/grasscutter/data/def/ReliquaryMainPropData.java rename to src/main/java/emu/grasscutter/data/excels/ReliquaryMainPropData.java index 6b2c920e4..5039849ff 100644 --- a/src/main/java/emu/grasscutter/data/def/ReliquaryMainPropData.java +++ b/src/main/java/emu/grasscutter/data/excels/ReliquaryMainPropData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameResource; import emu.grasscutter.data.ResourceType; @@ -6,32 +6,26 @@ import emu.grasscutter.game.props.FightProperty; @ResourceType(name = "ReliquaryMainPropExcelConfigData.json") public class ReliquaryMainPropData extends GameResource { - private int Id; + private int id; - private int PropDepotId; - private String PropType; - private String AffixName; - private int Weight; - - private FightProperty fightProp; + private int propDepotId; + private FightProperty propType; + private int weight; @Override public int getId() { - return Id; + return id; } + public int getPropDepotId() { - return PropDepotId; + return propDepotId; } + public int getWeight() { - return Weight; + return weight; } public FightProperty getFightProp() { - return fightProp; - } - - @Override - public void onLoad() { - this.fightProp = FightProperty.getPropByName(this.PropType); + return propType; } } diff --git a/src/main/java/emu/grasscutter/data/def/ReliquarySetData.java b/src/main/java/emu/grasscutter/data/excels/ReliquarySetData.java similarity index 67% rename from src/main/java/emu/grasscutter/data/def/ReliquarySetData.java rename to src/main/java/emu/grasscutter/data/excels/ReliquarySetData.java index 9eac2c050..910b8d724 100644 --- a/src/main/java/emu/grasscutter/data/def/ReliquarySetData.java +++ b/src/main/java/emu/grasscutter/data/excels/ReliquarySetData.java @@ -1,23 +1,23 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameResource; import emu.grasscutter.data.ResourceType; @ResourceType(name = "ReliquarySetExcelConfigData.json") public class ReliquarySetData extends GameResource { - private int SetId; - private int[] SetNeedNum; + private int setId; + private int[] setNeedNum; private int EquipAffixId; - private int DisableFilter; - private int[] ContainsList; + private int disableFilter; + private int[] containsList; @Override public int getId() { - return SetId; + return setId; } public int[] getSetNeedNum() { - return SetNeedNum; + return setNeedNum; } public int getEquipAffixId() { @@ -25,11 +25,11 @@ public class ReliquarySetData extends GameResource { } public int getDisableFilter() { - return DisableFilter; + return disableFilter; } public int[] getContainsList() { - return ContainsList; + return containsList; } @Override diff --git a/src/main/java/emu/grasscutter/data/def/RewardData.java b/src/main/java/emu/grasscutter/data/excels/RewardData.java similarity index 63% rename from src/main/java/emu/grasscutter/data/def/RewardData.java rename to src/main/java/emu/grasscutter/data/excels/RewardData.java index 6946e9cba..7df00b641 100644 --- a/src/main/java/emu/grasscutter/data/def/RewardData.java +++ b/src/main/java/emu/grasscutter/data/excels/RewardData.java @@ -1,27 +1,27 @@ -package emu.grasscutter.data.def; - -import java.util.List; - -import emu.grasscutter.data.GameResource; -import emu.grasscutter.data.ResourceType; -import emu.grasscutter.data.common.ItemParamData; - -@ResourceType(name = "RewardExcelConfigData.json") -public class RewardData extends GameResource { - public int RewardId; - public List RewardItemList; - - @Override - public int getId() { - return RewardId; - } - - public List getRewardItemList() { - return RewardItemList; - } - - @Override - public void onLoad() { - RewardItemList = RewardItemList.stream().filter(i -> i.getId() > 0).toList(); - } -} +package emu.grasscutter.data.excels; + +import java.util.List; + +import emu.grasscutter.data.GameResource; +import emu.grasscutter.data.ResourceType; +import emu.grasscutter.data.common.ItemParamData; + +@ResourceType(name = "RewardExcelConfigData.json") +public class RewardData extends GameResource { + public int rewardId; + public List rewardItemList; + + @Override + public int getId() { + return rewardId; + } + + public List getRewardItemList() { + return rewardItemList; + } + + @Override + public void onLoad() { + rewardItemList = rewardItemList.stream().filter(i -> i.getId() > 0).toList(); + } +} diff --git a/src/main/java/emu/grasscutter/data/def/RewardPreviewData.java b/src/main/java/emu/grasscutter/data/excels/RewardPreviewData.java similarity index 70% rename from src/main/java/emu/grasscutter/data/def/RewardPreviewData.java rename to src/main/java/emu/grasscutter/data/excels/RewardPreviewData.java index f971ee1cf..4a783f2b5 100644 --- a/src/main/java/emu/grasscutter/data/def/RewardPreviewData.java +++ b/src/main/java/emu/grasscutter/data/excels/RewardPreviewData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import java.util.Arrays; import java.util.List; @@ -16,28 +16,28 @@ import emu.grasscutter.data.common.ItemParamStringData; @ResourceType(name = "RewardPreviewExcelConfigData.json", loadPriority = LoadPriority.HIGH) public class RewardPreviewData extends GameResource { - private int Id; - private ItemParamStringData[] PreviewItems; - private ItemParamData[] PreviewItemsArray; + private int id; + private ItemParamStringData[] previewItems; + private ItemParamData[] previewItemsArray; @Override public int getId() { - return this.Id; + return this.id; } public ItemParamData[] getPreviewItems() { - return PreviewItemsArray; + return previewItemsArray; } @Override public void onLoad() { - if (this.PreviewItems != null && this.PreviewItems.length > 0) { - this.PreviewItemsArray = Arrays.stream(this.PreviewItems) + if (this.previewItems != null && this.previewItems.length > 0) { + this.previewItemsArray = Arrays.stream(this.previewItems) .filter(d -> d.getId() > 0 && d.getCount() != null && !d.getCount().isEmpty()) .map(ItemParamStringData::toItemParamData) .toArray(size -> new ItemParamData[size]); } else { - this.PreviewItemsArray = new ItemParamData[0]; + this.previewItemsArray = new ItemParamData[0]; } } } diff --git a/src/main/java/emu/grasscutter/data/def/SceneData.java b/src/main/java/emu/grasscutter/data/excels/SceneData.java similarity index 71% rename from src/main/java/emu/grasscutter/data/def/SceneData.java rename to src/main/java/emu/grasscutter/data/excels/SceneData.java index cd1510e1d..a0b9583c8 100644 --- a/src/main/java/emu/grasscutter/data/def/SceneData.java +++ b/src/main/java/emu/grasscutter/data/excels/SceneData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameData; import emu.grasscutter.data.GameResource; @@ -8,22 +8,21 @@ import emu.grasscutter.game.props.SceneType; @ResourceType(name = "SceneExcelConfigData.json") public class SceneData extends GameResource { - private int Id; - private SceneType Type; - private String ScriptData; + private int id; + private SceneType type; + private String scriptData; - @Override public int getId() { - return this.Id; + return this.id; } public SceneType getSceneType() { - return Type; + return type; } public String getScriptData() { - return ScriptData; + return scriptData; } @Override diff --git a/src/main/java/emu/grasscutter/data/def/ShopGoodsData.java b/src/main/java/emu/grasscutter/data/excels/ShopGoodsData.java similarity index 57% rename from src/main/java/emu/grasscutter/data/def/ShopGoodsData.java rename to src/main/java/emu/grasscutter/data/excels/ShopGoodsData.java index 1a4168637..4c0a14b58 100644 --- a/src/main/java/emu/grasscutter/data/def/ShopGoodsData.java +++ b/src/main/java/emu/grasscutter/data/excels/ShopGoodsData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameResource; import emu.grasscutter.data.ResourceType; @@ -9,34 +9,34 @@ import java.util.List; @ResourceType(name = "ShopGoodsExcelConfigData.json") public class ShopGoodsData extends GameResource { - private int GoodsId; - private int ShopType; - private int ItemId; + private int goodsId; + private int shopType; + private int itemId; - private int ItemCount; + private int itemCount; - private int CostScoin; - private int CostHcoin; - private int CostMcoin; + private int costScoin; + private int costHcoin; + private int costMcoin; - private List CostItems; - private int MinPlayerLevel; - private int MaxPlayerLevel; + private List costItems; + private int minPlayerLevel; + private int maxPlayerLevel; - private int BuyLimit; - private int SubTabId; + private int buyLimit; + private int subTabId; - private String RefreshType; - private transient ShopInfo.ShopRefreshType RefreshTypeEnum; + private String refreshType; + private transient ShopInfo.ShopRefreshType refreshTypeEnum; - private int RefreshParam; + private int refreshParam; @Override public void onLoad() { - if (this.RefreshType == null) - this.RefreshTypeEnum = ShopInfo.ShopRefreshType.NONE; + if (this.refreshType == null) + this.refreshTypeEnum = ShopInfo.ShopRefreshType.NONE; else { - this.RefreshTypeEnum = switch (this.RefreshType) { + this.refreshTypeEnum = switch (this.refreshType) { case "SHOP_REFRESH_DAILY" -> ShopInfo.ShopRefreshType.SHOP_REFRESH_DAILY; case "SHOP_REFRESH_WEEKLY" -> ShopInfo.ShopRefreshType.SHOP_REFRESH_WEEKLY; case "SHOP_REFRESH_MONTHLY" -> ShopInfo.ShopRefreshType.SHOP_REFRESH_MONTHLY; @@ -51,58 +51,58 @@ public class ShopGoodsData extends GameResource { } public int getGoodsId() { - return GoodsId; + return goodsId; } public int getShopType() { - return ShopType; + return shopType; } public int getItemId() { - return ItemId; + return itemId; } public int getItemCount() { - return ItemCount; + return itemCount; } public int getCostScoin() { - return CostScoin; + return costScoin; } public int getCostHcoin() { - return CostHcoin; + return costHcoin; } public int getCostMcoin() { - return CostMcoin; + return costMcoin; } public List getCostItems() { - return CostItems; + return costItems; } public int getMinPlayerLevel() { - return MinPlayerLevel; + return minPlayerLevel; } public int getMaxPlayerLevel() { - return MaxPlayerLevel; + return maxPlayerLevel; } public int getBuyLimit() { - return BuyLimit; + return buyLimit; } public int getSubTabId() { - return SubTabId; + return subTabId; } public ShopInfo.ShopRefreshType getRefreshType() { - return RefreshTypeEnum; + return refreshTypeEnum; } public int getRefreshParam() { - return RefreshParam; + return refreshParam; } } diff --git a/src/main/java/emu/grasscutter/data/excels/TowerFloorData.java b/src/main/java/emu/grasscutter/data/excels/TowerFloorData.java new file mode 100644 index 000000000..8ce26d0fb --- /dev/null +++ b/src/main/java/emu/grasscutter/data/excels/TowerFloorData.java @@ -0,0 +1,49 @@ +package emu.grasscutter.data.excels; + +import emu.grasscutter.data.GameResource; +import emu.grasscutter.data.ResourceType; + +@ResourceType(name = "TowerFloorExcelConfigData.json") +public class TowerFloorData extends GameResource { + + private int floorId; + private int floorIndex; + private int levelId; + private int overrideMonsterLevel; + private int teamNum; + private int floorLevelConfigId; + + @Override + public int getId() { + return this.floorId; + } + + @Override + public void onLoad() { + super.onLoad(); + } + + public int getFloorId() { + return floorId; + } + + public int getFloorIndex() { + return floorIndex; + } + + public int getLevelId() { + return levelId; + } + + public int getOverrideMonsterLevel() { + return overrideMonsterLevel; + } + + public int getTeamNum() { + return teamNum; + } + + public int getFloorLevelConfigId() { + return floorLevelConfigId; + } +} diff --git a/src/main/java/emu/grasscutter/data/excels/TowerLevelData.java b/src/main/java/emu/grasscutter/data/excels/TowerLevelData.java new file mode 100644 index 000000000..f5a48c132 --- /dev/null +++ b/src/main/java/emu/grasscutter/data/excels/TowerLevelData.java @@ -0,0 +1,29 @@ +package emu.grasscutter.data.excels; + +import emu.grasscutter.data.GameResource; +import emu.grasscutter.data.ResourceType; + +@ResourceType(name = "TowerLevelExcelConfigData.json") +public class TowerLevelData extends GameResource { + + private int levelId; + private int levelIndex; + private int dungeonId; + + @Override + public int getId() { + return this.getLevelId(); + } + + public int getLevelId() { + return levelId; + } + + public int getLevelIndex() { + return levelIndex; + } + + public int getDungeonId() { + return dungeonId; + } +} diff --git a/src/main/java/emu/grasscutter/data/excels/TowerScheduleData.java b/src/main/java/emu/grasscutter/data/excels/TowerScheduleData.java new file mode 100644 index 000000000..fc8a0cfc2 --- /dev/null +++ b/src/main/java/emu/grasscutter/data/excels/TowerScheduleData.java @@ -0,0 +1,51 @@ +package emu.grasscutter.data.excels; + +import emu.grasscutter.data.GameResource; +import emu.grasscutter.data.ResourceType; + +import java.util.List; + +@ResourceType(name = "TowerScheduleExcelConfigData.json") +public class TowerScheduleData extends GameResource { + private int scheduleId; + private List entranceFloorId; + private List schedules; + private int monthlyLevelConfigId; + + @Override + public int getId() { + return scheduleId; + } + + @Override + public void onLoad() { + super.onLoad(); + this.schedules = this.schedules.stream() + .filter(item -> item.getFloorList().size() > 0) + .toList(); + } + + public int getScheduleId() { + return scheduleId; + } + + public List getEntranceFloorId() { + return entranceFloorId; + } + + public List getSchedules() { + return schedules; + } + + public int getMonthlyLevelConfigId() { + return monthlyLevelConfigId; + } + + public static class ScheduleDetail{ + private List floorList; + + public List getFloorList() { + return floorList; + } + } +} diff --git a/src/main/java/emu/grasscutter/data/def/WeaponCurveData.java b/src/main/java/emu/grasscutter/data/excels/WeaponCurveData.java similarity index 56% rename from src/main/java/emu/grasscutter/data/def/WeaponCurveData.java rename to src/main/java/emu/grasscutter/data/excels/WeaponCurveData.java index 287ce8af6..05e64c8ed 100644 --- a/src/main/java/emu/grasscutter/data/def/WeaponCurveData.java +++ b/src/main/java/emu/grasscutter/data/excels/WeaponCurveData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import java.util.HashMap; import java.util.Map; @@ -10,23 +10,23 @@ import emu.grasscutter.data.common.CurveInfo; @ResourceType(name = "WeaponCurveExcelConfigData.json") public class WeaponCurveData extends GameResource { - private int Level; - private CurveInfo[] CurveInfos; + private int level; + private CurveInfo[] curveInfos; - private Map curveInfos; + private Map curveInfosMap; @Override public int getId() { - return Level; + return level; } public float getMultByProp(String fightProp) { - return curveInfos.getOrDefault(fightProp, 1f); + return curveInfosMap.getOrDefault(fightProp, 1f); } @Override public void onLoad() { - this.curveInfos = new HashMap<>(); - Stream.of(this.CurveInfos).forEach(info -> this.curveInfos.put(info.getType(), info.getValue())); + this.curveInfosMap = new HashMap<>(); + Stream.of(this.curveInfos).forEach(info -> this.curveInfosMap.put(info.getType(), info.getValue())); } } diff --git a/src/main/java/emu/grasscutter/data/def/WeaponLevelData.java b/src/main/java/emu/grasscutter/data/excels/WeaponLevelData.java similarity index 67% rename from src/main/java/emu/grasscutter/data/def/WeaponLevelData.java rename to src/main/java/emu/grasscutter/data/excels/WeaponLevelData.java index 98550b24a..3f69e2145 100644 --- a/src/main/java/emu/grasscutter/data/def/WeaponLevelData.java +++ b/src/main/java/emu/grasscutter/data/excels/WeaponLevelData.java @@ -1,23 +1,23 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameResource; import emu.grasscutter.data.ResourceType; @ResourceType(name = "WeaponLevelExcelConfigData.json") public class WeaponLevelData extends GameResource { - private int Level; - private int[] RequiredExps; + private int level; + private int[] requiredExps; @Override public int getId() { - return this.Level; + return this.level; } public int getLevel() { - return Level; + return level; } public int[] getRequiredExps() { - return RequiredExps; + return requiredExps; } } diff --git a/src/main/java/emu/grasscutter/data/def/WeaponPromoteData.java b/src/main/java/emu/grasscutter/data/excels/WeaponPromoteData.java similarity index 65% rename from src/main/java/emu/grasscutter/data/def/WeaponPromoteData.java rename to src/main/java/emu/grasscutter/data/excels/WeaponPromoteData.java index 8e75b2b7c..ee0306115 100644 --- a/src/main/java/emu/grasscutter/data/def/WeaponPromoteData.java +++ b/src/main/java/emu/grasscutter/data/excels/WeaponPromoteData.java @@ -1,4 +1,4 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import java.util.ArrayList; import emu.grasscutter.data.GameResource; @@ -9,45 +9,45 @@ import emu.grasscutter.data.common.ItemParamData; @ResourceType(name = "WeaponPromoteExcelConfigData.json") public class WeaponPromoteData extends GameResource { - private int WeaponPromoteId; - private int PromoteLevel; - private ItemParamData[] CostItems; - private int CoinCost; - private FightPropData[] AddProps; - private int UnlockMaxLevel; - private int RequiredPlayerLevel; + private int weaponPromoteId; + private int promoteLevel; + private ItemParamData[] costItems; + private int coinCost; + private FightPropData[] addProps; + private int unlockMaxLevel; + private int requiredPlayerLevel; @Override public int getId() { - return (WeaponPromoteId << 8) + PromoteLevel; + return (weaponPromoteId << 8) + promoteLevel; } public int getWeaponPromoteId() { - return WeaponPromoteId; + return weaponPromoteId; } public int getPromoteLevel() { - return PromoteLevel; + return promoteLevel; } public ItemParamData[] getCostItems() { - return CostItems; + return costItems; } public int getCoinCost() { - return CoinCost; + return coinCost; } public FightPropData[] getAddProps() { - return AddProps; + return addProps; } public int getUnlockMaxLevel() { - return UnlockMaxLevel; + return unlockMaxLevel; } public int getRequiredPlayerLevel() { - return RequiredPlayerLevel; + return requiredPlayerLevel; } @Override @@ -60,7 +60,7 @@ public class WeaponPromoteData extends GameResource { } trim.add(itemParam); } - this.CostItems = trim.toArray(new ItemParamData[trim.size()]); + this.costItems = trim.toArray(new ItemParamData[trim.size()]); // Trim fight prop data ArrayList parsed = new ArrayList<>(getAddProps().length); for (FightPropData prop : getAddProps()) { @@ -69,6 +69,6 @@ public class WeaponPromoteData extends GameResource { parsed.add(prop); } } - this.AddProps = parsed.toArray(new FightPropData[parsed.size()]); + this.addProps = parsed.toArray(new FightPropData[parsed.size()]); } } diff --git a/src/main/java/emu/grasscutter/data/def/WorldLevelData.java b/src/main/java/emu/grasscutter/data/excels/WorldLevelData.java similarity index 71% rename from src/main/java/emu/grasscutter/data/def/WorldLevelData.java rename to src/main/java/emu/grasscutter/data/excels/WorldLevelData.java index 3b101f9b8..e31713b67 100644 --- a/src/main/java/emu/grasscutter/data/def/WorldLevelData.java +++ b/src/main/java/emu/grasscutter/data/excels/WorldLevelData.java @@ -1,20 +1,20 @@ -package emu.grasscutter.data.def; +package emu.grasscutter.data.excels; import emu.grasscutter.data.GameResource; import emu.grasscutter.data.ResourceType; @ResourceType(name = "WorldLevelExcelConfigData.json") public class WorldLevelData extends GameResource { - private int Level; - private int MonsterLevel; + private int level; + private int monsterLevel; @Override public int getId() { - return this.Level; + return this.level; } public int getMonsterLevel() { - return MonsterLevel; + return monsterLevel; } @Override diff --git a/src/main/java/emu/grasscutter/game/ability/AbilityManager.java b/src/main/java/emu/grasscutter/game/ability/AbilityManager.java index 658afdd87..078ef1b71 100644 --- a/src/main/java/emu/grasscutter/game/ability/AbilityManager.java +++ b/src/main/java/emu/grasscutter/game/ability/AbilityManager.java @@ -7,10 +7,10 @@ import com.google.protobuf.InvalidProtocolBufferException; import emu.grasscutter.Grasscutter; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.custom.AbilityModifier.AbilityModifierAction; -import emu.grasscutter.data.def.AvatarSkillDepotData; -import emu.grasscutter.data.def.ItemData; -import emu.grasscutter.data.custom.AbilityModifierEntry; +import emu.grasscutter.data.binout.AbilityModifierEntry; +import emu.grasscutter.data.binout.AbilityModifier.AbilityModifierAction; +import emu.grasscutter.data.excels.AvatarSkillDepotData; +import emu.grasscutter.data.excels.ItemData; import emu.grasscutter.game.avatar.Avatar; import emu.grasscutter.game.entity.EntityAvatar; import emu.grasscutter.game.entity.EntityClientGadget; diff --git a/src/main/java/emu/grasscutter/game/avatar/Avatar.java b/src/main/java/emu/grasscutter/game/avatar/Avatar.java index 96a7b8478..588052c42 100644 --- a/src/main/java/emu/grasscutter/game/avatar/Avatar.java +++ b/src/main/java/emu/grasscutter/game/avatar/Avatar.java @@ -17,24 +17,24 @@ import dev.morphia.annotations.PostLoad; import dev.morphia.annotations.PrePersist; import dev.morphia.annotations.Transient; import emu.grasscutter.data.GameData; +import emu.grasscutter.data.binout.OpenConfigEntry; +import emu.grasscutter.data.binout.OpenConfigEntry.SkillPointModifier; import emu.grasscutter.data.common.FightPropData; -import emu.grasscutter.data.custom.OpenConfigEntry; -import emu.grasscutter.data.custom.OpenConfigEntry.SkillPointModifier; -import emu.grasscutter.data.def.AvatarData; -import emu.grasscutter.data.def.AvatarPromoteData; -import emu.grasscutter.data.def.AvatarSkillData; -import emu.grasscutter.data.def.AvatarSkillDepotData; -import emu.grasscutter.data.def.AvatarSkillDepotData.InherentProudSkillOpens; -import emu.grasscutter.data.def.AvatarTalentData; -import emu.grasscutter.data.def.EquipAffixData; -import emu.grasscutter.data.def.ItemData.WeaponProperty; -import emu.grasscutter.data.def.ProudSkillData; -import emu.grasscutter.data.def.ReliquaryAffixData; -import emu.grasscutter.data.def.ReliquaryLevelData; -import emu.grasscutter.data.def.ReliquaryMainPropData; -import emu.grasscutter.data.def.ReliquarySetData; -import emu.grasscutter.data.def.WeaponCurveData; -import emu.grasscutter.data.def.WeaponPromoteData; +import emu.grasscutter.data.excels.AvatarData; +import emu.grasscutter.data.excels.AvatarPromoteData; +import emu.grasscutter.data.excels.AvatarSkillData; +import emu.grasscutter.data.excels.AvatarSkillDepotData; +import emu.grasscutter.data.excels.AvatarTalentData; +import emu.grasscutter.data.excels.EquipAffixData; +import emu.grasscutter.data.excels.ProudSkillData; +import emu.grasscutter.data.excels.ReliquaryAffixData; +import emu.grasscutter.data.excels.ReliquaryLevelData; +import emu.grasscutter.data.excels.ReliquaryMainPropData; +import emu.grasscutter.data.excels.ReliquarySetData; +import emu.grasscutter.data.excels.WeaponCurveData; +import emu.grasscutter.data.excels.WeaponPromoteData; +import emu.grasscutter.data.excels.AvatarSkillDepotData.InherentProudSkillOpens; +import emu.grasscutter.data.excels.ItemData.WeaponProperty; import emu.grasscutter.database.DatabaseHelper; import emu.grasscutter.game.entity.EntityAvatar; import emu.grasscutter.game.inventory.EquipType; diff --git a/src/main/java/emu/grasscutter/game/avatar/AvatarStorage.java b/src/main/java/emu/grasscutter/game/avatar/AvatarStorage.java index de3221473..8feae29c6 100644 --- a/src/main/java/emu/grasscutter/game/avatar/AvatarStorage.java +++ b/src/main/java/emu/grasscutter/game/avatar/AvatarStorage.java @@ -4,8 +4,8 @@ import java.util.Iterator; import java.util.List; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.AvatarData; -import emu.grasscutter.data.def.AvatarSkillDepotData; +import emu.grasscutter.data.excels.AvatarData; +import emu.grasscutter.data.excels.AvatarSkillDepotData; import emu.grasscutter.database.DatabaseHelper; import emu.grasscutter.game.entity.EntityAvatar; import emu.grasscutter.game.inventory.GameItem; diff --git a/src/main/java/emu/grasscutter/game/combine/CombineManger.java b/src/main/java/emu/grasscutter/game/combine/CombineManger.java index 478edfedb..641a69a0c 100644 --- a/src/main/java/emu/grasscutter/game/combine/CombineManger.java +++ b/src/main/java/emu/grasscutter/game/combine/CombineManger.java @@ -1,7 +1,8 @@ package emu.grasscutter.game.combine; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.CombineData; +import emu.grasscutter.data.common.ItemParamData; +import emu.grasscutter.data.excels.CombineData; import emu.grasscutter.game.inventory.ItemType; import emu.grasscutter.game.player.Player; import emu.grasscutter.net.proto.RetcodeOuterClass; @@ -71,7 +72,7 @@ public class CombineManger { CombineResult result = new CombineResult(); result.setMaterial(List.of()); - result.setResult(List.of(new CombineData.CombineItemPair(combineData.getResultItemId(), + result.setResult(List.of(new ItemParamData(combineData.getResultItemId(), combineData.getResultItemCount() * count))); // TODO lucky characters result.setExtra(List.of()); diff --git a/src/main/java/emu/grasscutter/game/combine/CombineResult.java b/src/main/java/emu/grasscutter/game/combine/CombineResult.java index f67a64737..067d55568 100644 --- a/src/main/java/emu/grasscutter/game/combine/CombineResult.java +++ b/src/main/java/emu/grasscutter/game/combine/CombineResult.java @@ -1,44 +1,45 @@ package emu.grasscutter.game.combine; -import emu.grasscutter.data.def.CombineData; - import java.util.List; -public class CombineResult { - private List material; - private List result; - private List extra; - private List back; +import emu.grasscutter.data.common.ItemParamData; +import emu.grasscutter.data.excels.CombineData; - public List getMaterial() { +public class CombineResult { + private List material; + private List result; + private List extra; + private List back; + + public List getMaterial() { return material; } - public void setMaterial(List material) { + public void setMaterial(List material) { this.material = material; } - public List getResult() { + public List getResult() { return result; } - public void setResult(List result) { + public void setResult(List result) { this.result = result; } - public List getExtra() { + public List getExtra() { return extra; } - public void setExtra(List extra) { + public void setExtra(List extra) { this.extra = extra; } - public List getBack() { + public List getBack() { return back; } - public void setBack(List back) { + public void setBack(List back) { this.back = back; } diff --git a/src/main/java/emu/grasscutter/game/drop/DropManager.java b/src/main/java/emu/grasscutter/game/drop/DropManager.java index 38dd2bed8..8908afbcd 100644 --- a/src/main/java/emu/grasscutter/game/drop/DropManager.java +++ b/src/main/java/emu/grasscutter/game/drop/DropManager.java @@ -4,7 +4,7 @@ import com.google.gson.reflect.TypeToken; import emu.grasscutter.Grasscutter; import emu.grasscutter.data.DataLoader; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.ItemData; +import emu.grasscutter.data.excels.ItemData; import emu.grasscutter.game.entity.EntityItem; import emu.grasscutter.game.entity.EntityMonster; import emu.grasscutter.game.inventory.GameItem; diff --git a/src/main/java/emu/grasscutter/game/dungeons/DungeonChallenge.java b/src/main/java/emu/grasscutter/game/dungeons/DungeonChallenge.java index a13f1a611..fbaf26cc5 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/DungeonChallenge.java +++ b/src/main/java/emu/grasscutter/game/dungeons/DungeonChallenge.java @@ -1,7 +1,7 @@ package emu.grasscutter.game.dungeons; import emu.grasscutter.data.common.ItemParamData; -import emu.grasscutter.data.def.DungeonData; +import emu.grasscutter.data.excels.DungeonData; import emu.grasscutter.game.entity.EntityMonster; import emu.grasscutter.game.inventory.GameItem; import emu.grasscutter.game.player.Player; diff --git a/src/main/java/emu/grasscutter/game/dungeons/DungeonManager.java b/src/main/java/emu/grasscutter/game/dungeons/DungeonManager.java index 5c0d1fd27..b2fae2fa4 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/DungeonManager.java +++ b/src/main/java/emu/grasscutter/game/dungeons/DungeonManager.java @@ -3,8 +3,8 @@ package emu.grasscutter.game.dungeons; import emu.grasscutter.GameConstants; import emu.grasscutter.Grasscutter; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.custom.ScenePointEntry; -import emu.grasscutter.data.def.DungeonData; +import emu.grasscutter.data.binout.ScenePointEntry; +import emu.grasscutter.data.excels.DungeonData; import emu.grasscutter.game.player.Player; import emu.grasscutter.game.props.SceneType; import emu.grasscutter.game.quest.enums.QuestTrigger; diff --git a/src/main/java/emu/grasscutter/game/entity/EntityAvatar.java b/src/main/java/emu/grasscutter/game/entity/EntityAvatar.java index 7195cd411..478f7e268 100644 --- a/src/main/java/emu/grasscutter/game/entity/EntityAvatar.java +++ b/src/main/java/emu/grasscutter/game/entity/EntityAvatar.java @@ -2,8 +2,8 @@ package emu.grasscutter.game.entity; import emu.grasscutter.GameConstants; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.AvatarData; -import emu.grasscutter.data.def.AvatarSkillDepotData; +import emu.grasscutter.data.excels.AvatarData; +import emu.grasscutter.data.excels.AvatarSkillDepotData; import emu.grasscutter.game.avatar.Avatar; import emu.grasscutter.game.inventory.EquipType; import emu.grasscutter.game.inventory.GameItem; diff --git a/src/main/java/emu/grasscutter/game/entity/EntityGadget.java b/src/main/java/emu/grasscutter/game/entity/EntityGadget.java index 73ea750eb..5eb9c8fab 100644 --- a/src/main/java/emu/grasscutter/game/entity/EntityGadget.java +++ b/src/main/java/emu/grasscutter/game/entity/EntityGadget.java @@ -4,7 +4,7 @@ import java.util.Arrays; import java.util.List; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.GadgetData; +import emu.grasscutter.data.excels.GadgetData; import emu.grasscutter.game.props.EntityIdType; import emu.grasscutter.game.props.EntityType; import emu.grasscutter.game.props.PlayerProperty; diff --git a/src/main/java/emu/grasscutter/game/entity/EntityItem.java b/src/main/java/emu/grasscutter/game/entity/EntityItem.java index 0fa8bb169..791b230a1 100644 --- a/src/main/java/emu/grasscutter/game/entity/EntityItem.java +++ b/src/main/java/emu/grasscutter/game/entity/EntityItem.java @@ -1,6 +1,6 @@ package emu.grasscutter.game.entity; -import emu.grasscutter.data.def.ItemData; +import emu.grasscutter.data.excels.ItemData; import emu.grasscutter.game.inventory.GameItem; import emu.grasscutter.game.player.Player; import emu.grasscutter.game.props.EntityIdType; diff --git a/src/main/java/emu/grasscutter/game/entity/EntityMonster.java b/src/main/java/emu/grasscutter/game/entity/EntityMonster.java index f34e60160..bd9785497 100644 --- a/src/main/java/emu/grasscutter/game/entity/EntityMonster.java +++ b/src/main/java/emu/grasscutter/game/entity/EntityMonster.java @@ -2,8 +2,8 @@ package emu.grasscutter.game.entity; import emu.grasscutter.data.GameData; import emu.grasscutter.data.common.PropGrowCurve; -import emu.grasscutter.data.def.MonsterCurveData; -import emu.grasscutter.data.def.MonsterData; +import emu.grasscutter.data.excels.MonsterCurveData; +import emu.grasscutter.data.excels.MonsterData; import emu.grasscutter.game.dungeons.DungeonChallenge; import emu.grasscutter.game.player.Player; import emu.grasscutter.game.props.EntityIdType; diff --git a/src/main/java/emu/grasscutter/game/gacha/GachaManager.java b/src/main/java/emu/grasscutter/game/gacha/GachaManager.java index 7ebfe8ebe..4ebce55e8 100644 --- a/src/main/java/emu/grasscutter/game/gacha/GachaManager.java +++ b/src/main/java/emu/grasscutter/game/gacha/GachaManager.java @@ -18,7 +18,7 @@ import emu.grasscutter.Grasscutter; import emu.grasscutter.data.DataLoader; import emu.grasscutter.data.GameData; import emu.grasscutter.data.common.ItemParamData; -import emu.grasscutter.data.def.ItemData; +import emu.grasscutter.data.excels.ItemData; import emu.grasscutter.database.DatabaseHelper; import emu.grasscutter.game.avatar.Avatar; import emu.grasscutter.game.gacha.GachaBanner.BannerType; diff --git a/src/main/java/emu/grasscutter/game/inventory/GameItem.java b/src/main/java/emu/grasscutter/game/inventory/GameItem.java index 9fbc1e8c1..9aae598ff 100644 --- a/src/main/java/emu/grasscutter/game/inventory/GameItem.java +++ b/src/main/java/emu/grasscutter/game/inventory/GameItem.java @@ -15,9 +15,9 @@ import dev.morphia.annotations.Transient; import emu.grasscutter.data.GameData; import emu.grasscutter.data.GameDepot; -import emu.grasscutter.data.def.ItemData; -import emu.grasscutter.data.def.ReliquaryAffixData; -import emu.grasscutter.data.def.ReliquaryMainPropData; +import emu.grasscutter.data.excels.ItemData; +import emu.grasscutter.data.excels.ReliquaryAffixData; +import emu.grasscutter.data.excels.ReliquaryMainPropData; import emu.grasscutter.database.DatabaseHelper; import emu.grasscutter.game.player.Player; import emu.grasscutter.game.props.FightProperty; diff --git a/src/main/java/emu/grasscutter/game/inventory/Inventory.java b/src/main/java/emu/grasscutter/game/inventory/Inventory.java index 38b3eb67c..e175aef01 100644 --- a/src/main/java/emu/grasscutter/game/inventory/Inventory.java +++ b/src/main/java/emu/grasscutter/game/inventory/Inventory.java @@ -8,10 +8,10 @@ import java.util.List; import emu.grasscutter.GameConstants; import emu.grasscutter.data.GameData; import emu.grasscutter.data.common.ItemParamData; -import emu.grasscutter.data.def.AvatarCostumeData; -import emu.grasscutter.data.def.AvatarData; -import emu.grasscutter.data.def.AvatarFlycloakData; -import emu.grasscutter.data.def.ItemData; +import emu.grasscutter.data.excels.AvatarCostumeData; +import emu.grasscutter.data.excels.AvatarData; +import emu.grasscutter.data.excels.AvatarFlycloakData; +import emu.grasscutter.data.excels.ItemData; import emu.grasscutter.database.DatabaseHelper; import emu.grasscutter.game.avatar.AvatarStorage; import emu.grasscutter.game.avatar.Avatar; diff --git a/src/main/java/emu/grasscutter/game/managers/EnergyManager/EnergyManager.java b/src/main/java/emu/grasscutter/game/managers/EnergyManager/EnergyManager.java index 46aeabbe8..bd03e7e57 100644 --- a/src/main/java/emu/grasscutter/game/managers/EnergyManager/EnergyManager.java +++ b/src/main/java/emu/grasscutter/game/managers/EnergyManager/EnergyManager.java @@ -3,9 +3,9 @@ package emu.grasscutter.game.managers.EnergyManager; import emu.grasscutter.Grasscutter; import emu.grasscutter.data.DataLoader; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.AvatarSkillDepotData; -import emu.grasscutter.data.def.ItemData; -import emu.grasscutter.data.def.MonsterData.HpDrops; +import emu.grasscutter.data.excels.AvatarSkillDepotData; +import emu.grasscutter.data.excels.ItemData; +import emu.grasscutter.data.excels.MonsterData.HpDrops; import emu.grasscutter.game.avatar.Avatar; import emu.grasscutter.game.entity.EntityAvatar; import emu.grasscutter.game.entity.EntityClientGadget; diff --git a/src/main/java/emu/grasscutter/game/managers/InventoryManager.java b/src/main/java/emu/grasscutter/game/managers/InventoryManager.java index 6efe945aa..f32299ee8 100644 --- a/src/main/java/emu/grasscutter/game/managers/InventoryManager.java +++ b/src/main/java/emu/grasscutter/game/managers/InventoryManager.java @@ -7,17 +7,17 @@ import java.util.Map; import java.util.stream.Collectors; import emu.grasscutter.data.GameData; +import emu.grasscutter.data.binout.OpenConfigEntry; +import emu.grasscutter.data.binout.OpenConfigEntry.SkillPointModifier; import emu.grasscutter.data.common.ItemParamData; -import emu.grasscutter.data.custom.OpenConfigEntry; -import emu.grasscutter.data.custom.OpenConfigEntry.SkillPointModifier; -import emu.grasscutter.data.def.AvatarPromoteData; -import emu.grasscutter.data.def.AvatarSkillData; -import emu.grasscutter.data.def.AvatarSkillDepotData; -import emu.grasscutter.data.def.ItemData; -import emu.grasscutter.data.def.WeaponPromoteData; -import emu.grasscutter.data.def.AvatarSkillDepotData.InherentProudSkillOpens; -import emu.grasscutter.data.def.AvatarTalentData; -import emu.grasscutter.data.def.ProudSkillData; +import emu.grasscutter.data.excels.AvatarPromoteData; +import emu.grasscutter.data.excels.AvatarSkillData; +import emu.grasscutter.data.excels.AvatarSkillDepotData; +import emu.grasscutter.data.excels.AvatarTalentData; +import emu.grasscutter.data.excels.ItemData; +import emu.grasscutter.data.excels.ProudSkillData; +import emu.grasscutter.data.excels.WeaponPromoteData; +import emu.grasscutter.data.excels.AvatarSkillDepotData.InherentProudSkillOpens; import emu.grasscutter.game.avatar.Avatar; import emu.grasscutter.game.inventory.GameItem; import emu.grasscutter.game.inventory.ItemType; diff --git a/src/main/java/emu/grasscutter/game/player/Player.java b/src/main/java/emu/grasscutter/game/player/Player.java index cbaca0a52..1a1b03b9b 100644 --- a/src/main/java/emu/grasscutter/game/player/Player.java +++ b/src/main/java/emu/grasscutter/game/player/Player.java @@ -3,7 +3,7 @@ package emu.grasscutter.game.player; import dev.morphia.annotations.*; import emu.grasscutter.GameConstants; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.PlayerLevelData; +import emu.grasscutter.data.excels.PlayerLevelData; import emu.grasscutter.database.DatabaseHelper; import emu.grasscutter.game.Account; import emu.grasscutter.game.CoopRequest; diff --git a/src/main/java/emu/grasscutter/game/player/PlayerCodex.java b/src/main/java/emu/grasscutter/game/player/PlayerCodex.java index a310f4772..191fc4112 100644 --- a/src/main/java/emu/grasscutter/game/player/PlayerCodex.java +++ b/src/main/java/emu/grasscutter/game/player/PlayerCodex.java @@ -3,8 +3,8 @@ package emu.grasscutter.game.player; import dev.morphia.annotations.Entity; import dev.morphia.annotations.Transient; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.CodexAnimalData; -import emu.grasscutter.data.def.CodexReliquaryData; +import emu.grasscutter.data.excels.CodexAnimalData; +import emu.grasscutter.data.excels.CodexReliquaryData; import emu.grasscutter.game.entity.EntityMonster; import emu.grasscutter.game.entity.GameEntity; import emu.grasscutter.game.inventory.GameItem; diff --git a/src/main/java/emu/grasscutter/game/player/TeamManager.java b/src/main/java/emu/grasscutter/game/player/TeamManager.java index 3c2237cae..f969e694e 100644 --- a/src/main/java/emu/grasscutter/game/player/TeamManager.java +++ b/src/main/java/emu/grasscutter/game/player/TeamManager.java @@ -5,7 +5,7 @@ import java.util.*; import dev.morphia.annotations.Entity; import dev.morphia.annotations.Transient; import emu.grasscutter.GameConstants; -import emu.grasscutter.data.def.AvatarSkillDepotData; +import emu.grasscutter.data.excels.AvatarSkillDepotData; import emu.grasscutter.game.avatar.Avatar; import emu.grasscutter.game.entity.EntityAvatar; import emu.grasscutter.game.entity.EntityBaseGadget; diff --git a/src/main/java/emu/grasscutter/game/quest/GameMainQuest.java b/src/main/java/emu/grasscutter/game/quest/GameMainQuest.java index 6659cd583..4dc31a5ae 100644 --- a/src/main/java/emu/grasscutter/game/quest/GameMainQuest.java +++ b/src/main/java/emu/grasscutter/game/quest/GameMainQuest.java @@ -11,8 +11,8 @@ import dev.morphia.annotations.Id; import dev.morphia.annotations.Indexed; import dev.morphia.annotations.Transient; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.custom.MainQuestData; -import emu.grasscutter.data.def.RewardData; +import emu.grasscutter.data.binout.MainQuestData; +import emu.grasscutter.data.excels.RewardData; import emu.grasscutter.database.DatabaseHelper; import emu.grasscutter.game.player.Player; import emu.grasscutter.game.props.ActionReason; diff --git a/src/main/java/emu/grasscutter/game/quest/GameQuest.java b/src/main/java/emu/grasscutter/game/quest/GameQuest.java index 3caf950ba..56cce0d8d 100644 --- a/src/main/java/emu/grasscutter/game/quest/GameQuest.java +++ b/src/main/java/emu/grasscutter/game/quest/GameQuest.java @@ -3,10 +3,10 @@ package emu.grasscutter.game.quest; import dev.morphia.annotations.Entity; import dev.morphia.annotations.Transient; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.custom.MainQuestData; -import emu.grasscutter.data.custom.MainQuestData.SubQuestData; -import emu.grasscutter.data.def.QuestData; -import emu.grasscutter.data.def.QuestData.QuestCondition; +import emu.grasscutter.data.binout.MainQuestData; +import emu.grasscutter.data.binout.MainQuestData.SubQuestData; +import emu.grasscutter.data.excels.QuestData; +import emu.grasscutter.data.excels.QuestData.QuestCondition; import emu.grasscutter.game.player.Player; import emu.grasscutter.game.quest.enums.LogicType; import emu.grasscutter.game.quest.enums.QuestState; diff --git a/src/main/java/emu/grasscutter/game/quest/QuestManager.java b/src/main/java/emu/grasscutter/game/quest/QuestManager.java index 14fc3054b..a436a69dc 100644 --- a/src/main/java/emu/grasscutter/game/quest/QuestManager.java +++ b/src/main/java/emu/grasscutter/game/quest/QuestManager.java @@ -9,8 +9,8 @@ import java.util.function.Consumer; import java.util.function.Function; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.QuestData; -import emu.grasscutter.data.def.QuestData.QuestCondition; +import emu.grasscutter.data.excels.QuestData; +import emu.grasscutter.data.excels.QuestData.QuestCondition; import emu.grasscutter.database.DatabaseHelper; import emu.grasscutter.game.player.Player; import emu.grasscutter.game.quest.enums.QuestTrigger; diff --git a/src/main/java/emu/grasscutter/game/quest/ServerQuestHandler.java b/src/main/java/emu/grasscutter/game/quest/ServerQuestHandler.java index 36c929ab3..b48194dd9 100644 --- a/src/main/java/emu/grasscutter/game/quest/ServerQuestHandler.java +++ b/src/main/java/emu/grasscutter/game/quest/ServerQuestHandler.java @@ -5,7 +5,7 @@ import java.util.Set; import org.reflections.Reflections; import emu.grasscutter.Grasscutter; -import emu.grasscutter.data.def.QuestData.QuestCondition; +import emu.grasscutter.data.excels.QuestData.QuestCondition; import emu.grasscutter.game.quest.handlers.QuestBaseHandler; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; diff --git a/src/main/java/emu/grasscutter/game/quest/conditions/BaseCondition.java b/src/main/java/emu/grasscutter/game/quest/conditions/BaseCondition.java index d94e60c22..86df72b34 100644 --- a/src/main/java/emu/grasscutter/game/quest/conditions/BaseCondition.java +++ b/src/main/java/emu/grasscutter/game/quest/conditions/BaseCondition.java @@ -1,7 +1,7 @@ package emu.grasscutter.game.quest.conditions; -import emu.grasscutter.data.def.QuestData.QuestCondition; import emu.grasscutter.game.quest.QuestValue; +import emu.grasscutter.data.excels.QuestData.QuestCondition; import emu.grasscutter.game.quest.GameQuest; import emu.grasscutter.game.quest.enums.QuestTrigger; import emu.grasscutter.game.quest.handlers.QuestBaseHandler; diff --git a/src/main/java/emu/grasscutter/game/quest/conditions/ConditionPlayerLevelEqualGreater.java b/src/main/java/emu/grasscutter/game/quest/conditions/ConditionPlayerLevelEqualGreater.java index 3e3db87fb..e15ce8ed7 100644 --- a/src/main/java/emu/grasscutter/game/quest/conditions/ConditionPlayerLevelEqualGreater.java +++ b/src/main/java/emu/grasscutter/game/quest/conditions/ConditionPlayerLevelEqualGreater.java @@ -1,7 +1,7 @@ package emu.grasscutter.game.quest.conditions; -import emu.grasscutter.data.def.QuestData.QuestCondition; import emu.grasscutter.game.quest.QuestValue; +import emu.grasscutter.data.excels.QuestData.QuestCondition; import emu.grasscutter.game.quest.GameQuest; import emu.grasscutter.game.quest.enums.QuestTrigger; import emu.grasscutter.game.quest.handlers.QuestBaseHandler; diff --git a/src/main/java/emu/grasscutter/game/quest/conditions/ConditionStateEqual.java b/src/main/java/emu/grasscutter/game/quest/conditions/ConditionStateEqual.java index 37ecc6d30..bcf90145b 100644 --- a/src/main/java/emu/grasscutter/game/quest/conditions/ConditionStateEqual.java +++ b/src/main/java/emu/grasscutter/game/quest/conditions/ConditionStateEqual.java @@ -1,7 +1,7 @@ package emu.grasscutter.game.quest.conditions; -import emu.grasscutter.data.def.QuestData.QuestCondition; import emu.grasscutter.game.quest.QuestValue; +import emu.grasscutter.data.excels.QuestData.QuestCondition; import emu.grasscutter.game.quest.GameQuest; import emu.grasscutter.game.quest.enums.QuestTrigger; import emu.grasscutter.game.quest.handlers.QuestBaseHandler; diff --git a/src/main/java/emu/grasscutter/game/quest/content/BaseContent.java b/src/main/java/emu/grasscutter/game/quest/content/BaseContent.java index ce700896d..e2c7abdc8 100644 --- a/src/main/java/emu/grasscutter/game/quest/content/BaseContent.java +++ b/src/main/java/emu/grasscutter/game/quest/content/BaseContent.java @@ -1,7 +1,7 @@ package emu.grasscutter.game.quest.content; -import emu.grasscutter.data.def.QuestData.QuestCondition; import emu.grasscutter.game.quest.QuestValue; +import emu.grasscutter.data.excels.QuestData.QuestCondition; import emu.grasscutter.game.quest.GameQuest; import emu.grasscutter.game.quest.enums.QuestTrigger; import emu.grasscutter.game.quest.handlers.QuestBaseHandler; diff --git a/src/main/java/emu/grasscutter/game/quest/content/ContentCompleteTalk.java b/src/main/java/emu/grasscutter/game/quest/content/ContentCompleteTalk.java index 3423519ec..3c17bccde 100644 --- a/src/main/java/emu/grasscutter/game/quest/content/ContentCompleteTalk.java +++ b/src/main/java/emu/grasscutter/game/quest/content/ContentCompleteTalk.java @@ -1,7 +1,7 @@ package emu.grasscutter.game.quest.content; -import emu.grasscutter.data.def.QuestData.QuestCondition; import emu.grasscutter.game.quest.QuestValue; +import emu.grasscutter.data.excels.QuestData.QuestCondition; import emu.grasscutter.game.quest.GameQuest; import emu.grasscutter.game.quest.enums.QuestTrigger; import emu.grasscutter.game.quest.handlers.QuestBaseHandler; diff --git a/src/main/java/emu/grasscutter/game/quest/content/ContentEnterDungeon.java b/src/main/java/emu/grasscutter/game/quest/content/ContentEnterDungeon.java index e00e59f9a..e331f48e0 100644 --- a/src/main/java/emu/grasscutter/game/quest/content/ContentEnterDungeon.java +++ b/src/main/java/emu/grasscutter/game/quest/content/ContentEnterDungeon.java @@ -1,7 +1,7 @@ package emu.grasscutter.game.quest.content; -import emu.grasscutter.data.def.QuestData.QuestCondition; import emu.grasscutter.game.quest.QuestValue; +import emu.grasscutter.data.excels.QuestData.QuestCondition; import emu.grasscutter.game.quest.GameQuest; import emu.grasscutter.game.quest.enums.QuestTrigger; import emu.grasscutter.game.quest.handlers.QuestBaseHandler; diff --git a/src/main/java/emu/grasscutter/game/quest/content/ContentFinishPlot.java b/src/main/java/emu/grasscutter/game/quest/content/ContentFinishPlot.java index d8e0cd4e5..305808112 100644 --- a/src/main/java/emu/grasscutter/game/quest/content/ContentFinishPlot.java +++ b/src/main/java/emu/grasscutter/game/quest/content/ContentFinishPlot.java @@ -1,7 +1,7 @@ package emu.grasscutter.game.quest.content; -import emu.grasscutter.data.def.QuestData.QuestCondition; import emu.grasscutter.game.quest.QuestValue; +import emu.grasscutter.data.excels.QuestData.QuestCondition; import emu.grasscutter.game.quest.GameQuest; import emu.grasscutter.game.quest.enums.QuestTrigger; import emu.grasscutter.game.quest.handlers.QuestBaseHandler; diff --git a/src/main/java/emu/grasscutter/game/quest/handlers/QuestBaseHandler.java b/src/main/java/emu/grasscutter/game/quest/handlers/QuestBaseHandler.java index 5a3514200..815906f81 100644 --- a/src/main/java/emu/grasscutter/game/quest/handlers/QuestBaseHandler.java +++ b/src/main/java/emu/grasscutter/game/quest/handlers/QuestBaseHandler.java @@ -1,6 +1,6 @@ package emu.grasscutter.game.quest.handlers; -import emu.grasscutter.data.def.QuestData.QuestCondition; +import emu.grasscutter.data.excels.QuestData.QuestCondition; import emu.grasscutter.game.quest.GameQuest; public abstract class QuestBaseHandler { diff --git a/src/main/java/emu/grasscutter/game/shop/ShopInfo.java b/src/main/java/emu/grasscutter/game/shop/ShopInfo.java index ebbeea2cd..4902dbb65 100644 --- a/src/main/java/emu/grasscutter/game/shop/ShopInfo.java +++ b/src/main/java/emu/grasscutter/game/shop/ShopInfo.java @@ -1,7 +1,7 @@ package emu.grasscutter.game.shop; import emu.grasscutter.data.common.ItemParamData; -import emu.grasscutter.data.def.ShopGoodsData; +import emu.grasscutter.data.excels.ShopGoodsData; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/emu/grasscutter/game/shop/ShopManager.java b/src/main/java/emu/grasscutter/game/shop/ShopManager.java index 03c868f6b..1010e14a8 100644 --- a/src/main/java/emu/grasscutter/game/shop/ShopManager.java +++ b/src/main/java/emu/grasscutter/game/shop/ShopManager.java @@ -5,7 +5,7 @@ import emu.grasscutter.Grasscutter; import emu.grasscutter.data.DataLoader; import emu.grasscutter.data.GameData; import emu.grasscutter.data.common.ItemParamData; -import emu.grasscutter.data.def.ShopGoodsData; +import emu.grasscutter.data.excels.ShopGoodsData; import emu.grasscutter.server.game.GameServer; import emu.grasscutter.utils.Utils; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; diff --git a/src/main/java/emu/grasscutter/game/tower/TowerManager.java b/src/main/java/emu/grasscutter/game/tower/TowerManager.java index 790efc7f6..df9292566 100644 --- a/src/main/java/emu/grasscutter/game/tower/TowerManager.java +++ b/src/main/java/emu/grasscutter/game/tower/TowerManager.java @@ -3,7 +3,7 @@ package emu.grasscutter.game.tower; import dev.morphia.annotations.Entity; import dev.morphia.annotations.Transient; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.TowerLevelData; +import emu.grasscutter.data.excels.TowerLevelData; import emu.grasscutter.game.dungeons.DungeonSettleListener; import emu.grasscutter.game.dungeons.TowerDungeonSettleListener; import emu.grasscutter.game.player.Player; @@ -73,7 +73,7 @@ public class TowerManager { this.currentLevelId = GameData.getTowerLevelDataMap().values().stream() .filter(x -> x.getLevelId() == floorData.getLevelId() && x.getLevelIndex() == 1) .findFirst() - .map(TowerLevelData::getID) + .map(TowerLevelData::getId) .orElse(0); if (entryScene == 0){ diff --git a/src/main/java/emu/grasscutter/game/tower/TowerScheduleManager.java b/src/main/java/emu/grasscutter/game/tower/TowerScheduleManager.java index 6d4f94db9..a2b8c0396 100644 --- a/src/main/java/emu/grasscutter/game/tower/TowerScheduleManager.java +++ b/src/main/java/emu/grasscutter/game/tower/TowerScheduleManager.java @@ -3,7 +3,7 @@ package emu.grasscutter.game.tower; import emu.grasscutter.Grasscutter; import emu.grasscutter.data.DataLoader; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.TowerScheduleData; +import emu.grasscutter.data.excels.TowerScheduleData; import emu.grasscutter.server.game.GameServer; import java.io.FileReader; diff --git a/src/main/java/emu/grasscutter/game/world/Scene.java b/src/main/java/emu/grasscutter/game/world/Scene.java index e568a20ae..5e2e0c1ea 100644 --- a/src/main/java/emu/grasscutter/game/world/Scene.java +++ b/src/main/java/emu/grasscutter/game/world/Scene.java @@ -2,7 +2,7 @@ package emu.grasscutter.game.world; import emu.grasscutter.data.GameData; import emu.grasscutter.data.GameDepot; -import emu.grasscutter.data.def.*; +import emu.grasscutter.data.excels.*; import emu.grasscutter.game.dungeons.DungeonChallenge; import emu.grasscutter.game.dungeons.DungeonSettleListener; import emu.grasscutter.game.entity.*; diff --git a/src/main/java/emu/grasscutter/game/world/World.java b/src/main/java/emu/grasscutter/game/world/World.java index b461c8caf..ac6ab4a72 100644 --- a/src/main/java/emu/grasscutter/game/world/World.java +++ b/src/main/java/emu/grasscutter/game/world/World.java @@ -12,8 +12,8 @@ import emu.grasscutter.game.props.EnterReason; import emu.grasscutter.game.props.EntityIdType; import emu.grasscutter.game.props.SceneType; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.DungeonData; -import emu.grasscutter.data.def.SceneData; +import emu.grasscutter.data.excels.DungeonData; +import emu.grasscutter.data.excels.SceneData; import emu.grasscutter.net.packet.BasePacket; import emu.grasscutter.net.proto.EnterTypeOuterClass.EnterType; import emu.grasscutter.scripts.data.SceneConfig; diff --git a/src/main/java/emu/grasscutter/scripts/service/ScriptMonsterSpawnService.java b/src/main/java/emu/grasscutter/scripts/service/ScriptMonsterSpawnService.java index fdc4941f2..e8e0d0668 100644 --- a/src/main/java/emu/grasscutter/scripts/service/ScriptMonsterSpawnService.java +++ b/src/main/java/emu/grasscutter/scripts/service/ScriptMonsterSpawnService.java @@ -1,8 +1,8 @@ package emu.grasscutter.scripts.service; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.MonsterData; -import emu.grasscutter.data.def.WorldLevelData; +import emu.grasscutter.data.excels.MonsterData; +import emu.grasscutter.data.excels.WorldLevelData; import emu.grasscutter.game.entity.EntityMonster; import emu.grasscutter.scripts.SceneScriptManager; import emu.grasscutter.scripts.constants.EventType; diff --git a/src/main/java/emu/grasscutter/server/http/documentation/GachaMappingRequestHandler.java b/src/main/java/emu/grasscutter/server/http/documentation/GachaMappingRequestHandler.java index ef7298410..4810978ad 100644 --- a/src/main/java/emu/grasscutter/server/http/documentation/GachaMappingRequestHandler.java +++ b/src/main/java/emu/grasscutter/server/http/documentation/GachaMappingRequestHandler.java @@ -5,8 +5,8 @@ import static emu.grasscutter.Configuration.RESOURCE; import com.google.gson.reflect.TypeToken; import emu.grasscutter.Grasscutter; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.AvatarData; -import emu.grasscutter.data.def.ItemData; +import emu.grasscutter.data.excels.AvatarData; +import emu.grasscutter.data.excels.ItemData; import emu.grasscutter.utils.Utils; import static emu.grasscutter.Configuration.DOCUMENT_LANGUAGE; import express.http.Request; diff --git a/src/main/java/emu/grasscutter/server/http/documentation/HandbookRequestHandler.java b/src/main/java/emu/grasscutter/server/http/documentation/HandbookRequestHandler.java index faf533024..8153368a0 100644 --- a/src/main/java/emu/grasscutter/server/http/documentation/HandbookRequestHandler.java +++ b/src/main/java/emu/grasscutter/server/http/documentation/HandbookRequestHandler.java @@ -7,10 +7,10 @@ import com.google.gson.reflect.TypeToken; import emu.grasscutter.Grasscutter; import emu.grasscutter.command.CommandMap; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.AvatarData; -import emu.grasscutter.data.def.ItemData; -import emu.grasscutter.data.def.MonsterData; -import emu.grasscutter.data.def.SceneData; +import emu.grasscutter.data.excels.AvatarData; +import emu.grasscutter.data.excels.ItemData; +import emu.grasscutter.data.excels.MonsterData; +import emu.grasscutter.data.excels.SceneData; import emu.grasscutter.utils.FileUtils; import emu.grasscutter.utils.Utils; import express.http.Request; diff --git a/src/main/java/emu/grasscutter/server/packet/recv/HandlerAvatarFetterLevelRewardReq.java b/src/main/java/emu/grasscutter/server/packet/recv/HandlerAvatarFetterLevelRewardReq.java index fa760a7a8..5ce8d74cf 100644 --- a/src/main/java/emu/grasscutter/server/packet/recv/HandlerAvatarFetterLevelRewardReq.java +++ b/src/main/java/emu/grasscutter/server/packet/recv/HandlerAvatarFetterLevelRewardReq.java @@ -1,7 +1,7 @@ package emu.grasscutter.server.packet.recv; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.RewardData; +import emu.grasscutter.data.excels.RewardData; import emu.grasscutter.game.avatar.Avatar; import emu.grasscutter.game.inventory.GameItem; import emu.grasscutter.game.props.ActionReason; diff --git a/src/main/java/emu/grasscutter/server/packet/recv/HandlerCombineReq.java b/src/main/java/emu/grasscutter/server/packet/recv/HandlerCombineReq.java index 23a522b25..c5b52fab0 100644 --- a/src/main/java/emu/grasscutter/server/packet/recv/HandlerCombineReq.java +++ b/src/main/java/emu/grasscutter/server/packet/recv/HandlerCombineReq.java @@ -1,6 +1,7 @@ package emu.grasscutter.server.packet.recv; -import emu.grasscutter.data.def.CombineData; +import emu.grasscutter.data.common.ItemParamData; +import emu.grasscutter.data.excels.CombineData; import emu.grasscutter.net.packet.Opcodes; import emu.grasscutter.net.packet.PacketHandler; import emu.grasscutter.net.packet.PacketOpcodes; @@ -35,7 +36,7 @@ public class HandlerCombineReq extends PacketHandler { toItemParamList(result.getBack()))); } - private List toItemParamList(List list){ + private List toItemParamList(List list){ return list.stream() .map(item -> ItemParamOuterClass.ItemParam.newBuilder() .setItemId(item.getId()) diff --git a/src/main/java/emu/grasscutter/server/packet/recv/HandlerPersonalSceneJumpReq.java b/src/main/java/emu/grasscutter/server/packet/recv/HandlerPersonalSceneJumpReq.java index 98c6984ee..246dcbaa5 100644 --- a/src/main/java/emu/grasscutter/server/packet/recv/HandlerPersonalSceneJumpReq.java +++ b/src/main/java/emu/grasscutter/server/packet/recv/HandlerPersonalSceneJumpReq.java @@ -1,7 +1,7 @@ package emu.grasscutter.server.packet.recv; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.custom.ScenePointEntry; +import emu.grasscutter.data.binout.ScenePointEntry; import emu.grasscutter.net.packet.Opcodes; import emu.grasscutter.net.packet.PacketHandler; import emu.grasscutter.net.packet.PacketOpcodes; diff --git a/src/main/java/emu/grasscutter/server/packet/recv/HandlerSceneTransToPointReq.java b/src/main/java/emu/grasscutter/server/packet/recv/HandlerSceneTransToPointReq.java index 65783d01b..209dacdbb 100644 --- a/src/main/java/emu/grasscutter/server/packet/recv/HandlerSceneTransToPointReq.java +++ b/src/main/java/emu/grasscutter/server/packet/recv/HandlerSceneTransToPointReq.java @@ -1,7 +1,7 @@ package emu.grasscutter.server.packet.recv; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.custom.ScenePointEntry; +import emu.grasscutter.data.binout.ScenePointEntry; import emu.grasscutter.net.packet.Opcodes; import emu.grasscutter.net.packet.PacketOpcodes; import emu.grasscutter.net.proto.SceneTransToPointReqOuterClass.SceneTransToPointReq; diff --git a/src/main/java/emu/grasscutter/server/packet/recv/HandlerWidgetDoBagReq.java b/src/main/java/emu/grasscutter/server/packet/recv/HandlerWidgetDoBagReq.java index d9cee08de..c73f98fbd 100644 --- a/src/main/java/emu/grasscutter/server/packet/recv/HandlerWidgetDoBagReq.java +++ b/src/main/java/emu/grasscutter/server/packet/recv/HandlerWidgetDoBagReq.java @@ -2,7 +2,7 @@ package emu.grasscutter.server.packet.recv; import emu.grasscutter.Grasscutter; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.def.GadgetData; +import emu.grasscutter.data.excels.GadgetData; import emu.grasscutter.game.entity.EntityVehicle; import emu.grasscutter.game.entity.GameEntity; import emu.grasscutter.game.props.LifeState; diff --git a/src/main/java/emu/grasscutter/server/packet/send/PacketSceneTransToPointRsp.java b/src/main/java/emu/grasscutter/server/packet/send/PacketSceneTransToPointRsp.java index b421dfe40..17350c628 100644 --- a/src/main/java/emu/grasscutter/server/packet/send/PacketSceneTransToPointRsp.java +++ b/src/main/java/emu/grasscutter/server/packet/send/PacketSceneTransToPointRsp.java @@ -1,7 +1,7 @@ package emu.grasscutter.server.packet.send; import emu.grasscutter.data.GameData; -import emu.grasscutter.data.custom.ScenePointEntry; +import emu.grasscutter.data.binout.ScenePointEntry; import emu.grasscutter.game.player.Player; import emu.grasscutter.net.packet.BasePacket; import emu.grasscutter.net.packet.PacketOpcodes; diff --git a/src/main/java/emu/grasscutter/tools/Tools.java b/src/main/java/emu/grasscutter/tools/Tools.java index 5b0f563ee..1a1ac2196 100644 --- a/src/main/java/emu/grasscutter/tools/Tools.java +++ b/src/main/java/emu/grasscutter/tools/Tools.java @@ -19,12 +19,12 @@ import emu.grasscutter.command.Command; import emu.grasscutter.command.CommandMap; import emu.grasscutter.data.GameData; import emu.grasscutter.data.ResourceLoader; -import emu.grasscutter.data.custom.MainQuestData; -import emu.grasscutter.data.def.AvatarData; -import emu.grasscutter.data.def.ItemData; -import emu.grasscutter.data.def.MonsterData; -import emu.grasscutter.data.def.QuestData; -import emu.grasscutter.data.def.SceneData; +import emu.grasscutter.data.binout.MainQuestData; +import emu.grasscutter.data.excels.AvatarData; +import emu.grasscutter.data.excels.ItemData; +import emu.grasscutter.data.excels.MonsterData; +import emu.grasscutter.data.excels.QuestData; +import emu.grasscutter.data.excels.SceneData; import emu.grasscutter.utils.Utils; import static emu.grasscutter.utils.Language.translate; diff --git a/src/main/java/emu/grasscutter/utils/Position.java b/src/main/java/emu/grasscutter/utils/Position.java index f2ecb6915..b9b75e25b 100644 --- a/src/main/java/emu/grasscutter/utils/Position.java +++ b/src/main/java/emu/grasscutter/utils/Position.java @@ -2,6 +2,8 @@ package emu.grasscutter.utils; import java.io.Serializable; +import com.google.gson.annotations.SerializedName; + import dev.morphia.annotations.Entity; import emu.grasscutter.net.proto.VectorOuterClass.Vector; @@ -9,8 +11,13 @@ import emu.grasscutter.net.proto.VectorOuterClass.Vector; public class Position implements Serializable { private static final long serialVersionUID = -2001232313615923575L; + @SerializedName(value="x", alternate={"_x", "X"}) private float x; + + @SerializedName(value="y", alternate={"_y", "Y"}) private float y; + + @SerializedName(value="z", alternate={"_z", "Z"}) private float z; public Position() { diff --git a/src/main/java/emu/grasscutter/utils/Utils.java b/src/main/java/emu/grasscutter/utils/Utils.java index e2ca98ca1..80449ea0f 100644 --- a/src/main/java/emu/grasscutter/utils/Utils.java +++ b/src/main/java/emu/grasscutter/utils/Utils.java @@ -273,43 +273,6 @@ public final class Utils { } return stringBuilder.toString(); } - /** - * Switch properties from upper case to lower case? - */ - public static Map switchPropertiesUpperLowerCase(Map objMap, Class cls) { - Map map = new HashMap<>(objMap.size()); - for (String key : objMap.keySet()) { - try { - char c = key.charAt(0); - if (c >= 'a' && c <= 'z') { - try { - cls.getDeclaredField(key); - map.put(key, objMap.get(key)); - } catch (NoSuchFieldException e) { - String s1 = String.valueOf(c).toUpperCase(); - String after = key.length() > 1 ? s1 + key.substring(1) : s1; - cls.getDeclaredField(after); - map.put(after, objMap.get(key)); - } - } else if (c >= 'A' && c <= 'Z') { - try { - cls.getDeclaredField(key); - map.put(key, objMap.get(key)); - } catch (NoSuchFieldException e) { - String s1 = String.valueOf(c).toLowerCase(); - String after = key.length() > 1 ? s1 + key.substring(1) : s1; - cls.getDeclaredField(after); - map.put(after, objMap.get(key)); - } - } - } catch (NoSuchFieldException e) { - map.put(key, objMap.get(key)); - } - } - - return map; - } - /** * Performs a linear interpolation using a table of fixed points to create an effective piecewise f(x) = y function. * @param x