Commit a8293102 authored by Melledy's avatar Melledy Committed by GitHub
Browse files

Merge branch 'development' into stable

parents 304b9cb8 ecf7a81a
package emu.grasscutter.data.common;
import java.util.List;
public class ItemUseData {
private String useOp;
private List<String> useParam;
public String getUseOp() {
return useOp;
}
public void setUseOp(String useOp) {
this.useOp = useOp;
}
public List<String> getUseParam() {
return useParam;
}
public void setUseParam(List<String> useParam) {
this.useParam = useParam;
}
}
...@@ -3,22 +3,22 @@ package emu.grasscutter.data.common; ...@@ -3,22 +3,22 @@ package emu.grasscutter.data.common;
import java.util.List; import java.util.List;
public class OpenCondData { public class OpenCondData {
private String CondType; private String condType;
private List<Integer> ParamList; private List<Integer> paramList;
public String getCondType() { public String getCondType() {
return CondType; return condType;
} }
public void setCondType(String condType) { public void setCondType(String condType) {
CondType = condType; condType = condType;
} }
public List<Integer> getParamList() { public List<Integer> getParamList() {
return ParamList; return paramList;
} }
public void setParamList(List<Integer> paramList) { public void setParamList(List<Integer> paramList) {
ParamList = paramList; paramList = paramList;
} }
} }
package emu.grasscutter.data.common; package emu.grasscutter.data.common;
import com.google.gson.annotations.SerializedName;
import emu.grasscutter.Grasscutter; import emu.grasscutter.Grasscutter;
import emu.grasscutter.data.GameData; import emu.grasscutter.data.GameData;
import emu.grasscutter.data.def.DailyDungeonData; import emu.grasscutter.data.excels.DailyDungeonData;
import emu.grasscutter.utils.Position; import emu.grasscutter.utils.Position;
import it.unimi.dsi.fastutil.ints.IntArrayList; import it.unimi.dsi.fastutil.ints.IntArrayList;
import it.unimi.dsi.fastutil.ints.IntList; import it.unimi.dsi.fastutil.ints.IntList;
...@@ -11,7 +13,11 @@ public class PointData { ...@@ -11,7 +13,11 @@ public class PointData {
private int id; private int id;
private String $type; private String $type;
private Position tranPos; private Position tranPos;
@SerializedName(value="dungeonIds", alternate={"JHHFPGJNMIN"})
private int[] dungeonIds; private int[] dungeonIds;
@SerializedName(value="dungeonRandomList", alternate={"OIBKFJNBLHO"})
private int[] dungeonRandomList; private int[] dungeonRandomList;
private int tranSceneId; private int tranSceneId;
......
package emu.grasscutter.data.common; package emu.grasscutter.data.common;
public class PropGrowCurve { public class PropGrowCurve {
private String Type; private String type;
private String GrowCurve; private String growCurve;
public String getType(){ public String getType(){
return this.Type; return this.type;
} }
public String getGrowCurve(){ public String getGrowCurve(){
return this.GrowCurve; return this.growCurve;
} }
} }
package emu.grasscutter.data.common;
public class RewardItemData {
private int ItemId;
private int ItemCount;
public int getItemId() {
return ItemId;
}
public void setItemId(int itemId) {
ItemId = itemId;
}
public int getItemCount() {
return ItemCount;
}
public void setItemCount(int itemCount) {
ItemCount = itemCount;
}
}
package emu.grasscutter.data.def;
import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType;
import java.util.List;
import java.util.stream.Collectors;
@ResourceType(name = "CombineExcelConfigData.json")
public class CombineData extends GameResource {
private int CombineId;
private int PlayerLevel;
private boolean IsDefaultShow;
private int CombineType;
private int SubCombineType;
private int ResultItemId;
private int ResultItemCount;
private int ScoinCost;
private List<CombineItemPair> RandomItems;
private List<CombineItemPair> MaterialItems;
private long EffectDescTextMapHash;
private String RecipeType;
@Override
public int getId() {
return this.CombineId;
}
@Override
public void onLoad() {
super.onLoad();
// clean data
RandomItems = RandomItems.stream().filter(item -> item.Id > 0).collect(Collectors.toList());
MaterialItems = MaterialItems.stream().filter(item -> item.Id > 0).collect(Collectors.toList());
}
public static class CombineItemPair {
private int Id;
private int Count;
public CombineItemPair(int id, int count) {
Id = id;
Count = count;
}
public int getId() {
return Id;
}
public void setId(int id) {
Id = id;
}
public int getCount() {
return Count;
}
public void setCount(int count) {
Count = count;
}
}
public int getCombineId() {
return CombineId;
}
public void setCombineId(int combineId) {
CombineId = combineId;
}
public int getPlayerLevel() {
return PlayerLevel;
}
public void setPlayerLevel(int playerLevel) {
PlayerLevel = playerLevel;
}
public boolean isDefaultShow() {
return IsDefaultShow;
}
public void setDefaultShow(boolean defaultShow) {
IsDefaultShow = defaultShow;
}
public int getCombineType() {
return CombineType;
}
public void setCombineType(int combineType) {
CombineType = combineType;
}
public int getSubCombineType() {
return SubCombineType;
}
public void setSubCombineType(int subCombineType) {
SubCombineType = subCombineType;
}
public int getResultItemId() {
return ResultItemId;
}
public void setResultItemId(int resultItemId) {
ResultItemId = resultItemId;
}
public int getResultItemCount() {
return ResultItemCount;
}
public void setResultItemCount(int resultItemCount) {
ResultItemCount = resultItemCount;
}
public int getScoinCost() {
return ScoinCost;
}
public void setScoinCost(int scoinCost) {
ScoinCost = scoinCost;
}
public List<CombineItemPair> getRandomItems() {
return RandomItems;
}
public void setRandomItems(List<CombineItemPair> randomItems) {
RandomItems = randomItems;
}
public List<CombineItemPair> getMaterialItems() {
return MaterialItems;
}
public void setMaterialItems(List<CombineItemPair> materialItems) {
MaterialItems = materialItems;
}
public long getEffectDescTextMapHash() {
return EffectDescTextMapHash;
}
public void setEffectDescTextMapHash(long effectDescTextMapHash) {
EffectDescTextMapHash = effectDescTextMapHash;
}
public String getRecipeType() {
return RecipeType;
}
public void setRecipeType(String recipeType) {
RecipeType = recipeType;
}
}
package emu.grasscutter.data.def; package emu.grasscutter.data.excels;
import emu.grasscutter.data.GameData; import emu.grasscutter.data.GameData;
import emu.grasscutter.data.GameResource; import emu.grasscutter.data.GameResource;
...@@ -6,21 +6,21 @@ import emu.grasscutter.data.ResourceType; ...@@ -6,21 +6,21 @@ import emu.grasscutter.data.ResourceType;
@ResourceType(name = "AvatarCostumeExcelConfigData.json") @ResourceType(name = "AvatarCostumeExcelConfigData.json")
public class AvatarCostumeData extends GameResource { public class AvatarCostumeData extends GameResource {
private int CostumeId; private int costumeId;
private int ItemId; private int itemId;
private int AvatarId; private int avatarId;
@Override @Override
public int getId() { public int getId() {
return this.CostumeId; return this.costumeId;
} }
public int getItemId() { public int getItemId() {
return this.ItemId; return this.itemId;
} }
public int getAvatarId() { public int getAvatarId() {
return AvatarId; return avatarId;
} }
@Override @Override
......
package emu.grasscutter.data.def; package emu.grasscutter.data.excels;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
...@@ -10,27 +10,27 @@ import emu.grasscutter.data.common.CurveInfo; ...@@ -10,27 +10,27 @@ import emu.grasscutter.data.common.CurveInfo;
@ResourceType(name = "AvatarCurveExcelConfigData.json") @ResourceType(name = "AvatarCurveExcelConfigData.json")
public class AvatarCurveData extends GameResource { public class AvatarCurveData extends GameResource {
private int Level; private int level;
private CurveInfo[] CurveInfos; private CurveInfo[] curveInfos;
private Map<String, Float> curveInfos; private Map<String, Float> curveInfoMap;
@Override @Override
public int getId() { public int getId() {
return this.Level; return this.level;
} }
public int getLevel() { public int getLevel() {
return Level; return level;
} }
public Map<String, Float> getCurveInfos() { public Map<String, Float> getCurveInfos() {
return curveInfos; return curveInfoMap;
} }
@Override @Override
public void onLoad() { public void onLoad() {
this.curveInfos = new HashMap<>(); this.curveInfoMap = new HashMap<>();
Stream.of(this.CurveInfos).forEach(info -> this.curveInfos.put(info.getType(), info.getValue())); Stream.of(this.curveInfos).forEach(info -> this.curveInfoMap.put(info.getType(), info.getValue()));
} }
} }
package emu.grasscutter.data.def; package emu.grasscutter.data.excels;
import java.util.List; import java.util.List;
...@@ -6,9 +6,10 @@ import emu.grasscutter.data.GameData; ...@@ -6,9 +6,10 @@ import emu.grasscutter.data.GameData;
import emu.grasscutter.data.GameResource; import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType; import emu.grasscutter.data.ResourceType;
import emu.grasscutter.data.ResourceType.LoadPriority; import emu.grasscutter.data.ResourceType.LoadPriority;
import emu.grasscutter.data.binout.AbilityEmbryoEntry;
import emu.grasscutter.data.common.PropGrowCurve; import emu.grasscutter.data.common.PropGrowCurve;
import emu.grasscutter.data.custom.AbilityEmbryoEntry;
import emu.grasscutter.game.props.FightProperty; import emu.grasscutter.game.props.FightProperty;
import emu.grasscutter.game.props.WeaponType;
import emu.grasscutter.utils.Utils; import emu.grasscutter.utils.Utils;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.IntArrayList; import it.unimi.dsi.fastutil.ints.IntArrayList;
...@@ -17,38 +18,36 @@ import it.unimi.dsi.fastutil.ints.IntList; ...@@ -17,38 +18,36 @@ import it.unimi.dsi.fastutil.ints.IntList;
@ResourceType(name = "AvatarExcelConfigData.json", loadPriority = LoadPriority.LOW) @ResourceType(name = "AvatarExcelConfigData.json", loadPriority = LoadPriority.LOW)
public class AvatarData extends GameResource { public class AvatarData extends GameResource {
private String name; private String iconName;
private String IconName; private String bodyType;
private String BodyType; private String qualityType;
private String QualityType; private int chargeEfficiency;
private int ChargeEfficiency; private int initialWeapon;
private int InitialWeapon; private WeaponType weaponType;
private String WeaponType; private String imageName;
private String ImageName; private int avatarPromoteId;
private int AvatarPromoteId; private String cutsceneShow;
private String CutsceneShow; private int skillDepotId;
private int SkillDepotId; private int staminaRecoverSpeed;
private int StaminaRecoverSpeed; private List<String> candSkillDepotIds;
private List<String> CandSkillDepotIds; private String avatarIdentityType;
private long DescTextMapHash; private List<Integer> avatarPromoteRewardLevelList;
private String AvatarIdentityType; private List<Integer> avatarPromoteRewardIdList;
private List<Integer> AvatarPromoteRewardLevelList;
private List<Integer> AvatarPromoteRewardIdList; private long nameTextMapHash;
private int FeatureTagGroupID;
private long NameTextMapHash;
private long GachaImageNameHashSuffix;
private long InfoDescTextMapHash;
private float HpBase; private float hpBase;
private float AttackBase; private float attackBase;
private float DefenseBase; private float defenseBase;
private float Critical; private float critical;
private float CriticalHurt; private float criticalHurt;
private List<PropGrowCurve> PropGrowCurves; private List<PropGrowCurve> propGrowCurves;
private int Id; private int id;
// Transient
private String name;
private Int2ObjectMap<String> growthCurveMap; private Int2ObjectMap<String> growthCurveMap;
private float[] hpGrowthCurve; private float[] hpGrowthCurve;
private float[] attackGrowthCurve; private float[] attackGrowthCurve;
...@@ -58,11 +57,11 @@ public class AvatarData extends GameResource { ...@@ -58,11 +57,11 @@ public class AvatarData extends GameResource {
private List<Integer> fetters; private List<Integer> fetters;
private int nameCardRewardId; private int nameCardRewardId;
private int nameCardId; private int nameCardId;
@Override @Override
public int getId(){ public int getId(){
return this.Id; return this.id;
} }
public String getName() { public String getName() {
...@@ -70,107 +69,91 @@ public class AvatarData extends GameResource { ...@@ -70,107 +69,91 @@ public class AvatarData extends GameResource {
} }
public String getBodyType(){ public String getBodyType(){
return this.BodyType; return this.bodyType;
} }
public String getQualityType(){ public String getQualityType(){
return this.QualityType; return this.qualityType;
} }
public int getChargeEfficiency(){ public int getChargeEfficiency(){
return this.ChargeEfficiency; return this.chargeEfficiency;
} }
public int getInitialWeapon(){ public int getInitialWeapon(){
return this.InitialWeapon; return this.initialWeapon;
} }
public String getWeaponType(){ public WeaponType getWeaponType(){
return this.WeaponType; return this.weaponType;
} }
public String getImageName(){ public String getImageName(){
return this.ImageName; return this.imageName;
} }
public int getAvatarPromoteId(){ public int getAvatarPromoteId(){
return this.AvatarPromoteId; return this.avatarPromoteId;
}
public long getGachaImageNameHashSuffix(){
return this.GachaImageNameHashSuffix;
} }
public String getCutsceneShow(){ public String getCutsceneShow(){
return this.CutsceneShow; return this.cutsceneShow;
} }
public int getSkillDepotId(){ public int getSkillDepotId(){
return this.SkillDepotId; return this.skillDepotId;
} }
public int getStaminaRecoverSpeed(){ public int getStaminaRecoverSpeed(){
return this.StaminaRecoverSpeed; return this.staminaRecoverSpeed;
} }
public List<String> getCandSkillDepotIds(){ public List<String> getCandSkillDepotIds(){
return this.CandSkillDepotIds; return this.candSkillDepotIds;
} }
public long getDescTextMapHash(){
return this.DescTextMapHash;
}
public String getAvatarIdentityType(){ public String getAvatarIdentityType(){
return this.AvatarIdentityType; return this.avatarIdentityType;
} }
public List<Integer> getAvatarPromoteRewardLevelList(){ public List<Integer> getAvatarPromoteRewardLevelList(){
return this.AvatarPromoteRewardLevelList; return this.avatarPromoteRewardLevelList;
} }
public List<Integer> getAvatarPromoteRewardIdList(){ public List<Integer> getAvatarPromoteRewardIdList(){
return this.AvatarPromoteRewardIdList; return this.avatarPromoteRewardIdList;
} }
public int getFeatureTagGroupID(){
return this.FeatureTagGroupID;
}
public long getInfoDescTextMapHash(){
return this.InfoDescTextMapHash;
}
public float getBaseHp(int level){ public float getBaseHp(int level){
try { try {
return this.HpBase * this.hpGrowthCurve[level - 1]; return this.hpBase * this.hpGrowthCurve[level - 1];
} catch (Exception e) { } catch (Exception e) {
return this.HpBase; return this.hpBase;
} }
} }
public float getBaseAttack(int level){ public float getBaseAttack(int level){
try { try {
return this.AttackBase * this.attackGrowthCurve[level - 1]; return this.attackBase * this.attackGrowthCurve[level - 1];
} catch (Exception e) { } catch (Exception e) {
return this.AttackBase; return this.attackBase;
} }
} }
public float getBaseDefense(int level){ public float getBaseDefense(int level){
try { try {
return this.DefenseBase * this.defenseGrowthCurve[level - 1]; return this.defenseBase * this.defenseGrowthCurve[level - 1];
} catch (Exception e) { } catch (Exception e) {
return this.DefenseBase; return this.defenseBase;
} }
} }
public float getBaseCritical(){ public float getBaseCritical(){
return this.Critical; return this.critical;
} }
public float getBaseCriticalHurt(){ public float getBaseCriticalHurt(){
return this.CriticalHurt; return this.criticalHurt;
} }
public float getGrowthCurveById(int level, FightProperty prop) { public float getGrowthCurveById(int level, FightProperty prop) {
...@@ -186,7 +169,7 @@ public class AvatarData extends GameResource { ...@@ -186,7 +169,7 @@ public class AvatarData extends GameResource {
} }
public long getNameTextMapHash(){ public long getNameTextMapHash(){
return this.NameTextMapHash; return this.nameTextMapHash;
} }
public AvatarSkillDepotData getSkillDepot() { public AvatarSkillDepotData getSkillDepot() {
...@@ -211,13 +194,13 @@ public class AvatarData extends GameResource { ...@@ -211,13 +194,13 @@ public class AvatarData extends GameResource {
@Override @Override
public void onLoad() { public void onLoad() {
this.skillDepot = GameData.getAvatarSkillDepotDataMap().get(this.SkillDepotId); this.skillDepot = GameData.getAvatarSkillDepotDataMap().get(this.skillDepotId);
// Get fetters from GameData // Get fetters from GameData
this.fetters = GameData.getFetterDataEntries().get(this.Id); this.fetters = GameData.getFetterDataEntries().get(this.id);
if (GameData.getFetterCharacterCardDataMap().get(this.Id) != null) { if (GameData.getFetterCharacterCardDataMap().get(this.id) != null) {
this.nameCardRewardId = GameData.getFetterCharacterCardDataMap().get(this.Id).getRewardId(); this.nameCardRewardId = GameData.getFetterCharacterCardDataMap().get(this.id).getRewardId();
} }
if (GameData.getRewardDataMap().get(this.nameCardRewardId) != null) { if (GameData.getRewardDataMap().get(this.nameCardRewardId) != null) {
...@@ -230,7 +213,7 @@ public class AvatarData extends GameResource { ...@@ -230,7 +213,7 @@ public class AvatarData extends GameResource {
this.defenseGrowthCurve = new float[size]; this.defenseGrowthCurve = new float[size];
for (AvatarCurveData curveData : GameData.getAvatarCurveDataMap().values()) { for (AvatarCurveData curveData : GameData.getAvatarCurveDataMap().values()) {
int level = curveData.getLevel() - 1; int level = curveData.getLevel() - 1;
for (PropGrowCurve growCurve : this.PropGrowCurves) { for (PropGrowCurve growCurve : this.propGrowCurves) {
FightProperty prop = FightProperty.getPropByName(growCurve.getType()); FightProperty prop = FightProperty.getPropByName(growCurve.getType());
switch (prop) { switch (prop) {
case FIGHT_PROP_BASE_HP: case FIGHT_PROP_BASE_HP:
...@@ -256,7 +239,7 @@ public class AvatarData extends GameResource { ...@@ -256,7 +239,7 @@ public class AvatarData extends GameResource {
*/ */
// Cache abilities // Cache abilities
String[] split = this.IconName.split("_"); String[] split = this.iconName.split("_");
if (split.length > 0) { if (split.length > 0) {
this.name = split[split.length - 1]; this.name = split[split.length - 1];
......
package emu.grasscutter.data.def; package emu.grasscutter.data.excels;
import emu.grasscutter.data.GameResource; import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType; import emu.grasscutter.data.ResourceType;
@ResourceType(name = "AvatarFettersLevelExcelConfigData.json") @ResourceType(name = "AvatarFettersLevelExcelConfigData.json")
public class AvatarFetterLevelData extends GameResource { public class AvatarFetterLevelData extends GameResource {
private int FetterLevel; private int fetterLevel;
private int NeedExp; private int needExp;
@Override @Override
public int getId() { public int getId() {
return this.FetterLevel; return this.fetterLevel;
} }
public int getLevel() { public int getLevel() {
return FetterLevel; return fetterLevel;
} }
public int getExp() { public int getExp() {
return NeedExp; return needExp;
} }
} }
package emu.grasscutter.data.def; package emu.grasscutter.data.excels;
import emu.grasscutter.data.GameResource; import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType; import emu.grasscutter.data.ResourceType;
@ResourceType(name = "AvatarFlycloakExcelConfigData.json") @ResourceType(name = "AvatarFlycloakExcelConfigData.json")
public class AvatarFlycloakData extends GameResource { public class AvatarFlycloakData extends GameResource {
private int FlycloakId; private int flycloakId;
private long NameTextMapHash; private long nameTextMapHash;
@Override @Override
public int getId() { public int getId() {
return this.FlycloakId; return this.flycloakId;
} }
public long getNameTextMapHash() { public long getNameTextMapHash() {
return NameTextMapHash; return nameTextMapHash;
} }
@Override @Override
......
package emu.grasscutter.data.def; package emu.grasscutter.data.excels;
import emu.grasscutter.data.GameResource; import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType; import emu.grasscutter.data.ResourceType;
@ResourceType(name = "AvatarLevelExcelConfigData.json") @ResourceType(name = "AvatarLevelExcelConfigData.json")
public class AvatarLevelData extends GameResource { public class AvatarLevelData extends GameResource {
private int Level; private int level;
private int Exp; private int exp;
@Override @Override
public int getId() { public int getId() {
return this.Level; return this.level;
} }
public int getLevel() { public int getLevel() {
return Level; return level;
} }
public int getExp() { public int getExp() {
return Exp; return exp;
} }
} }
package emu.grasscutter.data.def; package emu.grasscutter.data.excels;
import java.util.ArrayList; import java.util.ArrayList;
import emu.grasscutter.data.GameResource; import emu.grasscutter.data.GameResource;
...@@ -9,45 +9,45 @@ import emu.grasscutter.data.common.ItemParamData; ...@@ -9,45 +9,45 @@ import emu.grasscutter.data.common.ItemParamData;
@ResourceType(name = "AvatarPromoteExcelConfigData.json") @ResourceType(name = "AvatarPromoteExcelConfigData.json")
public class AvatarPromoteData extends GameResource { public class AvatarPromoteData extends GameResource {
private int AvatarPromoteId; private int avatarPromoteId;
private int PromoteLevel; private int promoteLevel;
private int ScoinCost; private int scoinCost;
private ItemParamData[] CostItems; private ItemParamData[] costItems;
private int UnlockMaxLevel; private int unlockMaxLevel;
private FightPropData[] AddProps; private FightPropData[] addProps;
private int RequiredPlayerLevel; private int requiredPlayerLevel;
@Override @Override
public int getId() { public int getId() {
return (AvatarPromoteId << 8) + PromoteLevel; return (avatarPromoteId << 8) + promoteLevel;
} }
public int getAvatarPromoteId() { public int getAvatarPromoteId() {
return AvatarPromoteId; return avatarPromoteId;
} }
public int getPromoteLevel() { public int getPromoteLevel() {
return PromoteLevel; return promoteLevel;
} }
public ItemParamData[] getCostItems() { public ItemParamData[] getCostItems() {
return CostItems; return costItems;
} }
public int getCoinCost() { public int getCoinCost() {
return ScoinCost; return scoinCost;
} }
public FightPropData[] getAddProps() { public FightPropData[] getAddProps() {
return AddProps; return addProps;
} }
public int getUnlockMaxLevel() { public int getUnlockMaxLevel() {
return UnlockMaxLevel; return unlockMaxLevel;
} }
public int getRequiredPlayerLevel() { public int getRequiredPlayerLevel() {
return RequiredPlayerLevel; return requiredPlayerLevel;
} }
@Override @Override
...@@ -60,7 +60,7 @@ public class AvatarPromoteData extends GameResource { ...@@ -60,7 +60,7 @@ public class AvatarPromoteData extends GameResource {
} }
trim.add(itemParam); trim.add(itemParam);
} }
this.CostItems = trim.toArray(new ItemParamData[trim.size()]); this.costItems = trim.toArray(new ItemParamData[trim.size()]);
// Trim fight prop data (just in case) // Trim fight prop data (just in case)
ArrayList<FightPropData> parsed = new ArrayList<>(getAddProps().length); ArrayList<FightPropData> parsed = new ArrayList<>(getAddProps().length);
for (FightPropData prop : getAddProps()) { for (FightPropData prop : getAddProps()) {
...@@ -69,6 +69,6 @@ public class AvatarPromoteData extends GameResource { ...@@ -69,6 +69,6 @@ public class AvatarPromoteData extends GameResource {
parsed.add(prop); parsed.add(prop);
} }
} }
this.AddProps = parsed.toArray(new FightPropData[parsed.size()]); this.addProps = parsed.toArray(new FightPropData[parsed.size()]);
} }
} }
package emu.grasscutter.data.def; package emu.grasscutter.data.excels;
import java.util.List; import java.util.List;
import emu.grasscutter.data.GameResource; import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType; import emu.grasscutter.data.ResourceType;
import emu.grasscutter.data.ResourceType.LoadPriority; import emu.grasscutter.data.ResourceType.LoadPriority;
import emu.grasscutter.game.props.ElementType;
@ResourceType(name = "AvatarSkillExcelConfigData.json", loadPriority = LoadPriority.HIGHEST) @ResourceType(name = "AvatarSkillExcelConfigData.json", loadPriority = LoadPriority.HIGHEST)
public class AvatarSkillData extends GameResource { public class AvatarSkillData extends GameResource {
private int Id; private int id;
private float CdTime; private float cdTime;
private int CostElemVal; private int costElemVal;
private int MaxChargeNum; private int maxChargeNum;
private int TriggerID; private int triggerID;
private boolean IsAttackCameraLock; private boolean isAttackCameraLock;
private int ProudSkillGroupId; private int proudSkillGroupId;
private String CostElemType; private ElementType costElemType;
private List<Float> LockWeightParams; private List<Float> lockWeightParams;
private long NameTextMapHash; private long nameTextMapHash;
private String AbilityName; private String abilityName;
private String LockShape; private String lockShape;
private String GlobalValueKey; private String globalValueKey;
@Override @Override
public int getId(){ public int getId(){
return this.Id; return this.id;
} }
public float getCdTime() { public float getCdTime() {
return CdTime; return cdTime;
} }
public int getCostElemVal() { public int getCostElemVal() {
return CostElemVal; return costElemVal;
} }
public int getMaxChargeNum() { public int getMaxChargeNum() {
return MaxChargeNum; return maxChargeNum;
} }
public int getTriggerID() { public int getTriggerID() {
return TriggerID; return triggerID;
} }
public boolean isIsAttackCameraLock() { public boolean isIsAttackCameraLock() {
return IsAttackCameraLock; return isAttackCameraLock;
} }
public int getProudSkillGroupId() { public int getProudSkillGroupId() {
return ProudSkillGroupId; return proudSkillGroupId;
} }
public String getCostElemType() { public ElementType getCostElemType() {
return CostElemType; return costElemType;
} }
public List<Float> getLockWeightParams() { public List<Float> getLockWeightParams() {
return LockWeightParams; return lockWeightParams;
} }
public long getNameTextMapHash() { public long getNameTextMapHash() {
return NameTextMapHash; return nameTextMapHash;
} }
public String getAbilityName() { public String getAbilityName() {
return AbilityName; return abilityName;
} }
public String getLockShape() { public String getLockShape() {
return LockShape; return lockShape;
} }
public String getGlobalValueKey() { public String getGlobalValueKey() {
return GlobalValueKey; return globalValueKey;
} }
@Override @Override
......
package emu.grasscutter.data.def; package emu.grasscutter.data.excels;
import java.util.List; import java.util.List;
...@@ -6,7 +6,7 @@ import emu.grasscutter.data.GameData; ...@@ -6,7 +6,7 @@ import emu.grasscutter.data.GameData;
import emu.grasscutter.data.GameResource; import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType; import emu.grasscutter.data.ResourceType;
import emu.grasscutter.data.ResourceType.LoadPriority; import emu.grasscutter.data.ResourceType.LoadPriority;
import emu.grasscutter.data.custom.AbilityEmbryoEntry; import emu.grasscutter.data.binout.AbilityEmbryoEntry;
import emu.grasscutter.game.props.ElementType; import emu.grasscutter.game.props.ElementType;
import emu.grasscutter.utils.Utils; import emu.grasscutter.utils.Utils;
import it.unimi.dsi.fastutil.ints.IntArrayList; import it.unimi.dsi.fastutil.ints.IntArrayList;
...@@ -15,62 +15,63 @@ import it.unimi.dsi.fastutil.ints.IntList; ...@@ -15,62 +15,63 @@ import it.unimi.dsi.fastutil.ints.IntList;
@ResourceType(name = "AvatarSkillDepotExcelConfigData.json", loadPriority = LoadPriority.HIGH) @ResourceType(name = "AvatarSkillDepotExcelConfigData.json", loadPriority = LoadPriority.HIGH)
public class AvatarSkillDepotData extends GameResource { public class AvatarSkillDepotData extends GameResource {
private int Id; private int id;
private int EnergySkill; private int energySkill;
private int AttackModeSkill; private int attackModeSkill;
private List<Integer> Skills; private List<Integer> skills;
private List<Integer> SubSkills; private List<Integer> subSkills;
private List<String> ExtraAbilities; private List<String> extraAbilities;
private List<Integer> Talents; private List<Integer> talents;
private List<InherentProudSkillOpens> InherentProudSkillOpens; private List<InherentProudSkillOpens> inherentProudSkillOpens;
private String TalentStarName; private String talentStarName;
private String SkillDepotAbilityGroup; private String skillDepotAbilityGroup;
// Transient
private AvatarSkillData energySkillData; private AvatarSkillData energySkillData;
private ElementType elementType; private ElementType elementType;
private IntList abilities; private IntList abilities;
@Override @Override
public int getId(){ public int getId(){
return this.Id; return this.id;
} }
public int getEnergySkill(){ public int getEnergySkill(){
return this.EnergySkill; return this.energySkill;
} }
public List<Integer> getSkills(){ public List<Integer> getSkills(){
return this.Skills; return this.skills;
} }
public List<Integer> getSubSkills(){ public List<Integer> getSubSkills(){
return this.SubSkills; return this.subSkills;
} }
public int getAttackModeSkill(){ public int getAttackModeSkill(){
return this.AttackModeSkill; return this.attackModeSkill;
} }
public List<String> getExtraAbilities(){ public List<String> getExtraAbilities(){
return this.ExtraAbilities; return this.extraAbilities;
} }
public List<Integer> getTalents(){ public List<Integer> getTalents(){
return this.Talents; return this.talents;
} }
public String getTalentStarName(){ public String getTalentStarName(){
return this.TalentStarName; return this.talentStarName;
} }
public List<InherentProudSkillOpens> getInherentProudSkillOpens(){ public List<InherentProudSkillOpens> getInherentProudSkillOpens(){
return this.InherentProudSkillOpens; return this.inherentProudSkillOpens;
} }
public String getSkillDepotAbilityGroup(){ public String getSkillDepotAbilityGroup(){
return this.SkillDepotAbilityGroup; return this.skillDepotAbilityGroup;
} }
public AvatarSkillData getEnergySkillData() { public AvatarSkillData getEnergySkillData() {
...@@ -94,30 +95,24 @@ public class AvatarSkillDepotData extends GameResource { ...@@ -94,30 +95,24 @@ public class AvatarSkillDepotData extends GameResource {
@Override @Override
public void onLoad() { public void onLoad() {
this.energySkillData = GameData.getAvatarSkillDataMap().get(this.EnergySkill); this.energySkillData = GameData.getAvatarSkillDataMap().get(this.energySkill);
if (getEnergySkillData() != null) { if (getEnergySkillData() != null) {
this.elementType = ElementType.getTypeByName(getEnergySkillData().getCostElemType()); this.elementType = getEnergySkillData().getCostElemType();
} else { } else {
this.elementType = ElementType.None; this.elementType = ElementType.None;
} }
} }
public static class InherentProudSkillOpens { public static class InherentProudSkillOpens {
private int ProudSkillGroupId; private int proudSkillGroupId;
private int needAvatarPromoteLevel;
private int NeedAvatarPromoteLevel;
public void setProudSkillGroupId(int ProudSkillGroupId){
this.ProudSkillGroupId = ProudSkillGroupId;
}
public int getProudSkillGroupId(){ public int getProudSkillGroupId(){
return this.ProudSkillGroupId; return this.proudSkillGroupId;
}
public void setNeedAvatarPromoteLevel(int NeedAvatarPromoteLevel){
this.NeedAvatarPromoteLevel = NeedAvatarPromoteLevel;
} }
public int getNeedAvatarPromoteLevel(){ public int getNeedAvatarPromoteLevel(){
return this.NeedAvatarPromoteLevel; return this.needAvatarPromoteLevel;
} }
} }
} }
package emu.grasscutter.data.def; package emu.grasscutter.data.excels;
import java.util.ArrayList; import java.util.ArrayList;
import emu.grasscutter.data.GameResource; import emu.grasscutter.data.GameResource;
...@@ -8,51 +8,51 @@ import emu.grasscutter.data.common.FightPropData; ...@@ -8,51 +8,51 @@ import emu.grasscutter.data.common.FightPropData;
@ResourceType(name = "AvatarTalentExcelConfigData.json", loadPriority = LoadPriority.HIGHEST) @ResourceType(name = "AvatarTalentExcelConfigData.json", loadPriority = LoadPriority.HIGHEST)
public class AvatarTalentData extends GameResource { public class AvatarTalentData extends GameResource {
private int TalentId; private int talentId;
private int PrevTalent; private int prevTalent;
private long NameTextMapHash; private long nameTextMapHash;
private String Icon; private String icon;
private int MainCostItemId; private int mainCostItemId;
private int MainCostItemCount; private int mainCostItemCount;
private String OpenConfig; private String openConfig;
private FightPropData[] AddProps; private FightPropData[] addProps;
private float[] ParamList; private float[] paramList;
@Override @Override
public int getId(){ public int getId(){
return this.TalentId; return this.talentId;
} }
public int PrevTalent() { public int PrevTalent() {
return PrevTalent; return prevTalent;
} }
public long getNameTextMapHash() { public long getNameTextMapHash() {
return NameTextMapHash; return nameTextMapHash;
} }
public String getIcon() { public String getIcon() {
return Icon; return icon;
} }
public int getMainCostItemId() { public int getMainCostItemId() {
return MainCostItemId; return mainCostItemId;
} }
public int getMainCostItemCount() { public int getMainCostItemCount() {
return MainCostItemCount; return mainCostItemCount;
} }
public String getOpenConfig() { public String getOpenConfig() {
return OpenConfig; return openConfig;
} }
public FightPropData[] getAddProps() { public FightPropData[] getAddProps() {
return AddProps; return addProps;
} }
public float[] getParamList() { public float[] getParamList() {
return ParamList; return paramList;
} }
@Override @Override
...@@ -64,6 +64,6 @@ public class AvatarTalentData extends GameResource { ...@@ -64,6 +64,6 @@ public class AvatarTalentData extends GameResource {
parsed.add(prop); parsed.add(prop);
} }
} }
this.AddProps = parsed.toArray(new FightPropData[parsed.size()]); this.addProps = parsed.toArray(new FightPropData[parsed.size()]);
} }
} }
package emu.grasscutter.data.excels;
import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType;
@ResourceType(name = {"AnimalCodexExcelConfigData.json"})
public class CodexAnimalData extends GameResource {
private int Id;
private String type;
private int describeId;
private int sortOrder;
private CodexAnimalUnlockCondition OCCLHPBCDGL;
@Override
public int getId() {
return Id;
}
public String getType() {
return type;
}
public int getDescribeId() {
return describeId;
}
public int getSortOrder() {
return sortOrder;
}
public CodexAnimalUnlockCondition getUnlockCondition() {
return OCCLHPBCDGL;
}
public enum CodexAnimalUnlockCondition {
CODEX_COUNT_TYPE_KILL,
CODEX_COUNT_TYPE_CAPTURE
}
}
package emu.grasscutter.data.excels;
import emu.grasscutter.data.GameData;
import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType;
@ResourceType(name = {"MaterialCodexExcelConfigData.json"})
public class CodexMaterialData extends GameResource {
private int Id;
private int materialId;
private int sortOrder;
public int getSortOrder() {
return sortOrder;
}
public int getMaterialId() {
return materialId;
}
public int getId() {
return Id;
}
@Override
public void onLoad() {
GameData.getCodexMaterialDataIdMap().put(this.getMaterialId(), this);
}
}
package emu.grasscutter.data.excels;
import emu.grasscutter.data.GameData;
import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType;
@ResourceType(name = {"QuestCodexExcelConfigData.json"})
public class CodexQuestData extends GameResource {
private int Id;
private int parentQuestId;
private int chapterId;
private int sortOrder;
private boolean isDisuse;
public int getParentQuestId() {
return parentQuestId;
}
public int getId() {
return Id;
}
public int getChapterId() {
return chapterId;
}
public int getSortOrder() {
return sortOrder;
}
public boolean getIsDisuse() {
return isDisuse;
}
@Override
public void onLoad() {
if(!this.getIsDisuse()) {
GameData.getCodexQuestDataIdMap().put(this.getParentQuestId(), this);
}
}
}
package emu.grasscutter.data.excels;
import emu.grasscutter.data.GameData;
import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType;
@ResourceType(name = {"ReliquaryCodexExcelConfigData.json"})
public class CodexReliquaryData extends GameResource {
private int Id;
private int suitId;
private int level;
private int cupId;
private int leatherId;
private int capId;
private int flowerId;
private int sandId;
private int sortOrder;
public int getSortOrder() {
return sortOrder;
}
public int getId() {
return Id;
}
public int getSuitId() {
return suitId;
}
public int getLevel() {
return level;
}
public int getCupId() {
return cupId;
}
public int getLeatherId() {
return leatherId;
}
public int getCapId() {
return capId;
}
public int getFlowerId() {
return flowerId;
}
public int getSandId() {
return sandId;
}
@Override
public void onLoad() {
GameData.getcodexReliquaryArrayList().add(this);
GameData.getcodexReliquaryIdMap().put(getSuitId(), this);
}
}
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