RewardData.java 674 Bytes
Newer Older
Yazawazi's avatar
Yazawazi committed
1
2
3
4
package emu.grasscutter.data.def;

import java.util.List;

5
import emu.grasscutter.data.GameResource;
Yazawazi's avatar
Yazawazi committed
6
import emu.grasscutter.data.ResourceType;
Melledy's avatar
Melledy committed
7
import emu.grasscutter.data.common.ItemParamData;
Yazawazi's avatar
Yazawazi committed
8
9

@ResourceType(name = "RewardExcelConfigData.json")
10
public class RewardData extends GameResource {
Yazawazi's avatar
Yazawazi committed
11
    public int RewardId;
Melledy's avatar
Melledy committed
12
    public List<ItemParamData> RewardItemList;
Yazawazi's avatar
Yazawazi committed
13
14
15
16
17
18

    @Override
	public int getId() {
		return RewardId;
	}

Melledy's avatar
Melledy committed
19
    public List<ItemParamData> getRewardItemList() {
Yazawazi's avatar
Yazawazi committed
20
21
22
23
24
        return RewardItemList;
    }

    @Override
    public void onLoad() {
Melledy's avatar
Melledy committed
25
    	RewardItemList = RewardItemList.stream().filter(i -> i.getId() > 0).toList();
Yazawazi's avatar
Yazawazi committed
26
27
    }
}