Commit 9e0d6538 authored by AnimeGitB's avatar AnimeGitB
Browse files

Lombokify some more getters

parent 02deeb28
......@@ -14,28 +14,29 @@ import emu.grasscutter.utils.Utils;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.IntArrayList;
import it.unimi.dsi.fastutil.ints.IntList;
import lombok.Getter;
@ResourceType(name = "AvatarExcelConfigData.json", loadPriority = LoadPriority.LOW)
public class AvatarData extends GameResource {
private String iconName;
private String bodyType;
private String qualityType;
private int chargeEfficiency;
private int initialWeapon;
private WeaponType weaponType;
private String imageName;
private int avatarPromoteId;
private String cutsceneShow;
private int skillDepotId;
private int staminaRecoverSpeed;
private List<String> candSkillDepotIds;
private String avatarIdentityType;
private List<Integer> avatarPromoteRewardLevelList;
private List<Integer> avatarPromoteRewardIdList;
private long nameTextMapHash;
private String iconName;
@Getter private String bodyType;
@Getter private String qualityType;
@Getter private int chargeEfficiency;
@Getter private int initialWeapon;
@Getter private WeaponType weaponType;
@Getter private String imageName;
@Getter private int avatarPromoteId;
@Getter private String cutsceneShow;
@Getter private int skillDepotId;
@Getter private int staminaRecoverSpeed;
@Getter private List<String> candSkillDepotIds;
@Getter private String avatarIdentityType;
@Getter private List<Integer> avatarPromoteRewardLevelList;
@Getter private List<Integer> avatarPromoteRewardIdList;
@Getter private long nameTextMapHash;
private float hpBase;
private float attackBase;
private float defenseBase;
......@@ -44,85 +45,25 @@ public class AvatarData extends GameResource {
private List<PropGrowCurve> propGrowCurves;
private int id;
// Transient
private String name;
@Getter private String name;
private Int2ObjectMap<String> growthCurveMap;
private float[] hpGrowthCurve;
private float[] attackGrowthCurve;
private float[] defenseGrowthCurve;
private AvatarSkillDepotData skillDepot;
private IntList abilities;
@Getter private AvatarSkillDepotData skillDepot;
@Getter private IntList abilities;
@Getter private List<Integer> fetters;
@Getter private int nameCardRewardId;
@Getter private int nameCardId;
private List<Integer> fetters;
private int nameCardRewardId;
private int nameCardId;
@Override
public int getId(){
return this.id;
}
public String getName() {
return name;
}
public String getBodyType(){
return this.bodyType;
}
public String getQualityType(){
return this.qualityType;
}
public int getChargeEfficiency(){
return this.chargeEfficiency;
}
public int getInitialWeapon(){
return this.initialWeapon;
}
public WeaponType getWeaponType(){
return this.weaponType;
}
public String getImageName(){
return this.imageName;
}
public int getAvatarPromoteId(){
return this.avatarPromoteId;
}
public String getCutsceneShow(){
return this.cutsceneShow;
}
public int getSkillDepotId(){
return this.skillDepotId;
}
public int getStaminaRecoverSpeed(){
return this.staminaRecoverSpeed;
}
public List<String> getCandSkillDepotIds(){
return this.candSkillDepotIds;
}
public String getAvatarIdentityType(){
return this.avatarIdentityType;
}
public List<Integer> getAvatarPromoteRewardLevelList(){
return this.avatarPromoteRewardLevelList;
}
public List<Integer> getAvatarPromoteRewardIdList(){
return this.avatarPromoteRewardIdList;
}
public float getBaseHp(int level){
try {
......@@ -168,30 +109,6 @@ public class AvatarData extends GameResource {
return curveData.getCurveInfos().getOrDefault(growCurve, 1f);
}
public long getNameTextMapHash(){
return this.nameTextMapHash;
}
public AvatarSkillDepotData getSkillDepot() {
return skillDepot;
}
public IntList getAbilities() {
return abilities;
}
public List<Integer> getFetters() {
return fetters;
}
public int getNameCardRewardId() {
return nameCardRewardId;
}
public int getNameCardId() {
return nameCardId;
}
@Override
public void onLoad() {
this.skillDepot = GameData.getAvatarSkillDepotDataMap().get(this.skillDepotId);
......
......@@ -6,7 +6,6 @@ import emu.grasscutter.data.GameData;
import emu.grasscutter.data.GameDepot;
import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceLoader.AvatarConfig;
import emu.grasscutter.data.ResourceLoader.AvatarConfigAbility;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.data.ResourceType.LoadPriority;
import emu.grasscutter.data.binout.AbilityEmbryoEntry;
......@@ -14,81 +13,34 @@ import emu.grasscutter.game.props.ElementType;
import emu.grasscutter.utils.Utils;
import it.unimi.dsi.fastutil.ints.IntArrayList;
import it.unimi.dsi.fastutil.ints.IntList;
import lombok.Getter;
@ResourceType(name = "AvatarSkillDepotExcelConfigData.json", loadPriority = LoadPriority.HIGH)
public class AvatarSkillDepotData extends GameResource {
private int id;
private int energySkill;
private int attackModeSkill;
@Getter private int energySkill;
@Getter private int attackModeSkill;
private List<Integer> skills;
private List<Integer> subSkills;
private List<String> extraAbilities;
private List<Integer> talents;
private List<InherentProudSkillOpens> inherentProudSkillOpens;
@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 String talentStarName;
private String skillDepotAbilityGroup;
@Getter private String talentStarName;
@Getter private String skillDepotAbilityGroup;
// Transient
private AvatarSkillData energySkillData;
private ElementType elementType;
private IntList abilities;
@Getter private AvatarSkillData energySkillData;
@Getter private ElementType elementType;
@Getter private IntList abilities;
@Override
public int getId(){
return this.id;
}
public int getEnergySkill(){
return this.energySkill;
}
public List<Integer> getSkills(){
return this.skills;
}
public List<Integer> getSubSkills(){
return this.subSkills;
}
public int getAttackModeSkill(){
return this.attackModeSkill;
}
public List<String> getExtraAbilities(){
return this.extraAbilities;
}
public List<Integer> getTalents(){
return this.talents;
}
public String getTalentStarName(){
return this.talentStarName;
}
public List<InherentProudSkillOpens> getInherentProudSkillOpens(){
return this.inherentProudSkillOpens;
}
public String getSkillDepotAbilityGroup(){
return this.skillDepotAbilityGroup;
}
public AvatarSkillData getEnergySkillData() {
return this.energySkillData;
}
public ElementType getElementType() {
return elementType;
}
public IntList getAbilities() {
return abilities;
}
public void setAbilities(AbilityEmbryoEntry info) {
this.abilities = new IntArrayList(info.getAbilities().length);
for (String ability : info.getAbilities()) {
......@@ -100,8 +52,8 @@ public class AvatarSkillDepotData extends GameResource {
public void onLoad() {
// Set energy skill data
this.energySkillData = GameData.getAvatarSkillDataMap().get(this.energySkill);
if (getEnergySkillData() != null) {
this.elementType = getEnergySkillData().getCostElemType();
if (this.energySkillData != null) {
this.elementType = this.energySkillData.getCostElemType();
} else {
this.elementType = ElementType.None;
}
......@@ -116,15 +68,7 @@ public class AvatarSkillDepotData extends GameResource {
}
public static class InherentProudSkillOpens {
private int proudSkillGroupId;
private int needAvatarPromoteLevel;
public int getProudSkillGroupId(){
return this.proudSkillGroupId;
}
public int getNeedAvatarPromoteLevel(){
return this.needAvatarPromoteLevel;
}
@Getter private int proudSkillGroupId;
@Getter private int needAvatarPromoteLevel;
}
}
......@@ -7,6 +7,7 @@ import java.util.stream.Stream;
import emu.grasscutter.utils.Utils;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import lombok.Getter;
public enum ElementType {
None (0, FightProperty.FIGHT_PROP_CUR_FIRE_ENERGY, FightProperty.FIGHT_PROP_MAX_FIRE_ENERGY),
......@@ -21,12 +22,12 @@ public enum ElementType {
AntiFire (9, FightProperty.FIGHT_PROP_CUR_FIRE_ENERGY, FightProperty.FIGHT_PROP_MAX_FIRE_ENERGY),
Default (255, FightProperty.FIGHT_PROP_CUR_FIRE_ENERGY, FightProperty.FIGHT_PROP_MAX_FIRE_ENERGY, 10801, "TeamResonance_AllDifferent");
private final int value;
private final int teamResonanceId;
private final FightProperty curEnergyProp;
private final FightProperty maxEnergyProp;
private int depotValue;
private final int configHash;
@Getter private final int value;
@Getter private final int teamResonanceId;
@Getter private final FightProperty curEnergyProp;
@Getter private final FightProperty maxEnergyProp;
@Getter private int depotValue;
@Getter private final int configHash;
private static final Int2ObjectMap<ElementType> map = new Int2ObjectOpenHashMap<>();
private static final Map<String, ElementType> stringMap = new HashMap<>();
......@@ -58,30 +59,6 @@ public enum ElementType {
this.depotValue = depotValue;
}
public int getValue() {
return value;
}
public FightProperty getCurEnergyProp() {
return curEnergyProp;
}
public FightProperty getMaxEnergyProp() {
return maxEnergyProp;
}
public int getDepotValue() {
return depotValue;
}
public int getTeamResonanceId() {
return teamResonanceId;
}
public int getConfigHash() {
return configHash;
}
public static ElementType getTypeByValue(int value) {
return map.getOrDefault(value, None);
}
......
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