Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
d3bf5b58
Commit
d3bf5b58
authored
Sep 08, 2022
by
AnimeGitB
Browse files
Calculate Banner.previewPrefabPath
parent
a9ca80e4
Changes
2
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/gacha/GachaBanner.java
View file @
d3bf5b58
...
...
@@ -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
);
...
...
src/main/resources/defaults/data/Banners.json
View file @
d3bf5b58
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment