mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-22 11:54:39 +01:00
Initial commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package emu.grasscutter.data.def;
|
||||
|
||||
import emu.grasscutter.data.GenshinData;
|
||||
import emu.grasscutter.data.GenshinResource;
|
||||
import emu.grasscutter.data.ResourceType;
|
||||
|
||||
@ResourceType(name = "AvatarCostumeExcelConfigData.json")
|
||||
public class AvatarCostumeData extends GenshinResource {
|
||||
private int CostumeId;
|
||||
private int ItemId;
|
||||
private int AvatarId;
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return this.CostumeId;
|
||||
}
|
||||
|
||||
public int getItemId() {
|
||||
return this.ItemId;
|
||||
}
|
||||
|
||||
public int getAvatarId() {
|
||||
return AvatarId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
GenshinData.getAvatarCostumeDataItemIdMap().put(this.getItemId(), this);
|
||||
}
|
||||
}
|
||||
36
src/main/java/emu/grasscutter/data/def/AvatarCurveData.java
Normal file
36
src/main/java/emu/grasscutter/data/def/AvatarCurveData.java
Normal file
@@ -0,0 +1,36 @@
|
||||
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 = "AvatarCurveExcelConfigData.json")
|
||||
public class AvatarCurveData extends GenshinResource {
|
||||
private int Level;
|
||||
private CurveInfo[] CurveInfos;
|
||||
|
||||
private Map<String, Float> curveInfos;
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return this.Level;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return Level;
|
||||
}
|
||||
|
||||
public Map<String, Float> getCurveInfos() {
|
||||
return curveInfos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
this.curveInfos = new HashMap<>();
|
||||
Stream.of(this.CurveInfos).forEach(info -> this.curveInfos.put(info.getType(), info.getValue()));
|
||||
}
|
||||
}
|
||||
246
src/main/java/emu/grasscutter/data/def/AvatarData.java
Normal file
246
src/main/java/emu/grasscutter/data/def/AvatarData.java
Normal file
@@ -0,0 +1,246 @@
|
||||
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;
|
||||
import emu.grasscutter.data.custom.AbilityEmbryoEntry;
|
||||
import emu.grasscutter.game.props.FightProperty;
|
||||
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;
|
||||
|
||||
@ResourceType(name = "AvatarExcelConfigData.json", loadPriority = LoadPriority.LOW)
|
||||
public class AvatarData extends GenshinResource {
|
||||
|
||||
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<String> CandSkillDepotIds;
|
||||
private long DescTextMapHash;
|
||||
private String AvatarIdentityType;
|
||||
private List<Integer> AvatarPromoteRewardLevelList;
|
||||
private List<Integer> 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 List<PropGrowCurve> PropGrowCurves;
|
||||
private int Id;
|
||||
|
||||
private Int2ObjectMap<String> growthCurveMap;
|
||||
private float[] hpGrowthCurve;
|
||||
private float[] attackGrowthCurve;
|
||||
private float[] defenseGrowthCurve;
|
||||
private AvatarSkillDepotData skillDepot;
|
||||
private IntList abilities;
|
||||
|
||||
@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 String getWeaponType(){
|
||||
return this.WeaponType;
|
||||
}
|
||||
|
||||
public String getImageName(){
|
||||
return this.ImageName;
|
||||
}
|
||||
|
||||
public int getAvatarPromoteId(){
|
||||
return this.AvatarPromoteId;
|
||||
}
|
||||
|
||||
public long getGachaImageNameHashSuffix(){
|
||||
return this.GachaImageNameHashSuffix;
|
||||
}
|
||||
|
||||
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 long getDescTextMapHash(){
|
||||
return this.DescTextMapHash;
|
||||
}
|
||||
|
||||
public String getAvatarIdentityType(){
|
||||
return this.AvatarIdentityType;
|
||||
}
|
||||
|
||||
public List<Integer> getAvatarPromoteRewardLevelList(){
|
||||
return this.AvatarPromoteRewardLevelList;
|
||||
}
|
||||
|
||||
public List<Integer> getAvatarPromoteRewardIdList(){
|
||||
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];
|
||||
} catch (Exception e) {
|
||||
return this.HpBase;
|
||||
}
|
||||
}
|
||||
|
||||
public float getBaseAttack(int level){
|
||||
try {
|
||||
return this.AttackBase * this.attackGrowthCurve[level - 1];
|
||||
} catch (Exception e) {
|
||||
return this.AttackBase;
|
||||
}
|
||||
}
|
||||
|
||||
public float getBaseDefense(int level){
|
||||
try {
|
||||
return this.DefenseBase * this.defenseGrowthCurve[level - 1];
|
||||
} catch (Exception e) {
|
||||
return this.DefenseBase;
|
||||
}
|
||||
}
|
||||
|
||||
public float getBaseCritical(){
|
||||
return this.Critical;
|
||||
}
|
||||
|
||||
public float getBaseCriticalHurt(){
|
||||
return this.CriticalHurt;
|
||||
}
|
||||
|
||||
public float getGrowthCurveById(int level, FightProperty prop) {
|
||||
String growCurve = this.growthCurveMap.get(prop.getId());
|
||||
if (growCurve == null) {
|
||||
return 1f;
|
||||
}
|
||||
AvatarCurveData curveData = GenshinData.getAvatarCurveDataMap().get(level);
|
||||
if (curveData == null) {
|
||||
return 1f;
|
||||
}
|
||||
return curveData.getCurveInfos().getOrDefault(growCurve, 1f);
|
||||
}
|
||||
|
||||
public long getNameTextMapHash(){
|
||||
return this.NameTextMapHash;
|
||||
}
|
||||
|
||||
public AvatarSkillDepotData getSkillDepot() {
|
||||
return skillDepot;
|
||||
}
|
||||
|
||||
public IntList getAbilities() {
|
||||
return abilities;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
this.skillDepot = GenshinData.getAvatarSkillDepotDataMap().get(this.SkillDepotId);
|
||||
|
||||
int size = GenshinData.getAvatarCurveDataMap().size();
|
||||
this.hpGrowthCurve = new float[size];
|
||||
this.attackGrowthCurve = new float[size];
|
||||
this.defenseGrowthCurve = new float[size];
|
||||
for (AvatarCurveData curveData : GenshinData.getAvatarCurveDataMap().values()) {
|
||||
int level = curveData.getLevel() - 1;
|
||||
for (PropGrowCurve growCurve : this.PropGrowCurves) {
|
||||
FightProperty prop = FightProperty.getPropByName(growCurve.getType());
|
||||
switch (prop) {
|
||||
case FIGHT_PROP_BASE_HP:
|
||||
this.hpGrowthCurve[level] = curveData.getCurveInfos().get(growCurve.getGrowCurve());
|
||||
break;
|
||||
case FIGHT_PROP_BASE_ATTACK:
|
||||
this.attackGrowthCurve[level] = curveData.getCurveInfos().get(growCurve.getGrowCurve());
|
||||
break;
|
||||
case FIGHT_PROP_BASE_DEFENSE:
|
||||
this.defenseGrowthCurve[level] = curveData.getCurveInfos().get(growCurve.getGrowCurve());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
for (PropGrowCurve growCurve : this.PropGrowCurves) {
|
||||
FightProperty prop = FightProperty.getPropByName(growCurve.getType());
|
||||
this.growthCurveMap.put(prop.getId(), growCurve.getGrowCurve());
|
||||
}
|
||||
*/
|
||||
|
||||
// Cache abilities
|
||||
String[] split = this.IconName.split("_");
|
||||
if (split.length > 0) {
|
||||
this.name = split[split.length - 1];
|
||||
|
||||
AbilityEmbryoEntry info = GenshinData.getAbilityEmbryoInfo().get(this.name);
|
||||
if (info != null) {
|
||||
this.abilities = new IntArrayList(info.getAbilities().length);
|
||||
for (String ability : info.getAbilities()) {
|
||||
this.abilities.add(Utils.abilityHash(ability));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package emu.grasscutter.data.def;
|
||||
|
||||
import emu.grasscutter.data.GenshinResource;
|
||||
import emu.grasscutter.data.ResourceType;
|
||||
|
||||
@ResourceType(name = "AvatarFlycloakExcelConfigData.json")
|
||||
public class AvatarFlycloakData extends GenshinResource {
|
||||
private int FlycloakId;
|
||||
private long NameTextMapHash;
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return this.FlycloakId;
|
||||
}
|
||||
|
||||
public long getNameTextMapHash() {
|
||||
return NameTextMapHash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
|
||||
}
|
||||
}
|
||||
23
src/main/java/emu/grasscutter/data/def/AvatarLevelData.java
Normal file
23
src/main/java/emu/grasscutter/data/def/AvatarLevelData.java
Normal file
@@ -0,0 +1,23 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
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()]);
|
||||
}
|
||||
}
|
||||
84
src/main/java/emu/grasscutter/data/def/AvatarSkillData.java
Normal file
84
src/main/java/emu/grasscutter/data/def/AvatarSkillData.java
Normal file
@@ -0,0 +1,84 @@
|
||||
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() {
|
||||
|
||||
}
|
||||
}
|
||||
123
src/main/java/emu/grasscutter/data/def/AvatarSkillDepotData.java
Normal file
123
src/main/java/emu/grasscutter/data/def/AvatarSkillDepotData.java
Normal file
@@ -0,0 +1,123 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
69
src/main/java/emu/grasscutter/data/def/AvatarTalentData.java
Normal file
69
src/main/java/emu/grasscutter/data/def/AvatarTalentData.java
Normal file
@@ -0,0 +1,69 @@
|
||||
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()]);
|
||||
}
|
||||
}
|
||||
59
src/main/java/emu/grasscutter/data/def/EquipAffixData.java
Normal file
59
src/main/java/emu/grasscutter/data/def/EquipAffixData.java
Normal file
@@ -0,0 +1,59 @@
|
||||
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()]);
|
||||
}
|
||||
}
|
||||
60
src/main/java/emu/grasscutter/data/def/GadgetData.java
Normal file
60
src/main/java/emu/grasscutter/data/def/GadgetData.java
Normal file
@@ -0,0 +1,60 @@
|
||||
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() {
|
||||
|
||||
}
|
||||
}
|
||||
253
src/main/java/emu/grasscutter/data/def/ItemData.java
Normal file
253
src/main/java/emu/grasscutter/data/def/ItemData.java
Normal file
@@ -0,0 +1,253 @@
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
32
src/main/java/emu/grasscutter/data/def/MonsterCurveData.java
Normal file
32
src/main/java/emu/grasscutter/data/def/MonsterCurveData.java
Normal file
@@ -0,0 +1,32 @@
|
||||
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()));
|
||||
}
|
||||
}
|
||||
198
src/main/java/emu/grasscutter/data/def/MonsterData.java
Normal file
198
src/main/java/emu/grasscutter/data/def/MonsterData.java
Normal file
@@ -0,0 +1,198 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
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() {
|
||||
|
||||
}
|
||||
}
|
||||
72
src/main/java/emu/grasscutter/data/def/NpcData.java
Normal file
72
src/main/java/emu/grasscutter/data/def/NpcData.java
Normal file
@@ -0,0 +1,72 @@
|
||||
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() {
|
||||
|
||||
}
|
||||
}
|
||||
33
src/main/java/emu/grasscutter/data/def/PlayerLevelData.java
Normal file
33
src/main/java/emu/grasscutter/data/def/PlayerLevelData.java
Normal file
@@ -0,0 +1,33 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
101
src/main/java/emu/grasscutter/data/def/ProudSkillData.java
Normal file
101
src/main/java/emu/grasscutter/data/def/ProudSkillData.java
Normal file
@@ -0,0 +1,101 @@
|
||||
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()]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
39
src/main/java/emu/grasscutter/data/def/ReliquarySetData.java
Normal file
39
src/main/java/emu/grasscutter/data/def/ReliquarySetData.java
Normal file
@@ -0,0 +1,39 @@
|
||||
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() {
|
||||
|
||||
}
|
||||
}
|
||||
32
src/main/java/emu/grasscutter/data/def/WeaponCurveData.java
Normal file
32
src/main/java/emu/grasscutter/data/def/WeaponCurveData.java
Normal file
@@ -0,0 +1,32 @@
|
||||
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()));
|
||||
}
|
||||
}
|
||||
23
src/main/java/emu/grasscutter/data/def/WeaponLevelData.java
Normal file
23
src/main/java/emu/grasscutter/data/def/WeaponLevelData.java
Normal file
@@ -0,0 +1,23 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
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 = "WeaponPromoteExcelConfigData.json")
|
||||
public class WeaponPromoteData extends GenshinResource {
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public int getWeaponPromoteId() {
|
||||
return WeaponPromoteId;
|
||||
}
|
||||
|
||||
public int getPromoteLevel() {
|
||||
return PromoteLevel;
|
||||
}
|
||||
|
||||
public ItemParamData[] getCostItems() {
|
||||
return CostItems;
|
||||
}
|
||||
|
||||
public int getCoinCost() {
|
||||
return CoinCost;
|
||||
}
|
||||
|
||||
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
|
||||
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()]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user