Commit 7925d1cd authored by Melledy's avatar Melledy
Browse files

Initial commit

parents
package emu.grasscutter.data.def;
import emu.grasscutter.data.GenshinResource;
import emu.grasscutter.data.ResourceType;
@ResourceType(name = "AvatarLevelExcelConfigData.json")
public class AvatarLevelData extends GenshinResource {
private int Level;
private int Exp;
@Override
public int getId() {
return this.Level;
}
public int getLevel() {
return Level;
}
public int getExp() {
return Exp;
}
}
package emu.grasscutter.data.def;
import java.util.ArrayList;
import emu.grasscutter.data.GenshinResource;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.data.common.FightPropData;
import emu.grasscutter.data.common.ItemParamData;
@ResourceType(name = "AvatarPromoteExcelConfigData.json")
public class AvatarPromoteData extends GenshinResource {
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;
}
public int getAvatarPromoteId() {
return AvatarPromoteId;
}
public int getPromoteLevel() {
return PromoteLevel;
}
public ItemParamData[] getCostItems() {
return CostItems;
}
public int getCoinCost() {
return ScoinCost;
}
public FightPropData[] getAddProps() {
return AddProps;
}
public int getUnlockMaxLevel() {
return UnlockMaxLevel;
}
public int getRequiredPlayerLevel() {
return RequiredPlayerLevel;
}
@Override
public void onLoad() {
// Trim item params
ArrayList<ItemParamData> trim = new ArrayList<>(getAddProps().length);
for (ItemParamData itemParam : getCostItems()) {
if (itemParam.getId() == 0) {
continue;
}
trim.add(itemParam);
}
this.CostItems = trim.toArray(new ItemParamData[trim.size()]);
// Trim fight prop data (just in case)
ArrayList<FightPropData> parsed = new ArrayList<>(getAddProps().length);
for (FightPropData prop : getAddProps()) {
if (prop.getPropType() != null && prop.getValue() != 0f) {
prop.onLoad();
parsed.add(prop);
}
}
this.AddProps = parsed.toArray(new FightPropData[parsed.size()]);
}
}
package emu.grasscutter.data.def;
import java.util.List;
import emu.grasscutter.data.GenshinResource;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.data.ResourceType.LoadPriority;
@ResourceType(name = "AvatarSkillExcelConfigData.json", loadPriority = LoadPriority.HIGHEST)
public class AvatarSkillData extends GenshinResource {
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<Float> 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<Float> 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() {
}
}
package emu.grasscutter.data.def;
import java.util.List;
import emu.grasscutter.data.GenshinData;
import emu.grasscutter.data.GenshinResource;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.data.ResourceType.LoadPriority;
import emu.grasscutter.data.custom.AbilityEmbryoEntry;
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;
@ResourceType(name = "AvatarSkillDepotExcelConfigData.json", loadPriority = LoadPriority.HIGH)
public class AvatarSkillDepotData extends GenshinResource {
private int Id;
private int EnergySkill;
private int AttackModeSkill;
private List<Integer> Skills;
private List<Integer> SubSkills;
private List<String> ExtraAbilities;
private List<Integer> Talents;
private List<InherentProudSkillOpens> InherentProudSkillOpens;
private String TalentStarName;
private String SkillDepotAbilityGroup;
private AvatarSkillData energySkillData;
private ElementType elementType;
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()) {
this.abilities.add(Utils.abilityHash(ability));
}
}
@Override
public void onLoad() {
this.energySkillData = GenshinData.getAvatarSkillDataMap().get(this.EnergySkill);
if (getEnergySkillData() != null) {
this.elementType = ElementType.getTypeByName(getEnergySkillData().getCostElemType());
} else {
this.elementType = ElementType.None;
}
}
public static class InherentProudSkillOpens {
private int ProudSkillGroupId;
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;
}
public int getNeedAvatarPromoteLevel(){
return this.NeedAvatarPromoteLevel;
}
}
}
package emu.grasscutter.data.def;
import java.util.ArrayList;
import emu.grasscutter.data.GenshinResource;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.data.ResourceType.LoadPriority;
import emu.grasscutter.data.common.FightPropData;
@ResourceType(name = "AvatarTalentExcelConfigData.json", loadPriority = LoadPriority.HIGHEST)
public class AvatarTalentData extends GenshinResource {
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;
}
public int PrevTalent() {
return PrevTalent;
}
public long getNameTextMapHash() {
return NameTextMapHash;
}
public String getIcon() {
return Icon;
}
public int getMainCostItemId() {
return MainCostItemId;
}
public int getMainCostItemCount() {
return MainCostItemCount;
}
public String getOpenConfig() {
return OpenConfig;
}
public FightPropData[] getAddProps() {
return AddProps;
}
public float[] getParamList() {
return ParamList;
}
@Override
public void onLoad() {
ArrayList<FightPropData> parsed = new ArrayList<FightPropData>(getAddProps().length);
for (FightPropData prop : getAddProps()) {
if (prop.getPropType() != null || prop.getValue() == 0f) {
prop.onLoad();
parsed.add(prop);
}
}
this.AddProps = parsed.toArray(new FightPropData[parsed.size()]);
}
}
package emu.grasscutter.data.def;
import java.util.ArrayList;
import emu.grasscutter.data.GenshinResource;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.data.common.FightPropData;
@ResourceType(name = "EquipAffixExcelConfigData.json")
public class EquipAffixData extends GenshinResource {
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;
}
public int getMainId() {
return Id;
}
public int getLevel() {
return Level;
}
public long getNameTextMapHash() {
return NameTextMapHash;
}
public String getOpenConfig() {
return OpenConfig;
}
public FightPropData[] getAddProps() {
return AddProps;
}
public float[] getParamList() {
return ParamList;
}
@Override
public void onLoad() {
ArrayList<FightPropData> parsed = new ArrayList<FightPropData>(getAddProps().length);
for (FightPropData prop : getAddProps()) {
if (prop.getPropType() != null || prop.getValue() == 0f) {
prop.onLoad();
parsed.add(prop);
}
}
this.AddProps = parsed.toArray(new FightPropData[parsed.size()]);
}
}
package emu.grasscutter.data.def;
import emu.grasscutter.data.GenshinResource;
import emu.grasscutter.data.ResourceType;
@ResourceType(name = "GadgetExcelConfigData.json")
public class GadgetData extends GenshinResource {
private int Id;
private String Type;
private String JsonName;
private boolean IsInteractive;
private String[] Tags;
private String ItemJsonName;
private String InteeIconName;
private long NameTextMapHash;
private int CampID;
@Override
public int getId() {
return this.Id;
}
public String getType() {
return Type;
}
public String getJsonName() {
return JsonName;
}
public boolean isInteractive() {
return IsInteractive;
}
public String[] getTags() {
return Tags;
}
public String getItemJsonName() {
return ItemJsonName;
}
public String getInteeIconName() {
return InteeIconName;
}
public long getNameTextMapHash() {
return NameTextMapHash;
}
public int getCampID() {
return CampID;
}
@Override
public void onLoad() {
}
}
package emu.grasscutter.data.def;
import emu.grasscutter.data.GenshinResource;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.game.props.FightProperty;
import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
import it.unimi.dsi.fastutil.ints.IntSet;
@ResourceType(name = {"MaterialExcelConfigData.json", "WeaponExcelConfigData.json", "ReliquaryExcelConfigData.json"})
public class ItemData extends GenshinResource {
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;
// Food
private String FoodQuality;
private String UseTarget;
private String[] UseParam;
// String enums
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;
// Weapon
private int WeaponPromoteId;
private int WeaponBaseExp;
private int StoryId;
private int AvatarPromoteId;
private int[] AwakenCosts;
private int[] SkillAffix;
private WeaponProperty[] WeaponProp;
// Hash
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 IntSet addPropLevelSet;
@Override
public int getId(){
return this.Id;
}
public String getMaterialTypeString(){
return this.MaterialType;
}
public int getStackLimit(){
return this.StackLimit;
}
public int getMaxUseCount(){
return this.MaxUseCount;
}
public String getUseTarget(){
return this.UseTarget;
}
public String[] getUseParam(){
return this.UseParam;
}
public int getRankLevel(){
return this.RankLevel;
}
public String getFoodQuality(){
return this.FoodQuality;
}
public String getEffectName(){
return this.EffectName;
}
public int[] getSatiationParams(){
return this.SatiationParams;
}
public int[] getDestroyReturnMaterial(){
return this.DestroyReturnMaterial;
}
public int[] getDestroyReturnMaterialCount(){
return this.DestroyReturnMaterialCount;
}
public long getNameTextMapHash(){
return this.NameTextMapHash;
}
public String getIcon(){
return this.Icon;
}
public String getItemTypeString(){
return this.ItemType;
}
public int getRank(){
return this.Rank;
}
public int getGadgetId() {
return GadgetId;
}
public int getBaseConvExp() {
return BaseConvExp;
}
public int getMainPropDepotId() {
return MainPropDepotId;
}
public int getAppendPropDepotId() {
return AppendPropDepotId;
}
public int getAppendPropNum() {
return AppendPropNum;
}
public int getSetId() {
return SetId;
}
public int getWeaponPromoteId() {
return WeaponPromoteId;
}
public int getWeaponBaseExp() {
return WeaponBaseExp;
}
public int[] getAwakenCosts() {
return AwakenCosts;
}
public IntSet getAddPropLevelSet() {
return addPropLevelSet;
}
public int[] getSkillAffix() {
return SkillAffix;
}
public WeaponProperty[] getWeaponProperties() {
return WeaponProp;
}
public int getMaxLevel() {
return MaxLevel;
}
public emu.grasscutter.game.inventory.ItemType getItemType() {
return this.itemType;
}
public emu.grasscutter.game.inventory.MaterialType getMaterialType() {
return this.materialType;
}
public emu.grasscutter.game.inventory.EquipType getEquipType() {
return this.equipType;
}
public boolean canAddRelicProp(int level) {
return this.addPropLevelSet != null & this.addPropLevelSet.contains(level);
}
public boolean isEquip() {
return this.itemType == emu.grasscutter.game.inventory.ItemType.ITEM_RELIQUARY || this.itemType == 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());
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);
}
} else if (this.itemType == emu.grasscutter.game.inventory.ItemType.ITEM_WEAPON) {
this.equipType = emu.grasscutter.game.inventory.EquipType.EQUIP_WEAPON;
} else {
this.equipType = emu.grasscutter.game.inventory.EquipType.EQUIP_NONE;
}
if (this.getWeaponProperties() != null) {
for (WeaponProperty weaponProperty : this.getWeaponProperties()) {
weaponProperty.onLoad();
}
}
}
public static class WeaponProperty {
private FightProperty fightProp;
private String PropType;
private float InitValue;
private String Type;
public String getPropType(){
return this.PropType;
}
public float getInitValue(){
return this.InitValue;
}
public String getType(){
return this.Type;
}
public FightProperty getFightProp() {
return fightProp;
}
public void onLoad() {
this.fightProp = FightProperty.getPropByName(PropType);
}
}
}
\ No newline at end of file
package emu.grasscutter.data.def;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Stream;
import emu.grasscutter.data.GenshinResource;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.data.common.CurveInfo;
@ResourceType(name = "MonsterCurveExcelConfigData.json")
public class MonsterCurveData extends GenshinResource {
private int Level;
private CurveInfo[] CurveInfos;
private Map<String, Float> curveInfos;
@Override
public int getId() {
return Level;
}
public float getMultByProp(String fightProp) {
return curveInfos.getOrDefault(fightProp, 1f);
}
@Override
public void onLoad() {
this.curveInfos = new HashMap<>();
Stream.of(this.CurveInfos).forEach(info -> this.curveInfos.put(info.getType(), info.getValue()));
}
}
package emu.grasscutter.data.def;
import java.util.List;
import emu.grasscutter.data.GenshinData;
import emu.grasscutter.data.GenshinResource;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.data.ResourceType.LoadPriority;
import emu.grasscutter.data.common.PropGrowCurve;
@ResourceType(name = "MonsterExcelConfigData.json", loadPriority = LoadPriority.LOW)
public class MonsterData extends GenshinResource {
private int Id;
private String MonsterName;
private String Type;
private String ServerScript;
private List<Integer> Affix;
private String Ai;
private int[] Equips;
private List<HpDrops> 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<PropGrowCurve> PropGrowCurves;
private long NameTextMapHash;
private int CampID;
private int weaponId;
private MonsterDescribeData describeData;
@Override
public int getId() {
return this.Id;
}
public String getMonsterName() {
return MonsterName;
}
public String getType() {
return Type;
}
public String getServerScript() {
return ServerScript;
}
public List<Integer> getAffix() {
return Affix;
}
public String getAi() {
return Ai;
}
public int[] getEquips() {
return Equips;
}
public List<HpDrops> getHpDrops() {
return HpDrops;
}
public int getKillDropId() {
return KillDropId;
}
public String getExcludeWeathers() {
return ExcludeWeathers;
}
public int getFeatureTagGroupID() {
return FeatureTagGroupID;
}
public int getMpPropID() {
return MpPropID;
}
public String getSkin() {
return Skin;
}
public int getDescribeId() {
return DescribeId;
}
public int getCombatBGMLevel() {
return CombatBGMLevel;
}
public int getEntityBudgetLevel() {
return EntityBudgetLevel;
}
public float getBaseHp() {
return HpBase;
}
public float getBaseAttack() {
return AttackBase;
}
public float getBaseDefense() {
return DefenseBase;
}
public float getElecSubHurt() {
return ElecSubHurt;
}
public float getGrassSubHurt() {
return GrassSubHurt;
}
public float getWaterSubHurt() {
return WaterSubHurt;
}
public float getWindSubHurt() {
return WindSubHurt;
}
public float getIceSubHurt() {
return IceSubHurt;
}
public float getPhysicalSubHurt() {
return PhysicalSubHurt;
}
public List<PropGrowCurve> getPropGrowCurves() {
return PropGrowCurves;
}
public long getNameTextMapHash() {
return NameTextMapHash;
}
public int getCampID() {
return CampID;
}
public MonsterDescribeData getDescribeData() {
return describeData;
}
public int getWeaponId() {
return weaponId;
}
@Override
public void onLoad() {
this.describeData = GenshinData.getMonsterDescribeDataMap().get(this.getDescribeId());
for (int id : this.Equips) {
if (id == 0) {
continue;
}
GadgetData gadget = GenshinData.getGadgetDataMap().get(id);
if (gadget == null) {
continue;
}
if (gadget.getItemJsonName().equals("Default_MonsterWeapon")) {
this.weaponId = id;
}
}
}
public class HpDrops {
private int DropId;
private int HpPercent;
public int getDropId(){
return this.DropId;
}
public int getHpPercent(){
return this.HpPercent;
}
}
}
package emu.grasscutter.data.def;
import emu.grasscutter.data.GenshinResource;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.data.ResourceType.LoadPriority;
@ResourceType(name = "MonsterDescribeExcelConfigData.json", loadPriority = LoadPriority.HIGH)
public class MonsterDescribeData extends GenshinResource {
private int Id;
private long NameTextMapHash;
private int TitleID;
private int SpecialNameLabID;
private String Icon;
@Override
public int getId() {
return Id;
}
public long getNameTextMapHash() {
return NameTextMapHash;
}
public int getTitleID() {
return TitleID;
}
public int getSpecialNameLabID() {
return SpecialNameLabID;
}
public String getIcon() {
return Icon;
}
@Override
public void onLoad() {
}
}
package emu.grasscutter.data.def;
import emu.grasscutter.data.GenshinResource;
import emu.grasscutter.data.ResourceType;
@ResourceType(name = "NpcExcelConfigData.json")
public class NpcData extends GenshinResource {
private int Id;
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 long NameTextMapHash;
private int CampID;
@Override
public int getId() {
return this.Id;
}
public String getJsonName() {
return JsonName;
}
public String getAlias() {
return Alias;
}
public String getScriptDataPath() {
return ScriptDataPath;
}
public String getLuaDataPath() {
return LuaDataPath;
}
public boolean isIsInteractive() {
return IsInteractive;
}
public boolean isHasMove() {
return HasMove;
}
public String getDyePart() {
return DyePart;
}
public String getBillboardIcon() {
return BillboardIcon;
}
public long getNameTextMapHash() {
return NameTextMapHash;
}
public int getCampID() {
return CampID;
}
@Override
public void onLoad() {
}
}
package emu.grasscutter.data.def;
import emu.grasscutter.data.GenshinResource;
import emu.grasscutter.data.ResourceType;
@ResourceType(name = "PlayerLevelExcelConfigData.json")
public class PlayerLevelData extends GenshinResource {
private int Level;
private int Exp;
private int RewardId;
private int UnlockWorldLevel;
@Override
public int getId() {
return this.Level;
}
public int getLevel() {
return Level;
}
public int getExp() {
return Exp;
}
public int getRewardId() {
return RewardId;
}
public int getUnlockWorldLevel() {
return UnlockWorldLevel;
}
}
package emu.grasscutter.data.def;
import java.util.ArrayList;
import java.util.List;
import emu.grasscutter.data.GenshinResource;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.data.common.FightPropData;
import emu.grasscutter.data.common.ItemParamData;
@ResourceType(name = "ProudSkillExcelConfigData.json")
public class ProudSkillData extends GenshinResource {
private int ProudSkillId;
private int ProudSkillGroupId;
private int Level;
private int CoinCost;
private int BreakLevel;
private int ProudSkillType;
private String OpenConfig;
private List<ItemParamData> CostItems;
private List<String> FilterConds;
private List<String> LifeEffectParams;
private FightPropData[] AddProps;
private float[] ParamList;
private long[] ParamDescList;
private long NameTextMapHash;
@Override
public int getId() {
return ProudSkillId;
}
public int getProudSkillGroupId() {
return ProudSkillGroupId;
}
public int getLevel() {
return Level;
}
public int getCoinCost() {
return CoinCost;
}
public int getBreakLevel() {
return BreakLevel;
}
public int getProudSkillType() {
return ProudSkillType;
}
public String getOpenConfig() {
return OpenConfig;
}
public List<ItemParamData> getCostItems() {
return CostItems;
}
public List<String> getFilterConds() {
return FilterConds;
}
public List<String> getLifeEffectParams() {
return LifeEffectParams;
}
public FightPropData[] getAddProps() {
return AddProps;
}
public float[] getParamList() {
return ParamList;
}
public long[] getParamDescList() {
return ParamDescList;
}
public long getNameTextMapHash() {
return NameTextMapHash;
}
@Override
public void onLoad() {
if (this.getOpenConfig() != null & this.getOpenConfig().length() > 0) {
this.OpenConfig = "Avatar_" + this.getOpenConfig();
}
// Fight props
ArrayList<FightPropData> parsed = new ArrayList<FightPropData>(getAddProps().length);
for (FightPropData prop : getAddProps()) {
if (prop.getPropType() != null && prop.getValue() != 0f) {
prop.onLoad();
parsed.add(prop);
}
}
this.AddProps = parsed.toArray(new FightPropData[parsed.size()]);
}
}
package emu.grasscutter.data.def;
import emu.grasscutter.data.GenshinResource;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.game.props.FightProperty;
@ResourceType(name = "ReliquaryAffixExcelConfigData.json")
public class ReliquaryAffixData extends GenshinResource {
private int Id;
private int DepotId;
private int GroupId;
private String 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);
}
}
package emu.grasscutter.data.def;
import java.util.List;
import emu.grasscutter.data.GenshinResource;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.game.props.FightProperty;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
@ResourceType(name = "ReliquaryLevelExcelConfigData.json")
public class ReliquaryLevelData extends GenshinResource {
private int id;
private Int2ObjectMap<Float> propMap;
private int Rank;
private int Level;
private int Exp;
private List<RelicLevelProperty> AddProps;
@Override
public int getId() {
return this.id;
}
public int getRank() {
return Rank;
}
public int getLevel() {
return Level;
}
public int getExp() {
return Exp;
}
public float getPropValue(FightProperty prop) {
return getPropValue(prop.getId());
}
public float getPropValue(int id) {
return propMap.get(id);
}
@Override
public void onLoad() {
this.id = (Rank << 8) + this.getLevel();
this.propMap = new Int2ObjectOpenHashMap<>();
for (RelicLevelProperty p : AddProps) {
this.propMap.put(FightProperty.getPropByName(p.getPropType()).getId(), (Float) p.getValue());
}
}
public class RelicLevelProperty {
private String PropType;
private float Value;
public String getPropType() {
return PropType;
}
public float getValue() {
return Value;
}
}
}
package emu.grasscutter.data.def;
import emu.grasscutter.data.GenshinResource;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.game.props.FightProperty;
@ResourceType(name = "ReliquaryMainPropExcelConfigData.json")
public class ReliquaryMainPropData extends GenshinResource {
private int Id;
private int PropDepotId;
private String PropType;
private String AffixName;
private int Weight;
private FightProperty fightProp;
@Override
public int getId() {
return Id;
}
public int getPropDepotId() {
return PropDepotId;
}
public int getWeight() {
return Weight;
}
public FightProperty getFightProp() {
return fightProp;
}
@Override
public void onLoad() {
this.fightProp = FightProperty.getPropByName(this.PropType);
}
}
package emu.grasscutter.data.def;
import emu.grasscutter.data.GenshinResource;
import emu.grasscutter.data.ResourceType;
@ResourceType(name = "ReliquarySetExcelConfigData.json")
public class ReliquarySetData extends GenshinResource {
private int SetId;
private int[] SetNeedNum;
private int EquipAffixId;
private int DisableFilter;
private int[] ContainsList;
@Override
public int getId() {
return SetId;
}
public int[] getSetNeedNum() {
return SetNeedNum;
}
public int getEquipAffixId() {
return EquipAffixId;
}
public int getDisableFilter() {
return DisableFilter;
}
public int[] getContainsList() {
return ContainsList;
}
@Override
public void onLoad() {
}
}
package emu.grasscutter.data.def;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Stream;
import emu.grasscutter.data.GenshinResource;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.data.common.CurveInfo;
@ResourceType(name = "WeaponCurveExcelConfigData.json")
public class WeaponCurveData extends GenshinResource {
private int Level;
private CurveInfo[] CurveInfos;
private Map<String, Float> curveInfos;
@Override
public int getId() {
return Level;
}
public float getMultByProp(String fightProp) {
return curveInfos.getOrDefault(fightProp, 1f);
}
@Override
public void onLoad() {
this.curveInfos = new HashMap<>();
Stream.of(this.CurveInfos).forEach(info -> this.curveInfos.put(info.getType(), info.getValue()));
}
}
package emu.grasscutter.data.def;
import emu.grasscutter.data.GenshinResource;
import emu.grasscutter.data.ResourceType;
@ResourceType(name = "WeaponLevelExcelConfigData.json")
public class WeaponLevelData extends GenshinResource {
private int Level;
private int[] RequiredExps;
@Override
public int getId() {
return this.Level;
}
public int getLevel() {
return Level;
}
public int[] getRequiredExps() {
return RequiredExps;
}
}
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