Commit a30f16b0 authored by AnimeGitB's avatar AnimeGitB
Browse files

Clean up excels

parent 65915b76
......@@ -13,15 +13,12 @@ import java.util.List;
@Getter
@FieldDefaults(level = AccessLevel.PRIVATE)
public class ActivityWatcherData extends GameResource {
@Getter(onMethod = @__(@Override))
int id;
int rewardID;
int progress;
WatcherTrigger triggerConfig;
@Override
public int getId() {
return this.id;
}
@Override
public void onLoad() {
triggerConfig.paramList = triggerConfig.paramList.stream().filter(x -> !x.isBlank()).toList();
......
......@@ -44,6 +44,7 @@ public class AvatarData extends GameResource {
private float criticalHurt;
private List<PropGrowCurve> propGrowCurves;
@Getter(onMethod = @__(@Override))
private int id;
// Transient
......@@ -60,11 +61,6 @@ public class AvatarData extends GameResource {
@Getter private int nameCardRewardId;
@Getter private int nameCardId;
@Override
public int getId() {
return this.id;
}
public float getBaseHp(int level) {
try {
return this.hpBase * this.hpGrowthCurve[level - 1];
......
......@@ -7,26 +7,18 @@ import emu.grasscutter.game.props.ElementType;
import lombok.Getter;
@ResourceType(name = "AvatarSkillExcelConfigData.json", loadPriority = LoadPriority.HIGHEST)
@Getter
public class AvatarSkillData extends GameResource {
@Getter(onMethod = @__(@Override))
private int id;
@Getter private float cdTime;
@Getter private int costElemVal;
@Getter private int maxChargeNum;
@Getter private int triggerID;
@Getter private boolean isAttackCameraLock;
@Getter private int proudSkillGroupId;
@Getter private ElementType costElemType;
@Getter private long nameTextMapHash;
@Getter private long descTextMapHash;
@Getter private String abilityName;
@Override
public int getId() {
return this.id;
}
@Override
public void onLoad() {
}
private float cdTime;
private int costElemVal;
private int maxChargeNum;
private int triggerID;
private boolean isAttackCameraLock;
private int proudSkillGroupId;
private ElementType costElemType;
private long nameTextMapHash;
private long descTextMapHash;
private String abilityName;
}
......@@ -18,31 +18,27 @@ import it.unimi.dsi.fastutil.ints.IntList;
import lombok.Getter;
@ResourceType(name = "AvatarSkillDepotExcelConfigData.json", loadPriority = LoadPriority.HIGH)
@Getter
public class AvatarSkillDepotData extends GameResource {
@Getter(onMethod = @__(@Override))
private int id;
@Getter private int energySkill;
@Getter private int attackModeSkill;
private int energySkill;
private int attackModeSkill;
@Getter private List<Integer> skills;
@Getter private List<Integer> subSkills;
@Getter private List<String> extraAbilities;
@Getter private List<Integer> talents;
@Getter private List<InherentProudSkillOpens> inherentProudSkillOpens;
private List<Integer> skills;
private List<Integer> subSkills;
private List<String> extraAbilities;
private List<Integer> talents;
private List<InherentProudSkillOpens> inherentProudSkillOpens;
@Getter private String talentStarName;
@Getter private String skillDepotAbilityGroup;
private String talentStarName;
private String skillDepotAbilityGroup;
// Transient
@Getter private AvatarSkillData energySkillData;
@Getter private ElementType elementType;
@Getter private IntList abilities;
@Getter private int talentCostItemId;
@Override
public int getId() {
return this.id;
}
private AvatarSkillData energySkillData;
private ElementType elementType;
private IntList abilities;
private int talentCostItemId;
public void setAbilities(AbilityEmbryoEntry info) {
this.abilities = new IntArrayList(info.getAbilities().length);
......@@ -77,9 +73,10 @@ public class AvatarSkillDepotData extends GameResource {
.ifPresent(itemId -> this.talentCostItemId = itemId);
}
@Getter
public static class InherentProudSkillOpens {
@Getter private int proudSkillGroupId;
@Getter private int needAvatarPromoteLevel;
private int proudSkillGroupId;
private int needAvatarPromoteLevel;
}
public IntStream getSkillsAndEnergySkill() {
......
......@@ -9,16 +9,14 @@ import emu.grasscutter.data.ResourceType;
import emu.grasscutter.game.props.BattlePassMissionRefreshType;
import emu.grasscutter.game.props.WatcherTriggerType;
import emu.grasscutter.net.proto.BattlePassMissionOuterClass.BattlePassMission.MissionStatus;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.FieldDefaults;
@ResourceType(name = {"BattlePassMissionExcelConfigData.json"})
@Getter
public class BattlePassMissionData extends GameResource {
private int addPoint;
@Getter(onMethod = @__(@Override))
private int id;
private int addPoint;
private int scheduleId;
private int progress;
private TriggerConfig triggerConfig;
......@@ -26,11 +24,6 @@ public class BattlePassMissionData extends GameResource {
private transient Set<Integer> mainParams;
@Override
public int getId() {
return this.id;
}
public WatcherTriggerType getTriggerType() {
return this.getTriggerConfig().getTriggerType();
}
......
......@@ -7,40 +7,39 @@ import emu.grasscutter.data.ResourceType;
import lombok.Getter;
@ResourceType(name = "BlossomRefreshExcelConfigData.json")
@Getter
public class BlossomRefreshExcelConfigData extends GameResource {
@Getter(onMethod = @__(@Override))
private int id;
// Map details
@Getter private long nameTextMapHash;
@Getter private long descTextMapHash;
@Getter private String icon;
@Getter private String clientShowType; // BLOSSOM_SHOWTYPE_CHALLENGE, BLOSSOM_SHOWTYPE_NPCTALK
private long nameTextMapHash;
private long descTextMapHash;
private String icon;
private String clientShowType; // BLOSSOM_SHOWTYPE_CHALLENGE, BLOSSOM_SHOWTYPE_NPCTALK
// Refresh details
@Getter private String refreshType; // Leyline blossoms, magical ore outcrops
@Getter private int refreshCount; // Number of entries to spawn at refresh (1 for each leyline type for each city, 4 for magical ore for each city)
@Getter private String refreshTime; // Server time-of-day to refresh at
@Getter private RefreshCond[] refreshCondVec; // AR requirements etc.
private String refreshType; // Leyline blossoms, magical ore outcrops
private int refreshCount; // Number of entries to spawn at refresh (1 for each leyline type for each city, 4 for magical ore for each city)
private String refreshTime; // Server time-of-day to refresh at
private RefreshCond[] refreshCondVec; // AR requirements etc.
@Getter private int cityId;
@Getter private int blossomChestId; // 1 for mora, 2 for exp
@Getter private Drop[] dropVec;
private int cityId;
private int blossomChestId; // 1 for mora, 2 for exp
private Drop[] dropVec;
// Unknown details
// @Getter private int reviseLevel;
// @Getter private int campUpdateNeedCount; // Always 1 if specified
@Override
public int getId() {
return id;
}
@Getter
public static class Drop {
@Getter int dropId;
@Getter int previewReward;
int dropId;
int previewReward;
}
@Getter
public static class RefreshCond {
@Getter String type;
@Getter List<Integer> param;
String type;
List<Integer> param;
}
}
......@@ -8,27 +8,23 @@ import lombok.Setter;
import lombok.experimental.FieldDefaults;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ResourceType(name = "ChapterExcelConfigData.json")
@Getter
@Setter
@Setter // TODO: remove on next API break
@FieldDefaults(level = AccessLevel.PRIVATE)
public class ChapterData extends GameResource {
@Getter(onMethod = @__(@Override))
int id;
int beginQuestId;
int endQuestId;
int needPlayerLevel;
// Why public? TODO: privatise next API break
public static final Map<Integer, ChapterData> beginQuestChapterMap = new HashMap<>();
public static final Map<Integer, ChapterData> endQuestChapterMap = new HashMap<>();
@Override
public int getId() {
return this.id;
}
@Override
public void onLoad() {
beginQuestChapterMap.put(beginQuestId, this);
......
......@@ -22,9 +22,4 @@ public class CityData extends GameResource {
public int getId() {
return this.cityId;
}
@Override
public void onLoad() {
super.onLoad();
}
}
......@@ -7,18 +7,15 @@ import emu.grasscutter.data.ResourceType;
import lombok.Getter;
@ResourceType(name = {"AnimalCodexExcelConfigData.json"})
@Getter
public class CodexAnimalData extends GameResource {
@Getter(onMethod = @__(@Override))
private int Id;
@Getter private String type;
@Getter private int describeId;
@Getter private int sortOrder;
private String type;
private int describeId;
private int sortOrder;
@SerializedName(value="countType", alternate={"OCCLHPBCDGL"})
@Getter private CountType countType;
@Override
public int getId() {
return Id;
}
private CountType countType;
public enum CountType {
CODEX_COUNT_TYPE_KILL,
......
......@@ -8,19 +8,15 @@ import lombok.Getter;
import java.util.List;
@ResourceType(name = {"CompoundExcelConfigData.json"},loadPriority = ResourceType.LoadPriority.LOW)
@Getter
public class CompoundData extends GameResource {
@Getter(onMethod = @__(@Override))
private int id;
@Override
public int getId() {return this.id;}
@Getter private int groupId;
@Getter private int rankLevel;
@Getter private boolean isDefaultUnlocked;
@Getter private int costTime;
@Getter private int queueSize;
@Getter private List<ItemParamData> inputVec;
@Getter private List<ItemParamData> outputVec;
@Override
public void onLoad(){}
private int groupId;
private int rankLevel;
private boolean isDefaultUnlocked;
private int costTime;
private int queueSize;
private List<ItemParamData> inputVec;
private List<ItemParamData> outputVec;
}
......@@ -9,21 +9,15 @@ import emu.grasscutter.data.common.ItemParamData;
import lombok.Getter;
@ResourceType(name = {"CookRecipeExcelConfigData.json"}, loadPriority = LoadPriority.LOW)
@Getter
public class CookRecipeData extends GameResource {
@Getter(onMethod = @__(@Override))
private int id;
@Getter private int rankLevel;
@Getter boolean isDefaultUnlocked;
@Getter int maxProficiency;
private int rankLevel;
private boolean isDefaultUnlocked;
private int maxProficiency;
@Getter List<ItemParamData> qualityOutputVec;
@Getter List<ItemParamData> inputVec;
@Override
public int getId() {
return this.id;
}
@Override
public void onLoad() {
}
private List<ItemParamData> qualityOutputVec;
private List<ItemParamData> inputVec;
}
......@@ -7,9 +7,11 @@ import emu.grasscutter.data.ResourceType;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import lombok.Getter;
@ResourceType(name = "DailyDungeonConfigData.json")
public class DailyDungeonData extends GameResource {
@Getter(onMethod = @__(@Override))
private int id;
private int[] monday;
private int[] tuesday;
......@@ -26,11 +28,6 @@ public class DailyDungeonData extends GameResource {
this.map = new Int2ObjectOpenHashMap<>();
}
@Override
public int getId() {
return this.id;
}
public int[] getDungeonsByDay(int day) {
return map.getOrDefault(day, empty);
}
......
......@@ -3,46 +3,23 @@ package emu.grasscutter.data.excels;
import emu.grasscutter.data.GameData;
import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.game.props.SceneType;
import lombok.Getter;
@ResourceType(name = "DungeonExcelConfigData.json")
public class DungeonData extends GameResource {
@Getter(onMethod = @__(@Override))
private int id;
private int sceneId;
private int showLevel;
@Getter private int sceneId;
@Getter private int showLevel;
private int passRewardPreviewID;
private String involveType; // TODO enum
private RewardPreviewData previewData;
private int statueCostID;
private int statueCostCount;
@Override
public int getId() {
return this.id;
}
@Getter private int statueCostID;
@Getter private int statueCostCount;
public int getSceneId() {
return sceneId;
}
public int getShowLevel() {
return showLevel;
}
public RewardPreviewData getRewardPreview() {
return previewData;
}
public int getStatueCostID() {
return statueCostID;
}
public int getStatueCostCount() {
return statueCostCount;
}
public RewardPreviewData getRewardPreview() {return previewData;}
@Override
public void onLoad() {
......
......@@ -7,19 +7,10 @@ import lombok.Setter;
@ResourceType(name = "DungeonEntryExcelConfigData.json")
@Getter
@Setter
@Setter // TODO: remove this next API break
public class DungeonEntryData extends GameResource {
@Getter(onMethod = @__(@Override))
private int id;
private int dungeonEntryId;
private int sceneId;
private int id;
@Override
public int getId() {
return this.id;
}
@Override
public void onLoad() {
}
}
......@@ -6,9 +6,12 @@ import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.data.ResourceType.LoadPriority;
import emu.grasscutter.data.common.ItemParamData;
import lombok.Getter;
@ResourceType(name = {"ForgeExcelConfigData.json"}, loadPriority = LoadPriority.HIGHEST)
@Getter
public class ForgeData extends GameResource {
@Getter(onMethod = @__(@Override))
private int id;
private int playerLevel;
private int forgeType;
......@@ -21,57 +24,4 @@ public class ForgeData extends GameResource {
private int priority;
private int forgePoint;
private List<ItemParamData> materialItems;
@Override
public int getId() {
return this.id;
}
public int getPlayerLevel() {
return playerLevel;
}
public int getForgeType() {
return forgeType;
}
public int getResultItemId() {
return resultItemId;
}
public int getResultItemCount() {
return resultItemCount;
}
public int getForgeTime() {
return forgeTime;
}
public int getQueueNum() {
return queueNum;
}
public int getScoinCost() {
return scoinCost;
}
public int getPriority() {
return priority;
}
public int getForgePoint() {
return forgePoint;
}
public List<ItemParamData> getMaterialItems() {
return materialItems;
}
public int getShowItemId() {
return showItemId;
}
@Override
public void onLoad() {
}
}
......@@ -3,9 +3,12 @@ package emu.grasscutter.data.excels;
import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.game.props.EntityType;
import lombok.Getter;
@ResourceType(name = "GadgetExcelConfigData.json")
@Getter
public class GadgetData extends GameResource {
@Getter(onMethod = @__(@Override))
private int id;
private EntityType type;
......@@ -15,42 +18,4 @@ public class GadgetData extends GameResource {
private String itemJsonName;
private long nameTextMapHash;
private int campID;
@Override
public int getId() {
return this.id;
}
public EntityType getType() {
return type;
}
public String getJsonName() {
return jsonName;
}
public boolean isInteractive() {
return isInteractive;
}
public String[] getTags() {
return tags;
}
public String getItemJsonName() {
return itemJsonName;
}
public long getNameTextMapHash() {
return nameTextMapHash;
}
public int getCampID() {
return campID;
}
@Override
public void onLoad() {
}
}
......@@ -29,9 +29,4 @@ public class HomeWorldLevelData extends GameResource {
public int getId() {
return level;
}
@Override
public void onLoad() {
super.onLoad();
}
}
......@@ -4,7 +4,6 @@ import emu.grasscutter.data.GameData;
import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType;
import lombok.AccessLevel;
import lombok.Data;
import lombok.Getter;
import lombok.experimental.FieldDefaults;
......@@ -14,6 +13,7 @@ import java.util.List;
@Getter
@FieldDefaults(level = AccessLevel.PRIVATE)
public class InvestigationMonsterData extends GameResource {
@Getter(onMethod = @__(@Override))
int id;
int cityId;
List<Integer> monsterIdList;
......@@ -23,10 +23,6 @@ public class InvestigationMonsterData extends GameResource {
String monsterCategory;
CityData cityData;
@Override
public int getId() {
return this.id;
}
@Override
public void onLoad() {
......
......@@ -25,6 +25,7 @@ import lombok.Getter;
@Getter
public class ItemData extends GameResource {
// Main
@Getter(onMethod = @__(@Override))
private int id;
private int stackLimit = 1;
private int maxUseCount;
......@@ -87,11 +88,6 @@ public class ItemData extends GameResource {
// Custom
private transient IntSet addPropLevelSet;
@Override
public int getId() {
return this.id;
}
public WeaponProperty[] getWeaponProperties() {
return this.weaponProp;
}
......
......@@ -3,33 +3,14 @@ package emu.grasscutter.data.excels;
import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.data.ResourceType.LoadPriority;
import lombok.Getter;
@ResourceType(name = "MonsterDescribeExcelConfigData.json", loadPriority = LoadPriority.HIGH)
@Getter
public class MonsterDescribeData extends GameResource {
@Getter(onMethod = @__(@Override))
private int id;
private long nameTextMapHash;
private int titleID;
private int specialNameLabID;
@Override
public int getId() {
return id;
}
public long getNameTextMapHash() {
return nameTextMapHash;
}
public int getTitleID() {
return titleID;
}
public int getSpecialNameLabID() {
return specialNameLabID;
}
@Override
public void onLoad() {
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment