@@ -139,30 +139,40 @@ object SpellConfig {
139
139
fun getSpellById (type : Int , id : Int ): Spell ? = cache[type]?.spellsByIndex?.get(id)
140
140
141
141
private fun buildNormalSpell (row : XSSFRow ): Spell ? {
142
- if (row.lastCellNum < 6 ) return null
142
+ if (row.lastCellNum < 15 ) return null
143
143
return Spell (
144
144
index = row.getCell(0 ).numericCellValue.toInt(),
145
145
game = row.getCell(1 ).numericCellValue.toInt().toString(),
146
146
name = row.getCell(3 ).stringCellValue.trim(),
147
147
rank = row.getCell(5 ).stringCellValue.trim(),
148
148
star = row.getCell(6 ).numericCellValue.toInt(),
149
149
desc = row.getCell(4 )?.stringCellValue?.trim() ? : " " ,
150
- id = if (row.lastCellNum < 8 ) 0
151
- else row.getCell(8 )?.numericCellValue?.toInt() ? : 0
150
+ id = row.getCell(8 ).numericCellValue.toInt(),
151
+ fastest = row.getCell(9 ).numericCellValue.toFloat(),
152
+ one = row.getCell(10 ).numericCellValue.toFloat(),
153
+ two = row.getCell(11 ).numericCellValue.toFloat(),
154
+ three = row.getCell(12 ).numericCellValue.toFloat(),
155
+ final = row.getCell(13 ).numericCellValue.toFloat(),
156
+ bonusRate = row.getCell(14 ).numericCellValue.toFloat(),
152
157
)
153
158
}
154
159
155
160
private fun buildBPSpell (row : XSSFRow ): Spell ? {
156
- if (row.lastCellNum < 7 ) return null
161
+ if (row.lastCellNum < 15 ) return null
157
162
return Spell (
158
163
index = row.getCell(0 ).numericCellValue.toInt(),
159
164
game = row.getCell(1 ).numericCellValue.toInt().toString(),
160
165
name = row.getCell(3 ).stringCellValue.trim(),
161
166
rank = row.getCell(5 ).stringCellValue.trim(),
162
167
star = row.getCell(7 ).numericCellValue.toInt(),
163
168
desc = row.getCell(4 )?.stringCellValue?.trim() ? : " " ,
164
- id = if (row.lastCellNum < 8 ) 0
165
- else row.getCell(8 )?.numericCellValue?.toInt() ? : 0
169
+ id = row.getCell(8 ).numericCellValue.toInt(),
170
+ fastest = row.getCell(9 ).numericCellValue.toFloat(),
171
+ one = row.getCell(10 ).numericCellValue.toFloat(),
172
+ two = row.getCell(11 ).numericCellValue.toFloat(),
173
+ three = row.getCell(12 ).numericCellValue.toFloat(),
174
+ final = row.getCell(13 ).numericCellValue.toFloat(),
175
+ bonusRate = row.getCell(14 ).numericCellValue.toFloat(),
166
176
)
167
177
}
168
178
0 commit comments