Calculate Banner.previewPrefabPath

This commit is contained in:
AnimeGitB
2022-09-08 22:36:43 +09:30
parent a9ca80e490
commit d3bf5b585f
2 changed files with 7 additions and 6 deletions

View File

@@ -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);