mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-26 00:18:02 +00:00
Calculate Banner.previewPrefabPath
This commit is contained in:
parent
a9ca80e490
commit
d3bf5b585f
@ -13,7 +13,7 @@ public class GachaBanner {
|
|||||||
@Getter private int gachaType;
|
@Getter private int gachaType;
|
||||||
@Getter private int scheduleId;
|
@Getter private int scheduleId;
|
||||||
@Getter private String prefabPath;
|
@Getter private String prefabPath;
|
||||||
@Getter private String previewPrefabPath;
|
private String previewPrefabPath;
|
||||||
@Getter private String titlePath;
|
@Getter private String titlePath;
|
||||||
private int costItemId = 0;
|
private int costItemId = 0;
|
||||||
private int costItemAmount = 1;
|
private int costItemAmount = 1;
|
||||||
@ -47,6 +47,12 @@ public class GachaBanner {
|
|||||||
private int costItem = 0;
|
private int costItem = 0;
|
||||||
@Getter private int wishMaxProgress = 2;
|
@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) {
|
public ItemParamData getCost(int numRolls) {
|
||||||
return switch (numRolls) {
|
return switch (numRolls) {
|
||||||
case 10 -> new ItemParamData((costItemId10 > 0) ? costItemId10 : getCostItem(), costItemAmount10);
|
case 10 -> new ItemParamData((costItemId10 > 0) ? costItemId10 : getCostItem(), costItemAmount10);
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
"scheduleId": 803,
|
"scheduleId": 803,
|
||||||
"bannerType": "EVENT",
|
"bannerType": "EVENT",
|
||||||
"prefabPath": "GachaShowPanel_A016",
|
"prefabPath": "GachaShowPanel_A016",
|
||||||
"previewPrefabPath": "UI_Tab_GachaShowPanel_A016",
|
|
||||||
"titlePath": "UI_GACHA_SHOW_PANEL_A016_TITLE",
|
"titlePath": "UI_GACHA_SHOW_PANEL_A016_TITLE",
|
||||||
"costItemId": 224,
|
"costItemId": 224,
|
||||||
"costItemAmount10": 8,
|
"costItemAmount10": 8,
|
||||||
@ -22,7 +21,6 @@
|
|||||||
"scheduleId": 893,
|
"scheduleId": 893,
|
||||||
"bannerType": "STANDARD",
|
"bannerType": "STANDARD",
|
||||||
"prefabPath": "GachaShowPanel_A022",
|
"prefabPath": "GachaShowPanel_A022",
|
||||||
"previewPrefabPath": "UI_Tab_GachaShowPanel_A022",
|
|
||||||
"titlePath": "UI_GACHA_SHOW_PANEL_A022_TITLE",
|
"titlePath": "UI_GACHA_SHOW_PANEL_A022_TITLE",
|
||||||
"costItemId": 224,
|
"costItemId": 224,
|
||||||
"beginTime": 0,
|
"beginTime": 0,
|
||||||
@ -37,7 +35,6 @@
|
|||||||
"scheduleId": 903,
|
"scheduleId": 903,
|
||||||
"bannerType": "EVENT",
|
"bannerType": "EVENT",
|
||||||
"prefabPath": "GachaShowPanel_A091",
|
"prefabPath": "GachaShowPanel_A091",
|
||||||
"previewPrefabPath": "UI_Tab_GachaShowPanel_A091",
|
|
||||||
"titlePath": "UI_GACHA_SHOW_PANEL_A045_TITLE",
|
"titlePath": "UI_GACHA_SHOW_PANEL_A045_TITLE",
|
||||||
"costItemId": 223,
|
"costItemId": 223,
|
||||||
"beginTime": 0,
|
"beginTime": 0,
|
||||||
@ -53,7 +50,6 @@
|
|||||||
"scheduleId": 923,
|
"scheduleId": 923,
|
||||||
"bannerType": "EVENT",
|
"bannerType": "EVENT",
|
||||||
"prefabPath": "GachaShowPanel_A092",
|
"prefabPath": "GachaShowPanel_A092",
|
||||||
"previewPrefabPath": "UI_Tab_GachaShowPanel_A092",
|
|
||||||
"titlePath": "UI_GACHA_SHOW_PANEL_A018_TITLE",
|
"titlePath": "UI_GACHA_SHOW_PANEL_A018_TITLE",
|
||||||
"costItemId": 223,
|
"costItemId": 223,
|
||||||
"beginTime": 0,
|
"beginTime": 0,
|
||||||
@ -70,7 +66,6 @@
|
|||||||
"scheduleId": 913,
|
"scheduleId": 913,
|
||||||
"bannerType": "WEAPON",
|
"bannerType": "WEAPON",
|
||||||
"prefabPath": "GachaShowPanel_A093",
|
"prefabPath": "GachaShowPanel_A093",
|
||||||
"previewPrefabPath": "UI_Tab_GachaShowPanel_A093",
|
|
||||||
"titlePath": "UI_GACHA_SHOW_PANEL_A013_TITLE",
|
"titlePath": "UI_GACHA_SHOW_PANEL_A013_TITLE",
|
||||||
"costItemId": 223,
|
"costItemId": 223,
|
||||||
"beginTime": 0,
|
"beginTime": 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user