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.excels;
import emu.grasscutter.data.GameData;
import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType;
@ResourceType(name = {"WeaponCodexExcelConfigData.json"})
public class CodexWeaponData extends GameResource {
private int Id;
private int weaponId;
private int sortOrder;
public int getSortOrder() {
return sortOrder;
}
public int getWeaponId() {
return weaponId;
}
public int getId() {
return Id;
}
@Override
public void onLoad() {
GameData.getCodexWeaponDataIdMap().put(this.getWeaponId(), this);
}
}
package emu.grasscutter.data.excels;
import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.data.common.ItemParamData;
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<ItemParamData> randomItems;
private List<ItemParamData> materialItems;
private String recipeType;
@Override
public int getId() {
return this.combineId;
}
@Override
public void onLoad() {
super.onLoad();
// clean data
randomItems = randomItems.stream().filter(item -> item.getId() > 0).collect(Collectors.toList());
materialItems = materialItems.stream().filter(item -> item.getId() > 0).collect(Collectors.toList());
}
public int getCombineId() {
return combineId;
}
public int getPlayerLevel() {
return playerLevel;
}
public boolean isDefaultShow() {
return isDefaultShow;
}
public int getCombineType() {
return combineType;
}
public int getSubCombineType() {
return subCombineType;
}
public int getResultItemId() {
return resultItemId;
}
public int getResultItemCount() {
return resultItemCount;
}
public int getScoinCost() {
return scoinCost;
}
public List<ItemParamData> getRandomItems() {
return randomItems;
}
public List<ItemParamData> getMaterialItems() {
return materialItems;
}
public String getRecipeType() {
return recipeType;
}
}
package emu.grasscutter.data.def; package emu.grasscutter.data.excels;
import java.util.Calendar; import java.util.Calendar;
...@@ -12,14 +12,14 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; ...@@ -12,14 +12,14 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
@ResourceType(name = "DailyDungeonConfigData.json") @ResourceType(name = "DailyDungeonConfigData.json")
public class DailyDungeonData extends GameResource { public class DailyDungeonData extends GameResource {
private int Id; private int id;
private int[] Monday; private int[] monday;
private int[] Tuesday; private int[] tuesday;
private int[] Wednesday; private int[] wednesday;
private int[] Thursday; private int[] thursday;
private int[] Friday; private int[] friday;
private int[] Saturday; private int[] saturday;
private int[] Sunday; private int[] sunday;
private static final int[] empty = new int[0]; private static final int[] empty = new int[0];
private final Int2ObjectMap<int[]> map; private final Int2ObjectMap<int[]> map;
...@@ -30,7 +30,7 @@ public class DailyDungeonData extends GameResource { ...@@ -30,7 +30,7 @@ public class DailyDungeonData extends GameResource {
@Override @Override
public int getId() { public int getId() {
return this.Id; return this.id;
} }
public int[] getDungeonsByDay(int day) { public int[] getDungeonsByDay(int day) {
...@@ -39,12 +39,12 @@ public class DailyDungeonData extends GameResource { ...@@ -39,12 +39,12 @@ public class DailyDungeonData extends GameResource {
@Override @Override
public void onLoad() { public void onLoad() {
map.put(Calendar.MONDAY, Monday); map.put(Calendar.MONDAY, monday);
map.put(Calendar.TUESDAY, Tuesday); map.put(Calendar.TUESDAY, tuesday);
map.put(Calendar.WEDNESDAY, Wednesday); map.put(Calendar.WEDNESDAY, wednesday);
map.put(Calendar.THURSDAY, Thursday); map.put(Calendar.THURSDAY, thursday);
map.put(Calendar.FRIDAY, Friday); map.put(Calendar.FRIDAY, friday);
map.put(Calendar.SATURDAY, Saturday); map.put(Calendar.SATURDAY, saturday);
map.put(Calendar.SUNDAY, Sunday); map.put(Calendar.SUNDAY, sunday);
} }
} }
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;
...@@ -8,25 +8,25 @@ import emu.grasscutter.game.props.SceneType; ...@@ -8,25 +8,25 @@ import emu.grasscutter.game.props.SceneType;
@ResourceType(name = "DungeonExcelConfigData.json") @ResourceType(name = "DungeonExcelConfigData.json")
public class DungeonData extends GameResource { public class DungeonData extends GameResource {
private int Id; private int id;
private int SceneId; private int sceneId;
private int ShowLevel; private int showLevel;
private int PassRewardPreviewID; private int passRewardPreviewID;
private String InvolveType; // TODO enum private String involveType; // TODO enum
private RewardPreviewData previewData; private RewardPreviewData previewData;
@Override @Override
public int getId() { public int getId() {
return this.Id; return this.id;
} }
public int getSceneId() { public int getSceneId() {
return SceneId; return sceneId;
} }
public int getShowLevel() { public int getShowLevel() {
return ShowLevel; return showLevel;
} }
public RewardPreviewData getRewardPreview() { public RewardPreviewData getRewardPreview() {
...@@ -35,8 +35,8 @@ public class DungeonData extends GameResource { ...@@ -35,8 +35,8 @@ public class DungeonData extends GameResource {
@Override @Override
public void onLoad() { public void onLoad() {
if (this.PassRewardPreviewID > 0) { if (this.passRewardPreviewID > 0) {
this.previewData = GameData.getRewardPreviewDataMap().get(this.PassRewardPreviewID); this.previewData = GameData.getRewardPreviewDataMap().get(this.passRewardPreviewID);
} }
} }
} }
package emu.grasscutter.data.excels;
import java.util.List;
import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType;
@ResourceType(name = "EnvAnimalGatherExcelConfigData.json", loadPriority = ResourceType.LoadPriority.LOW)
public class EnvAnimalGatherConfigData extends GameResource {
private int animalId;
private String entityType;
private List<GatherItem> gatherItemId;
private String excludeWeathers;
private int aliveTime;
private int escapeTime;
private int escapeRadius;
@Override
public int getId() {
return animalId;
}
public int getAnimalId(){
return animalId;
}
public String getEntityType(){
return entityType;
}
public GatherItem gatherItem(){
return gatherItemId.get(0);
}
public static class GatherItem{
private int id;
private int count;
public int getId(){
return id;
}
public int getCount(){
return count;
}
}
}
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,41 +8,41 @@ import emu.grasscutter.data.common.FightPropData; ...@@ -8,41 +8,41 @@ import emu.grasscutter.data.common.FightPropData;
@ResourceType(name = "EquipAffixExcelConfigData.json") @ResourceType(name = "EquipAffixExcelConfigData.json")
public class EquipAffixData extends GameResource { public class EquipAffixData extends GameResource {
private int AffixId; private int affixId;
private int Id; private int id;
private int Level; private int level;
private long NameTextMapHash; private long nameTextMapHash;
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 AffixId; return affixId;
} }
public int getMainId() { public int getMainId() {
return Id; return id;
} }
public int getLevel() { public int getLevel() {
return Level; return level;
} }
public long getNameTextMapHash() { public long getNameTextMapHash() {
return NameTextMapHash; return nameTextMapHash;
} }
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
...@@ -54,6 +54,6 @@ public class EquipAffixData extends GameResource { ...@@ -54,6 +54,6 @@ public class EquipAffixData 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 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;
@ResourceType(name = "FetterCharacterCardExcelConfigData.json", loadPriority = LoadPriority.HIGHEST) @ResourceType(name = "FetterCharacterCardExcelConfigData.json", loadPriority = LoadPriority.HIGHEST)
public class FetterCharacterCardData extends GameResource { public class FetterCharacterCardData extends GameResource {
private int AvatarId; private int avatarId;
private int RewardId; private int rewardId;
@Override @Override
public int getId() { public int getId() {
return AvatarId; return avatarId;
} }
public int getRewardId() { public int getRewardId() {
return RewardId; return rewardId;
} }
@Override @Override
public void onLoad() { public void onLoad() {
} }
} }
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.data.common.OpenCondData; import emu.grasscutter.data.common.OpenCondData;
@ResourceType(name = {"FetterInfoExcelConfigData.json", "FettersExcelConfigData.json", "FetterStoryExcelConfigData.json", "PhotographExpressionExcelConfigData.json", "PhotographPosenameExcelConfigData.json"}, loadPriority = LoadPriority.HIGHEST) @ResourceType(name = {"FetterInfoExcelConfigData.json", "FettersExcelConfigData.json", "FetterStoryExcelConfigData.json", "PhotographExpressionExcelConfigData.json", "PhotographPosenameExcelConfigData.json"}, loadPriority = LoadPriority.HIGHEST)
public class FetterData extends GameResource { public class FetterData extends GameResource {
private int AvatarId; private int avatarId;
private int FetterId; private int fetterId;
private List<OpenCondData> OpenCond; private List<OpenCondData> openCond;
@Override @Override
public int getId() { public int getId() {
return FetterId; return fetterId;
} }
public int getAvatarId() { public int getAvatarId() {
return AvatarId; return avatarId;
} }
public List<OpenCondData> getOpenConds() { public List<OpenCondData> getOpenConds() {
return OpenCond; return openCond;
} }
@Override @Override
public void onLoad() { public void onLoad() {
} }
} }
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;
...@@ -6,53 +6,53 @@ import emu.grasscutter.game.props.EntityType; ...@@ -6,53 +6,53 @@ import emu.grasscutter.game.props.EntityType;
@ResourceType(name = "GadgetExcelConfigData.json") @ResourceType(name = "GadgetExcelConfigData.json")
public class GadgetData extends GameResource { public class GadgetData extends GameResource {
private int Id; private int id;
private EntityType Type; private EntityType type;
private String JsonName; private String jsonName;
private boolean IsInteractive; private boolean isInteractive;
private String[] Tags; private String[] tags;
private String ItemJsonName; private String itemJsonName;
private String InteeIconName; private String inteeIconName;
private long NameTextMapHash; private long nameTextMapHash;
private int CampID; private int campID;
private String LODPatternName; private String LODPatternName;
@Override @Override
public int getId() { public int getId() {
return this.Id; return this.id;
} }
public EntityType getType() { public EntityType getType() {
return Type; return type;
} }
public String getJsonName() { public String getJsonName() {
return JsonName; return jsonName;
} }
public boolean isInteractive() { public boolean isInteractive() {
return IsInteractive; return isInteractive;
} }
public String[] getTags() { public String[] getTags() {
return Tags; return tags;
} }
public String getItemJsonName() { public String getItemJsonName() {
return ItemJsonName; return itemJsonName;
} }
public String getInteeIconName() { public String getInteeIconName() {
return InteeIconName; return inteeIconName;
} }
public long getNameTextMapHash() { public long getNameTextMapHash() {
return NameTextMapHash; return nameTextMapHash;
} }
public int getCampID() { public int getCampID() {
return CampID; return campID;
} }
public String getLODPatternName() { return LODPatternName; } public String getLODPatternName() { return LODPatternName; }
......
package emu.grasscutter.data.def; package emu.grasscutter.data.excels;
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.common.ItemUseData;
import emu.grasscutter.game.props.FightProperty; import emu.grasscutter.game.props.FightProperty;
import it.unimi.dsi.fastutil.ints.IntOpenHashSet; import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
import it.unimi.dsi.fastutil.ints.IntSet; import it.unimi.dsi.fastutil.ints.IntSet;
...@@ -9,164 +12,170 @@ import it.unimi.dsi.fastutil.ints.IntSet; ...@@ -9,164 +12,170 @@ import it.unimi.dsi.fastutil.ints.IntSet;
@ResourceType(name = {"MaterialExcelConfigData.json", "WeaponExcelConfigData.json", "ReliquaryExcelConfigData.json"}) @ResourceType(name = {"MaterialExcelConfigData.json", "WeaponExcelConfigData.json", "ReliquaryExcelConfigData.json"})
public class ItemData extends GameResource { public class ItemData extends GameResource {
private int Id; private int id;
private int StackLimit = 1; private int stackLimit = 1;
private int MaxUseCount; private int maxUseCount;
private int RankLevel; private int rankLevel;
private String EffectName; private String effectName;
private int[] SatiationParams; private int[] satiationParams;
private int Rank; private int rank;
private int Weight; private int weight;
private int GadgetId; private int gadgetId;
private int[] DestroyReturnMaterial; private int[] destroyReturnMaterial;
private int[] DestroyReturnMaterialCount; private int[] destroyReturnMaterialCount;
private List<ItemUseData> itemUse;
// Food // Food
private String FoodQuality; private String foodQuality;
private String UseTarget; private String useTarget;
private String[] UseParam; private String[] iseParam;
// String enums // String enums
private String ItemType; private String itemType;
private String MaterialType; private String materialType;
private String EquipType; private String equipType;
private String EffectType; private String effectType;
private String DestroyRule; private String destroyRule;
// Relic // Relic
private int MainPropDepotId; private int mainPropDepotId;
private int AppendPropDepotId; private int appendPropDepotId;
private int AppendPropNum; private int appendPropNum;
private int SetId; private int setId;
private int[] AddPropLevels; private int[] addPropLevels;
private int BaseConvExp; private int baseConvExp;
private int MaxLevel; private int maxLevel;
// Weapon // Weapon
private int WeaponPromoteId; private int weaponPromoteId;
private int WeaponBaseExp; private int weaponBaseExp;
private int StoryId; private int storyId;
private int AvatarPromoteId; private int avatarPromoteId;
private int AwakenMaterial; private int awakenMaterial;
private int[] AwakenCosts; private int[] awakenCosts;
private int[] SkillAffix; private int[] skillAffix;
private WeaponProperty[] WeaponProp; private WeaponProperty[] weaponProp;
// Hash // Hash
private String Icon; private String icon;
private long NameTextMapHash; private long nameTextMapHash;
// Post load // Post load
private transient emu.grasscutter.game.inventory.MaterialType materialType; private transient emu.grasscutter.game.inventory.MaterialType materialEnumType;
private transient emu.grasscutter.game.inventory.ItemType itemType; private transient emu.grasscutter.game.inventory.ItemType itemEnumType;
private transient emu.grasscutter.game.inventory.EquipType equipType; private transient emu.grasscutter.game.inventory.EquipType equipEnumType;
private IntSet addPropLevelSet; private IntSet addPropLevelSet;
@Override @Override
public int getId(){ public int getId(){
return this.Id; return this.id;
} }
public String getMaterialTypeString(){ public String getMaterialTypeString(){
return this.MaterialType; return this.materialType;
} }
public int getStackLimit(){ public int getStackLimit(){
return this.StackLimit; return this.stackLimit;
} }
public int getMaxUseCount(){ public int getMaxUseCount(){
return this.MaxUseCount; return this.maxUseCount;
} }
public String getUseTarget(){ public String getUseTarget(){
return this.UseTarget; return this.useTarget;
} }
public String[] getUseParam(){ public String[] getUseParam(){
return this.UseParam; return this.iseParam;
} }
public int getRankLevel(){ public int getRankLevel(){
return this.RankLevel; return this.rankLevel;
} }
public String getFoodQuality(){ public String getFoodQuality(){
return this.FoodQuality; return this.foodQuality;
} }
public String getEffectName(){ public String getEffectName(){
return this.EffectName; return this.effectName;
} }
public int[] getSatiationParams(){ public int[] getSatiationParams(){
return this.SatiationParams; return this.satiationParams;
} }
public int[] getDestroyReturnMaterial(){ public int[] getDestroyReturnMaterial(){
return this.DestroyReturnMaterial; return this.destroyReturnMaterial;
} }
public int[] getDestroyReturnMaterialCount(){ public int[] getDestroyReturnMaterialCount(){
return this.DestroyReturnMaterialCount; return this.destroyReturnMaterialCount;
} }
public List<ItemUseData> getItemUse() {
return itemUse;
}
public long getNameTextMapHash(){ public long getNameTextMapHash(){
return this.NameTextMapHash; return this.nameTextMapHash;
} }
public String getIcon(){ public String getIcon(){
return this.Icon; return this.icon;
} }
public String getItemTypeString(){ public String getItemTypeString(){
return this.ItemType; return this.itemType;
} }
public int getRank(){ public int getRank(){
return this.Rank; return this.rank;
} }
public int getGadgetId() { public int getGadgetId() {
return GadgetId; return gadgetId;
} }
public int getBaseConvExp() { public int getBaseConvExp() {
return BaseConvExp; return baseConvExp;
} }
public int getMainPropDepotId() { public int getMainPropDepotId() {
return MainPropDepotId; return mainPropDepotId;
} }
public int getAppendPropDepotId() { public int getAppendPropDepotId() {
return AppendPropDepotId; return appendPropDepotId;
} }
public int getAppendPropNum() { public int getAppendPropNum() {
return AppendPropNum; return appendPropNum;
} }
public int getSetId() { public int getSetId() {
return SetId; return setId;
} }
public int getWeaponPromoteId() { public int getWeaponPromoteId() {
return WeaponPromoteId; return weaponPromoteId;
} }
public int getWeaponBaseExp() { public int getWeaponBaseExp() {
return WeaponBaseExp; return weaponBaseExp;
} }
public int getAwakenMaterial() { public int getAwakenMaterial() {
return AwakenMaterial; return awakenMaterial;
} }
public int[] getAwakenCosts() { public int[] getAwakenCosts() {
return AwakenCosts; return awakenCosts;
} }
public IntSet getAddPropLevelSet() { public IntSet getAddPropLevelSet() {
...@@ -174,27 +183,27 @@ public class ItemData extends GameResource { ...@@ -174,27 +183,27 @@ public class ItemData extends GameResource {
} }
public int[] getSkillAffix() { public int[] getSkillAffix() {
return SkillAffix; return skillAffix;
} }
public WeaponProperty[] getWeaponProperties() { public WeaponProperty[] getWeaponProperties() {
return WeaponProp; return weaponProp;
} }
public int getMaxLevel() { public int getMaxLevel() {
return MaxLevel; return maxLevel;
} }
public emu.grasscutter.game.inventory.ItemType getItemType() { public emu.grasscutter.game.inventory.ItemType getItemType() {
return this.itemType; return this.itemEnumType;
} }
public emu.grasscutter.game.inventory.MaterialType getMaterialType() { public emu.grasscutter.game.inventory.MaterialType getMaterialType() {
return this.materialType; return this.materialEnumType;
} }
public emu.grasscutter.game.inventory.EquipType getEquipType() { public emu.grasscutter.game.inventory.EquipType getEquipType() {
return this.equipType; return this.equipEnumType;
} }
public boolean canAddRelicProp(int level) { public boolean canAddRelicProp(int level) {
...@@ -202,23 +211,23 @@ public class ItemData extends GameResource { ...@@ -202,23 +211,23 @@ public class ItemData extends GameResource {
} }
public boolean isEquip() { public boolean isEquip() {
return this.itemType == emu.grasscutter.game.inventory.ItemType.ITEM_RELIQUARY || this.itemType == emu.grasscutter.game.inventory.ItemType.ITEM_WEAPON; return this.itemEnumType == emu.grasscutter.game.inventory.ItemType.ITEM_RELIQUARY || this.itemEnumType == emu.grasscutter.game.inventory.ItemType.ITEM_WEAPON;
} }
@Override @Override
public void onLoad() { public void onLoad() {
this.itemType = emu.grasscutter.game.inventory.ItemType.getTypeByName(getItemTypeString()); this.itemEnumType = emu.grasscutter.game.inventory.ItemType.getTypeByName(getItemTypeString());
this.materialType = emu.grasscutter.game.inventory.MaterialType.getTypeByName(getMaterialTypeString()); this.materialEnumType = emu.grasscutter.game.inventory.MaterialType.getTypeByName(getMaterialTypeString());
if (this.itemType == emu.grasscutter.game.inventory.ItemType.ITEM_RELIQUARY) { if (this.itemEnumType == emu.grasscutter.game.inventory.ItemType.ITEM_RELIQUARY) {
this.equipType = emu.grasscutter.game.inventory.EquipType.getTypeByName(this.EquipType); this.equipEnumType = emu.grasscutter.game.inventory.EquipType.getTypeByName(this.equipType);
if (this.AddPropLevels != null && this.AddPropLevels.length > 0) { if (this.addPropLevels != null && this.addPropLevels.length > 0) {
this.addPropLevelSet = new IntOpenHashSet(this.AddPropLevels); this.addPropLevelSet = new IntOpenHashSet(this.addPropLevels);
} }
} else if (this.itemType == emu.grasscutter.game.inventory.ItemType.ITEM_WEAPON) { } else if (this.itemEnumType == emu.grasscutter.game.inventory.ItemType.ITEM_WEAPON) {
this.equipType = emu.grasscutter.game.inventory.EquipType.EQUIP_WEAPON; this.equipEnumType = emu.grasscutter.game.inventory.EquipType.EQUIP_WEAPON;
} else { } else {
this.equipType = emu.grasscutter.game.inventory.EquipType.EQUIP_NONE; this.equipEnumType = emu.grasscutter.game.inventory.EquipType.EQUIP_NONE;
} }
if (this.getWeaponProperties() != null) { if (this.getWeaponProperties() != null) {
...@@ -230,20 +239,20 @@ public class ItemData extends GameResource { ...@@ -230,20 +239,20 @@ public class ItemData extends GameResource {
public static class WeaponProperty { public static class WeaponProperty {
private FightProperty fightProp; private FightProperty fightProp;
private String PropType; private String propType;
private float InitValue; private float initValue;
private String Type; private String type;
public String getPropType(){ public String getPropType(){
return this.PropType; return this.propType;
} }
public float getInitValue(){ public float getInitValue(){
return this.InitValue; return this.initValue;
} }
public String getType(){ public String getType(){
return this.Type; return this.type;
} }
public FightProperty getFightProp() { public FightProperty getFightProp() {
...@@ -251,7 +260,7 @@ public class ItemData extends GameResource { ...@@ -251,7 +260,7 @@ public class ItemData extends GameResource {
} }
public void onLoad() { public void onLoad() {
this.fightProp = FightProperty.getPropByName(PropType); this.fightProp = FightProperty.getPropByName(propType);
} }
} }
......
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,23 +10,23 @@ import emu.grasscutter.data.common.CurveInfo; ...@@ -10,23 +10,23 @@ import emu.grasscutter.data.common.CurveInfo;
@ResourceType(name = "MonsterCurveExcelConfigData.json") @ResourceType(name = "MonsterCurveExcelConfigData.json")
public class MonsterCurveData extends GameResource { public class MonsterCurveData 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 Level; return level;
} }
public float getMultByProp(String fightProp) { public float getMultByProp(String fightProp) {
return curveInfos.getOrDefault(fightProp, 1f); return curveInfoMap.getOrDefault(fightProp, 1f);
} }
@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;
...@@ -7,155 +7,157 @@ import emu.grasscutter.data.GameResource; ...@@ -7,155 +7,157 @@ 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.common.PropGrowCurve; import emu.grasscutter.data.common.PropGrowCurve;
import emu.grasscutter.game.props.MonsterType;
@ResourceType(name = "MonsterExcelConfigData.json", loadPriority = LoadPriority.LOW) @ResourceType(name = "MonsterExcelConfigData.json", loadPriority = LoadPriority.LOW)
public class MonsterData extends GameResource { public class MonsterData extends GameResource {
private int Id; private int id;
private String MonsterName; private String monsterName;
private String Type; private MonsterType type;
private String ServerScript; private String serverScript;
private List<Integer> Affix; private List<Integer> affix;
private String Ai; private String ai;
private int[] Equips; private int[] equips;
private List<HpDrops> HpDrops; private List<HpDrops> hpDrops;
private int KillDropId; private int killDropId;
private String ExcludeWeathers; private String excludeWeathers;
private int FeatureTagGroupID; private int featureTagGroupID;
private int MpPropID; private int mpPropID;
private String Skin; private String skin;
private int DescribeId; private int describeId;
private int CombatBGMLevel; private int combatBGMLevel;
private int EntityBudgetLevel; private int entityBudgetLevel;
private float HpBase; private float hpBase;
private float AttackBase; private float attackBase;
private float DefenseBase; private float defenseBase;
private float FireSubHurt; private float fireSubHurt;
private float ElecSubHurt; private float elecSubHurt;
private float GrassSubHurt; private float grassSubHurt;
private float WaterSubHurt; private float waterSubHurt;
private float WindSubHurt; private float windSubHurt;
private float RockSubHurt; private float rockSubHurt;
private float IceSubHurt; private float iceSubHurt;
private float PhysicalSubHurt; private float physicalSubHurt;
private List<PropGrowCurve> PropGrowCurves; private List<PropGrowCurve> propGrowCurves;
private long NameTextMapHash; private long nameTextMapHash;
private int CampID; private int campID;
// Transient
private int weaponId; private int weaponId;
private MonsterDescribeData describeData; private MonsterDescribeData describeData;
@Override @Override
public int getId() { public int getId() {
return this.Id; return this.id;
} }
public String getMonsterName() { public String getMonsterName() {
return MonsterName; return monsterName;
} }
public String getType() { public MonsterType getType() {
return Type; return type;
} }
public String getServerScript() { public String getServerScript() {
return ServerScript; return serverScript;
} }
public List<Integer> getAffix() { public List<Integer> getAffix() {
return Affix; return affix;
} }
public String getAi() { public String getAi() {
return Ai; return ai;
} }
public int[] getEquips() { public int[] getEquips() {
return Equips; return equips;
} }
public List<HpDrops> getHpDrops() { public List<HpDrops> getHpDrops() {
return HpDrops; return hpDrops;
} }
public int getKillDropId() { public int getKillDropId() {
return KillDropId; return killDropId;
} }
public String getExcludeWeathers() { public String getExcludeWeathers() {
return ExcludeWeathers; return excludeWeathers;
} }
public int getFeatureTagGroupID() { public int getFeatureTagGroupID() {
return FeatureTagGroupID; return featureTagGroupID;
} }
public int getMpPropID() { public int getMpPropID() {
return MpPropID; return mpPropID;
} }
public String getSkin() { public String getSkin() {
return Skin; return skin;
} }
public int getDescribeId() { public int getDescribeId() {
return DescribeId; return describeId;
} }
public int getCombatBGMLevel() { public int getCombatBGMLevel() {
return CombatBGMLevel; return combatBGMLevel;
} }
public int getEntityBudgetLevel() { public int getEntityBudgetLevel() {
return EntityBudgetLevel; return entityBudgetLevel;
} }
public float getBaseHp() { public float getBaseHp() {
return HpBase; return hpBase;
} }
public float getBaseAttack() { public float getBaseAttack() {
return AttackBase; return attackBase;
} }
public float getBaseDefense() { public float getBaseDefense() {
return DefenseBase; return defenseBase;
} }
public float getElecSubHurt() { public float getElecSubHurt() {
return ElecSubHurt; return elecSubHurt;
} }
public float getGrassSubHurt() { public float getGrassSubHurt() {
return GrassSubHurt; return grassSubHurt;
} }
public float getWaterSubHurt() { public float getWaterSubHurt() {
return WaterSubHurt; return waterSubHurt;
} }
public float getWindSubHurt() { public float getWindSubHurt() {
return WindSubHurt; return windSubHurt;
} }
public float getIceSubHurt() { public float getIceSubHurt() {
return IceSubHurt; return iceSubHurt;
} }
public float getPhysicalSubHurt() { public float getPhysicalSubHurt() {
return PhysicalSubHurt; return physicalSubHurt;
} }
public List<PropGrowCurve> getPropGrowCurves() { public List<PropGrowCurve> getPropGrowCurves() {
return PropGrowCurves; return propGrowCurves;
} }
public long getNameTextMapHash() { public long getNameTextMapHash() {
return NameTextMapHash; return nameTextMapHash;
} }
public int getCampID() { public int getCampID() {
return CampID; return campID;
} }
public MonsterDescribeData getDescribeData() { public MonsterDescribeData getDescribeData() {
...@@ -170,7 +172,7 @@ public class MonsterData extends GameResource { ...@@ -170,7 +172,7 @@ public class MonsterData extends GameResource {
public void onLoad() { public void onLoad() {
this.describeData = GameData.getMonsterDescribeDataMap().get(this.getDescribeId()); this.describeData = GameData.getMonsterDescribeDataMap().get(this.getDescribeId());
for (int id : this.Equips) { for (int id : this.equips) {
if (id == 0) { if (id == 0) {
continue; continue;
} }
......
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;
...@@ -6,31 +6,31 @@ import emu.grasscutter.data.ResourceType.LoadPriority; ...@@ -6,31 +6,31 @@ import emu.grasscutter.data.ResourceType.LoadPriority;
@ResourceType(name = "MonsterDescribeExcelConfigData.json", loadPriority = LoadPriority.HIGH) @ResourceType(name = "MonsterDescribeExcelConfigData.json", loadPriority = LoadPriority.HIGH)
public class MonsterDescribeData extends GameResource { public class MonsterDescribeData extends GameResource {
private int Id; private int id;
private long NameTextMapHash; private long nameTextMapHash;
private int TitleID; private int titleID;
private int SpecialNameLabID; private int specialNameLabID;
private String Icon; private String icon;
@Override @Override
public int getId() { public int getId() {
return Id; return id;
} }
public long getNameTextMapHash() { public long getNameTextMapHash() {
return NameTextMapHash; return nameTextMapHash;
} }
public int getTitleID() { public int getTitleID() {
return TitleID; return titleID;
} }
public int getSpecialNameLabID() { public int getSpecialNameLabID() {
return SpecialNameLabID; return specialNameLabID;
} }
public String getIcon() { public String getIcon() {
return Icon; return icon;
} }
@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 = "NpcExcelConfigData.json") @ResourceType(name = "NpcExcelConfigData.json")
public class NpcData extends GameResource { public class NpcData extends GameResource {
private int Id; private int id;
private String JsonName; private String jsonName;
private String Alias; private String alias;
private String ScriptDataPath; private String scriptDataPath;
private String LuaDataPath; private String luaDataPath;
private boolean IsInteractive; private boolean isInteractive;
private boolean HasMove; private boolean hasMove;
private String DyePart; private String dyePart;
private String BillboardIcon; private String billboardIcon;
private long NameTextMapHash; private long nameTextMapHash;
private int CampID; private int campID;
@Override @Override
public int getId() { public int getId() {
return this.Id; return this.id;
} }
public String getJsonName() { public String getJsonName() {
return JsonName; return jsonName;
} }
public String getAlias() { public String getAlias() {
return Alias; return alias;
} }
public String getScriptDataPath() { public String getScriptDataPath() {
return ScriptDataPath; return scriptDataPath;
} }
public String getLuaDataPath() { public String getLuaDataPath() {
return LuaDataPath; return luaDataPath;
} }
public boolean isIsInteractive() { public boolean isIsInteractive() {
return IsInteractive; return isInteractive;
} }
public boolean isHasMove() { public boolean isHasMove() {
return HasMove; return hasMove;
} }
public String getDyePart() { public String getDyePart() {
return DyePart; return dyePart;
} }
public String getBillboardIcon() { public String getBillboardIcon() {
return BillboardIcon; return billboardIcon;
} }
public long getNameTextMapHash() { public long getNameTextMapHash() {
return NameTextMapHash; return nameTextMapHash;
} }
public int getCampID() { public int getCampID() {
return CampID; return campID;
} }
@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 = "PlayerLevelExcelConfigData.json") @ResourceType(name = "PlayerLevelExcelConfigData.json")
public class PlayerLevelData extends GameResource { public class PlayerLevelData extends GameResource {
private int Level; private int level;
private int Exp; private int exp;
private int RewardId; private int rewardId;
private int UnlockWorldLevel; private int unlockWorldLevel;
@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;
} }
public int getRewardId() { public int getRewardId() {
return RewardId; return rewardId;
} }
public int getUnlockWorldLevel() { public int getUnlockWorldLevel() {
return UnlockWorldLevel; return unlockWorldLevel;
} }
} }
package emu.grasscutter.data.def; package emu.grasscutter.data.excels;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -11,82 +11,82 @@ import emu.grasscutter.data.common.ItemParamData; ...@@ -11,82 +11,82 @@ import emu.grasscutter.data.common.ItemParamData;
@ResourceType(name = "ProudSkillExcelConfigData.json") @ResourceType(name = "ProudSkillExcelConfigData.json")
public class ProudSkillData extends GameResource { public class ProudSkillData extends GameResource {
private int ProudSkillId; private int proudSkillId;
private int ProudSkillGroupId; private int proudSkillGroupId;
private int Level; private int level;
private int CoinCost; private int coinCost;
private int BreakLevel; private int breakLevel;
private int ProudSkillType; private int proudSkillType;
private String OpenConfig; private String openConfig;
private List<ItemParamData> CostItems; private List<ItemParamData> costItems;
private List<String> FilterConds; private List<String> filterConds;
private List<String> LifeEffectParams; private List<String> lifeEffectParams;
private FightPropData[] AddProps; private FightPropData[] addProps;
private float[] ParamList; private float[] paramList;
private long[] ParamDescList; private long[] paramDescList;
private long NameTextMapHash; private long nameTextMapHash;
@Override @Override
public int getId() { public int getId() {
return ProudSkillId; return proudSkillId;
} }
public int getProudSkillGroupId() { public int getProudSkillGroupId() {
return ProudSkillGroupId; return proudSkillGroupId;
} }
public int getLevel() { public int getLevel() {
return Level; return level;
} }
public int getCoinCost() { public int getCoinCost() {
return CoinCost; return coinCost;
} }
public int getBreakLevel() { public int getBreakLevel() {
return BreakLevel; return breakLevel;
} }
public int getProudSkillType() { public int getProudSkillType() {
return ProudSkillType; return proudSkillType;
} }
public String getOpenConfig() { public String getOpenConfig() {
return OpenConfig; return openConfig;
} }
public List<ItemParamData> getCostItems() { public List<ItemParamData> getCostItems() {
return CostItems; return costItems;
} }
public List<String> getFilterConds() { public List<String> getFilterConds() {
return FilterConds; return filterConds;
} }
public List<String> getLifeEffectParams() { public List<String> getLifeEffectParams() {
return LifeEffectParams; return lifeEffectParams;
} }
public FightPropData[] getAddProps() { public FightPropData[] getAddProps() {
return AddProps; return addProps;
} }
public float[] getParamList() { public float[] getParamList() {
return ParamList; return paramList;
} }
public long[] getParamDescList() { public long[] getParamDescList() {
return ParamDescList; return paramDescList;
} }
public long getNameTextMapHash() { public long getNameTextMapHash() {
return NameTextMapHash; return nameTextMapHash;
} }
@Override @Override
public void onLoad() { public void onLoad() {
if (this.getOpenConfig() != null & this.getOpenConfig().length() > 0) { if (this.getOpenConfig() != null & this.getOpenConfig().length() > 0) {
this.OpenConfig = "Avatar_" + this.getOpenConfig(); this.openConfig = "Avatar_" + this.getOpenConfig();
} }
// Fight props // Fight props
ArrayList<FightPropData> parsed = new ArrayList<FightPropData>(getAddProps().length); ArrayList<FightPropData> parsed = new ArrayList<FightPropData>(getAddProps().length);
...@@ -96,6 +96,6 @@ public class ProudSkillData extends GameResource { ...@@ -96,6 +96,6 @@ public class ProudSkillData 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 java.util.Arrays;
import java.util.List;
import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.game.quest.enums.LogicType;
import emu.grasscutter.game.quest.enums.QuestTrigger;
@ResourceType(name = "QuestExcelConfigData.json")
public class QuestData extends GameResource {
private int subId;
private int mainId;
private int order;
private long descTextMapHash;
private boolean finishParent;
private boolean isRewind;
private LogicType acceptCondComb;
private QuestCondition[] acceptConditons;
private LogicType finishCondComb;
private QuestCondition[] finishConditons;
private LogicType failCondComb;
private QuestCondition[] failConditons;
private List<QuestParam> acceptCond;
private List<QuestParam> finishCond;
private List<QuestParam> failCond;
private List<QuestExecParam> beginExec;
private List<QuestExecParam> finishExec;
private List<QuestExecParam> failExec;
public int getId() {
return subId;
}
public int getMainId() {
return mainId;
}
public int getOrder() {
return order;
}
public long getDescTextMapHash() {
return descTextMapHash;
}
public boolean finishParent() {
return finishParent;
}
public boolean isRewind() {
return isRewind;
}
public LogicType getAcceptCondComb() {
return acceptCondComb;
}
public QuestCondition[] getAcceptCond() {
return acceptConditons;
}
public LogicType getFinishCondComb() {
return finishCondComb;
}
public QuestCondition[] getFinishCond() {
return finishConditons;
}
public LogicType getFailCondComb() {
return failCondComb;
}
public QuestCondition[] getFailCond() {
return failConditons;
}
public void onLoad() {
this.acceptConditons = acceptCond.stream().filter(p -> p._type != null).map(QuestCondition::new).toArray(QuestCondition[]::new);
acceptCond = null;
this.finishConditons = finishCond.stream().filter(p -> p._type != null).map(QuestCondition::new).toArray(QuestCondition[]::new);
finishCond = null;
this.failConditons = failCond.stream().filter(p -> p._type != null).map(QuestCondition::new).toArray(QuestCondition[]::new);
failCond = null;
}
public class QuestParam {
QuestTrigger _type;
int[] _param;
String _count;
}
public class QuestExecParam {
QuestTrigger _type;
String[] _param;
String _count;
}
public static class QuestCondition {
private QuestTrigger type;
private int[] param;
private String count;
public QuestCondition(QuestParam param) {
this.type = param._type;
this.param = param._param;
}
public QuestTrigger getType() {
return type;
}
public int[] getParam() {
return param;
}
public String getCount() {
return count;
}
}
}
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;
...@@ -6,43 +6,41 @@ import emu.grasscutter.game.props.FightProperty; ...@@ -6,43 +6,41 @@ import emu.grasscutter.game.props.FightProperty;
@ResourceType(name = "ReliquaryAffixExcelConfigData.json") @ResourceType(name = "ReliquaryAffixExcelConfigData.json")
public class ReliquaryAffixData extends GameResource { public class ReliquaryAffixData extends GameResource {
private int Id; private int id;
private int DepotId; private int depotId;
private int GroupId; private int groupId;
private String PropType; private FightProperty propType;
private float PropValue; private float propValue;
private int Weight; private int weight;
private int UpgradeWeight; private int upgradeWeight;
private FightProperty fightProp;
@Override @Override
public int getId() { public int getId() {
return Id; return id;
} }
public int getDepotId() { public int getDepotId() {
return DepotId; return depotId;
} }
public int getGroupId() { public int getGroupId() {
return GroupId; return groupId;
} }
public float getPropValue() { public float getPropValue() {
return PropValue; return propValue;
} }
public int getWeight() { public int getWeight() {
return Weight; return weight;
} }
public int getUpgradeWeight() { public int getUpgradeWeight() {
return UpgradeWeight; return upgradeWeight;
} }
public FightProperty getFightProp() { public FightProperty getFightProp() {
return fightProp; return propType;
}
@Override
public void onLoad() {
this.fightProp = FightProperty.getPropByName(this.PropType);
} }
} }
package emu.grasscutter.data.def; package emu.grasscutter.data.excels;
import java.util.List; import java.util.List;
...@@ -13,10 +13,10 @@ public class ReliquaryLevelData extends GameResource { ...@@ -13,10 +13,10 @@ public class ReliquaryLevelData extends GameResource {
private int id; private int id;
private Int2ObjectMap<Float> propMap; private Int2ObjectMap<Float> propMap;
private int Rank; private int rank;
private int Level; private int level;
private int Exp; private int exp;
private List<RelicLevelProperty> AddProps; private List<RelicLevelProperty> addProps;
@Override @Override
public int getId() { public int getId() {
...@@ -24,15 +24,15 @@ public class ReliquaryLevelData extends GameResource { ...@@ -24,15 +24,15 @@ public class ReliquaryLevelData extends GameResource {
} }
public int getRank() { public int getRank() {
return Rank; return rank;
} }
public int getLevel() { public int getLevel() {
return Level; return level;
} }
public int getExp() { public int getExp() {
return Exp; return exp;
} }
public float getPropValue(FightProperty prop) { public float getPropValue(FightProperty prop) {
...@@ -45,23 +45,23 @@ public class ReliquaryLevelData extends GameResource { ...@@ -45,23 +45,23 @@ public class ReliquaryLevelData extends GameResource {
@Override @Override
public void onLoad() { public void onLoad() {
this.id = (Rank << 8) + this.getLevel(); this.id = (rank << 8) + this.getLevel();
this.propMap = new Int2ObjectOpenHashMap<>(); this.propMap = new Int2ObjectOpenHashMap<>();
for (RelicLevelProperty p : AddProps) { for (RelicLevelProperty p : addProps) {
this.propMap.put(FightProperty.getPropByName(p.getPropType()).getId(), (Float) p.getValue()); this.propMap.put(FightProperty.getPropByName(p.getPropType()).getId(), (Float) p.getValue());
} }
} }
public class RelicLevelProperty { public class RelicLevelProperty {
private String PropType; private String propType;
private float Value; private float value;
public String getPropType() { public String getPropType() {
return PropType; return propType;
} }
public float getValue() { public float getValue() {
return Value; return value;
} }
} }
} }
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;
...@@ -6,32 +6,26 @@ import emu.grasscutter.game.props.FightProperty; ...@@ -6,32 +6,26 @@ import emu.grasscutter.game.props.FightProperty;
@ResourceType(name = "ReliquaryMainPropExcelConfigData.json") @ResourceType(name = "ReliquaryMainPropExcelConfigData.json")
public class ReliquaryMainPropData extends GameResource { public class ReliquaryMainPropData extends GameResource {
private int Id; private int id;
private int PropDepotId; private int propDepotId;
private String PropType; private FightProperty propType;
private String AffixName; private int weight;
private int Weight;
private FightProperty fightProp;
@Override @Override
public int getId() { public int getId() {
return Id; return id;
} }
public int getPropDepotId() { public int getPropDepotId() {
return PropDepotId; return propDepotId;
} }
public int getWeight() { public int getWeight() {
return Weight; return weight;
} }
public FightProperty getFightProp() { public FightProperty getFightProp() {
return fightProp; return propType;
}
@Override
public void onLoad() {
this.fightProp = FightProperty.getPropByName(this.PropType);
} }
} }
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