AvatarTalentData.java 1.54 KB
Newer Older
Melledy's avatar
Melledy committed
1
2
3
package emu.grasscutter.data.def;

import java.util.ArrayList;
4
import emu.grasscutter.data.GameResource;
Melledy's avatar
Melledy committed
5
6
7
8
9
import emu.grasscutter.data.ResourceType;
import emu.grasscutter.data.ResourceType.LoadPriority;
import emu.grasscutter.data.common.FightPropData;

@ResourceType(name = "AvatarTalentExcelConfigData.json", loadPriority = LoadPriority.HIGHEST)
10
public class AvatarTalentData extends GameResource {
Melledy's avatar
Melledy committed
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
	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()]);
	}
}