CombineData.java 3.6 KB
Newer Older
1
2
package emu.grasscutter.data.def;

Akka's avatar
Akka committed
3
import emu.grasscutter.data.GameResource;
4
5
import emu.grasscutter.data.ResourceType;

Akka's avatar
Akka committed
6
7
8
import java.util.List;
import java.util.stream.Collectors;

9
@ResourceType(name = "CombineExcelConfigData.json")
Akka's avatar
Akka committed
10
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
70
71
72
73
74
75
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<CombineItemPair> RandomItems;

    private List<CombineItemPair> MaterialItems;

    private long EffectDescTextMapHash;

    private String RecipeType;

    @Override
    public int getId() {
        return this.CombineId;
    }

    @Override
    public void onLoad() {
        super.onLoad();
        // clean data
        RandomItems = RandomItems.stream().filter(item -> item.Id > 0).collect(Collectors.toList());
        MaterialItems = MaterialItems.stream().filter(item -> item.Id > 0).collect(Collectors.toList());
    }

    public static class CombineItemPair {

        private int Id;

        private int Count;

        public CombineItemPair(int id, int count) {
            Id = id;
            Count = count;
        }

        public int getId() {
            return Id;
        }

        public void setId(int id) {
            Id = id;
        }

        public int getCount() {
            return Count;
        }

        public void setCount(int count) {
            Count = count;
        }
    }
76

Akka's avatar
Akka committed
77
78
79
    public int getCombineId() {
        return CombineId;
    }
80

Akka's avatar
Akka committed
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
    public void setCombineId(int combineId) {
        CombineId = combineId;
    }

    public int getPlayerLevel() {
        return PlayerLevel;
    }

    public void setPlayerLevel(int playerLevel) {
        PlayerLevel = playerLevel;
    }

    public boolean isDefaultShow() {
        return IsDefaultShow;
    }

    public void setDefaultShow(boolean defaultShow) {
        IsDefaultShow = defaultShow;
    }

    public int getCombineType() {
        return CombineType;
    }

    public void setCombineType(int combineType) {
        CombineType = combineType;
    }

    public int getSubCombineType() {
        return SubCombineType;
    }

    public void setSubCombineType(int subCombineType) {
        SubCombineType = subCombineType;
    }

    public int getResultItemId() {
        return ResultItemId;
    }

    public void setResultItemId(int resultItemId) {
        ResultItemId = resultItemId;
    }

    public int getResultItemCount() {
        return ResultItemCount;
    }

    public void setResultItemCount(int resultItemCount) {
        ResultItemCount = resultItemCount;
    }

    public int getScoinCost() {
        return ScoinCost;
    }

    public void setScoinCost(int scoinCost) {
        ScoinCost = scoinCost;
    }

    public List<CombineItemPair> getRandomItems() {
        return RandomItems;
    }

    public void setRandomItems(List<CombineItemPair> randomItems) {
        RandomItems = randomItems;
    }

    public List<CombineItemPair> getMaterialItems() {
        return MaterialItems;
    }

    public void setMaterialItems(List<CombineItemPair> materialItems) {
        MaterialItems = materialItems;
    }

    public long getEffectDescTextMapHash() {
        return EffectDescTextMapHash;
    }

    public void setEffectDescTextMapHash(long effectDescTextMapHash) {
        EffectDescTextMapHash = effectDescTextMapHash;
    }

    public String getRecipeType() {
        return RecipeType;
    }

    public void setRecipeType(String recipeType) {
        RecipeType = recipeType;
    }
172
}
Akka's avatar
Akka committed
173