mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-15 08:25:21 +01:00
Calculate Banner.previewPrefabPath
This commit is contained in:
@@ -13,7 +13,7 @@ public class GachaBanner {
|
||||
@Getter private int gachaType;
|
||||
@Getter private int scheduleId;
|
||||
@Getter private String prefabPath;
|
||||
@Getter private String previewPrefabPath;
|
||||
private String previewPrefabPath;
|
||||
@Getter private String titlePath;
|
||||
private int costItemId = 0;
|
||||
private int costItemAmount = 1;
|
||||
@@ -47,6 +47,12 @@ public class GachaBanner {
|
||||
private int costItem = 0;
|
||||
@Getter private int wishMaxProgress = 2;
|
||||
|
||||
public String getPreviewPrefabPath() {
|
||||
if (this.previewPrefabPath != null && !this.previewPrefabPath.isEmpty())
|
||||
return this.previewPrefabPath;
|
||||
return "UI_Tab_" + this.prefabPath;
|
||||
}
|
||||
|
||||
public ItemParamData getCost(int numRolls) {
|
||||
return switch (numRolls) {
|
||||
case 10 -> new ItemParamData((costItemId10 > 0) ? costItemId10 : getCostItem(), costItemAmount10);
|
||||
|
||||
Reference in New Issue
Block a user