mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-20 19:04:40 +01:00
Fixed dungeon challenge scoreboard and implement dungeon drops
Also fixed a few dungeon script handlers
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package emu.grasscutter.data.common;
|
||||
|
||||
public class ItemParamStringData {
|
||||
private int Id;
|
||||
private String Count;
|
||||
|
||||
public ItemParamStringData() {}
|
||||
|
||||
public int getId() {
|
||||
return Id;
|
||||
}
|
||||
|
||||
public String getCount() {
|
||||
return Count;
|
||||
}
|
||||
|
||||
public ItemParamData toItemParamData() {
|
||||
if (Count.contains(";")) {
|
||||
String[] split = Count.split(";");
|
||||
Count = Count.split(";")[split.length - 1];
|
||||
} else if (Count.contains(".")) {
|
||||
return new ItemParamData(Id, (int) Math.ceil(Double.parseDouble(Count)));
|
||||
}
|
||||
return new ItemParamData(Id, Integer.parseInt(Count));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user