ProudSkillData.java 2.16 KB
Newer Older
Melledy's avatar
Melledy committed
1
package emu.grasscutter.data.excels;
Melledy's avatar
Melledy committed
2
3
4
5

import java.util.ArrayList;
import java.util.List;

6
import emu.grasscutter.data.GameResource;
Melledy's avatar
Melledy committed
7
8
9
10
11
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.data.common.FightPropData;
import emu.grasscutter.data.common.ItemParamData;

@ResourceType(name = "ProudSkillExcelConfigData.json")
12
public class ProudSkillData extends GameResource {
Melledy's avatar
Melledy committed
13
	
Melledy's avatar
Melledy committed
14
15
16
17
18
19
20
21
22
23
24
25
26
27
	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;
Melledy's avatar
Melledy committed
28
29
30
	
	@Override
	public int getId() {
Melledy's avatar
Melledy committed
31
		return proudSkillId;
Melledy's avatar
Melledy committed
32
33
34
	}

	public int getProudSkillGroupId() {
Melledy's avatar
Melledy committed
35
		return proudSkillGroupId;
Melledy's avatar
Melledy committed
36
37
38
	}

	public int getLevel() {
Melledy's avatar
Melledy committed
39
		return level;
Melledy's avatar
Melledy committed
40
41
42
	}

	public int getCoinCost() {
Melledy's avatar
Melledy committed
43
		return coinCost;
Melledy's avatar
Melledy committed
44
45
46
	}

	public int getBreakLevel() {
Melledy's avatar
Melledy committed
47
		return breakLevel;
Melledy's avatar
Melledy committed
48
49
50
	}

	public int getProudSkillType() {
Melledy's avatar
Melledy committed
51
		return proudSkillType;
Melledy's avatar
Melledy committed
52
53
54
	}

	public String getOpenConfig() {
Melledy's avatar
Melledy committed
55
		return openConfig;
Melledy's avatar
Melledy committed
56
57
58
	}

	public List<ItemParamData> getCostItems() {
Melledy's avatar
Melledy committed
59
		return costItems;
Melledy's avatar
Melledy committed
60
61
62
	}

	public List<String> getFilterConds() {
Melledy's avatar
Melledy committed
63
		return filterConds;
Melledy's avatar
Melledy committed
64
65
66
	}

	public List<String> getLifeEffectParams() {
Melledy's avatar
Melledy committed
67
		return lifeEffectParams;
Melledy's avatar
Melledy committed
68
69
70
	}

	public FightPropData[] getAddProps() {
Melledy's avatar
Melledy committed
71
		return addProps;
Melledy's avatar
Melledy committed
72
73
74
	}

	public float[] getParamList() {
Melledy's avatar
Melledy committed
75
		return paramList;
Melledy's avatar
Melledy committed
76
77
78
	}

	public long[] getParamDescList() {
Melledy's avatar
Melledy committed
79
		return paramDescList;
Melledy's avatar
Melledy committed
80
81
82
	}

	public long getNameTextMapHash() {
Melledy's avatar
Melledy committed
83
		return nameTextMapHash;
Melledy's avatar
Melledy committed
84
85
86
87
88
	}

	@Override
	public void onLoad() {
		if (this.getOpenConfig() != null & this.getOpenConfig().length() > 0) {
Melledy's avatar
Melledy committed
89
			this.openConfig = "Avatar_" + this.getOpenConfig();
Melledy's avatar
Melledy committed
90
91
92
93
94
95
96
97
98
		}
		// 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);
			}
		}
Melledy's avatar
Melledy committed
99
		this.addProps = parsed.toArray(new FightPropData[parsed.size()]);
Melledy's avatar
Melledy committed
100
101
	}
}