From 49483dd607258bd8c11f2df2abfc82bca9bb965d Mon Sep 17 00:00:00 2001 From: KingRainbow44 Date: Sun, 21 May 2023 21:32:48 -0400 Subject: [PATCH] Make more fields in excels accessible --- .../grasscutter/data/common/PointData.java | 2 ++ .../data/excels/world/WorldAreaData.java | 36 ++++++++++--------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/main/java/emu/grasscutter/data/common/PointData.java b/src/main/java/emu/grasscutter/data/common/PointData.java index 608bcbd8a..892300d05 100644 --- a/src/main/java/emu/grasscutter/data/common/PointData.java +++ b/src/main/java/emu/grasscutter/data/common/PointData.java @@ -12,6 +12,8 @@ import lombok.Setter; public final class PointData { @Getter @Setter private int id; + @Getter private int areaId; + private String $type; @Getter private Position tranPos; @Getter private Position pos; diff --git a/src/main/java/emu/grasscutter/data/excels/world/WorldAreaData.java b/src/main/java/emu/grasscutter/data/excels/world/WorldAreaData.java index 9309aa102..af999a72a 100644 --- a/src/main/java/emu/grasscutter/data/excels/world/WorldAreaData.java +++ b/src/main/java/emu/grasscutter/data/excels/world/WorldAreaData.java @@ -1,30 +1,34 @@ package emu.grasscutter.data.excels.world; +import com.google.gson.annotations.SerializedName; import emu.grasscutter.data.GameResource; import emu.grasscutter.data.ResourceType; import emu.grasscutter.game.props.ElementType; +import lombok.Getter; @ResourceType(name = "WorldAreaConfigData.json") public class WorldAreaData extends GameResource { private int ID; - private int AreaID1; - private int AreaID2; - private int SceneID; - private ElementType elementType; + @Getter private ElementType elementType; + + @Getter + @SerializedName("AreaNameTextMapHash") + private long textMapHash; + + @Getter + @SerializedName("AreaID1") + private int parentArea; + + @Getter + @SerializedName("AreaID2") + private int childArea; + + @Getter + @SerializedName("SceneID") + private int sceneId; @Override public int getId() { - return (this.AreaID2 << 16) + this.AreaID1; + return (this.childArea << 16) + this.parentArea; } - - public int getSceneID() { - return this.SceneID; - } - - public ElementType getElementType() { - return this.elementType; - } - - @Override - public void onLoad() {} }