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

View File

@ -5,7 +5,6 @@
"scheduleId": 803,
"bannerType": "EVENT",
"prefabPath": "GachaShowPanel_A016",
"previewPrefabPath": "UI_Tab_GachaShowPanel_A016",
"titlePath": "UI_GACHA_SHOW_PANEL_A016_TITLE",
"costItemId": 224,
"costItemAmount10": 8,
@ -22,7 +21,6 @@
"scheduleId": 893,
"bannerType": "STANDARD",
"prefabPath": "GachaShowPanel_A022",
"previewPrefabPath": "UI_Tab_GachaShowPanel_A022",
"titlePath": "UI_GACHA_SHOW_PANEL_A022_TITLE",
"costItemId": 224,
"beginTime": 0,
@ -37,7 +35,6 @@
"scheduleId": 903,
"bannerType": "EVENT",
"prefabPath": "GachaShowPanel_A091",
"previewPrefabPath": "UI_Tab_GachaShowPanel_A091",
"titlePath": "UI_GACHA_SHOW_PANEL_A045_TITLE",
"costItemId": 223,
"beginTime": 0,
@ -53,7 +50,6 @@
"scheduleId": 923,
"bannerType": "EVENT",
"prefabPath": "GachaShowPanel_A092",
"previewPrefabPath": "UI_Tab_GachaShowPanel_A092",
"titlePath": "UI_GACHA_SHOW_PANEL_A018_TITLE",
"costItemId": 223,
"beginTime": 0,
@ -70,7 +66,6 @@
"scheduleId": 913,
"bannerType": "WEAPON",
"prefabPath": "GachaShowPanel_A093",
"previewPrefabPath": "UI_Tab_GachaShowPanel_A093",
"titlePath": "UI_GACHA_SHOW_PANEL_A013_TITLE",
"costItemId": 223,
"beginTime": 0,