AvatarCurveData.java 811 Bytes
Newer Older
Melledy's avatar
Melledy committed
1
2
3
4
5
6
package emu.grasscutter.data.def;

import java.util.HashMap;
import java.util.Map;
import java.util.stream.Stream;

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

@ResourceType(name = "AvatarCurveExcelConfigData.json")
12
public class AvatarCurveData extends GameResource {
Melledy's avatar
Melledy committed
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
	private int Level;
	private CurveInfo[] CurveInfos;
    
    private Map<String, Float> curveInfos;
	
	@Override
	public int getId() {
		return this.Level;
	}
	
	public int getLevel() {
		return Level;
	}
	
	public Map<String, Float> getCurveInfos() {
		return curveInfos;
	}
	
	@Override
	public void onLoad() {
		this.curveInfos = new HashMap<>();
		Stream.of(this.CurveInfos).forEach(info -> this.curveInfos.put(info.getType(), info.getValue()));
	}
}