Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Grasscutter
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
ziqian zhang
Grasscutter
Commits
100d08ec
Commit
100d08ec
authored
2 years ago
by
AnimeGitB
Browse files
Options
Downloads
Patches
Plain Diff
Fix up pity tallies for new BannerTypes
Also fixes Beginner banner using Standard pity.
parent
83b84408
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/emu/grasscutter/game/gacha/PlayerGachaInfo.java
+39
-33
39 additions, 33 deletions
...main/java/emu/grasscutter/game/gacha/PlayerGachaInfo.java
with
39 additions
and
33 deletions
src/main/java/emu/grasscutter/game/gacha/PlayerGachaInfo.java
+
39
−
33
View file @
100d08ec
...
...
@@ -4,37 +4,43 @@ import dev.morphia.annotations.Entity;
@Entity
public
class
PlayerGachaInfo
{
private
PlayerGachaBannerInfo
standardBanner
;
private
PlayerGachaBannerInfo
eventCharacterBanner
;
private
PlayerGachaBannerInfo
eventWeaponBanner
;
public
PlayerGachaInfo
()
{
this
.
standardBanner
=
new
PlayerGachaBannerInfo
();
this
.
eventCharacterBanner
=
new
PlayerGachaBannerInfo
();
this
.
eventWeaponBanner
=
new
PlayerGachaBannerInfo
();
}
public
PlayerGachaBannerInfo
getStandardBanner
()
{
return
standardBanner
;
}
public
PlayerGachaBannerInfo
getEventCharacterBanner
()
{
return
eventCharacterBanner
;
}
public
PlayerGachaBannerInfo
getEventWeaponBanner
()
{
return
eventWeaponBanner
;
}
public
PlayerGachaBannerInfo
getBannerInfo
(
GachaBanner
banner
)
{
switch
(
banner
.
getBannerType
())
{
case
EVENT:
return
this
.
eventCharacterBanner
;
case
WEAPON:
return
this
.
eventWeaponBanner
;
case
STANDARD:
default
:
return
this
.
standardBanner
;
}
}
private
PlayerGachaBannerInfo
standardBanner
;
private
PlayerGachaBannerInfo
beginnerBanner
;
private
PlayerGachaBannerInfo
eventCharacterBanner
;
private
PlayerGachaBannerInfo
eventWeaponBanner
;
public
PlayerGachaInfo
()
{
this
.
standardBanner
=
new
PlayerGachaBannerInfo
();
this
.
eventCharacterBanner
=
new
PlayerGachaBannerInfo
();
this
.
eventWeaponBanner
=
new
PlayerGachaBannerInfo
();
}
public
PlayerGachaBannerInfo
getStandardBanner
()
{
if
(
this
.
standardBanner
==
null
)
this
.
standardBanner
=
new
PlayerGachaBannerInfo
();
return
this
.
standardBanner
;
}
public
PlayerGachaBannerInfo
getBeginnerBanner
()
{
if
(
this
.
beginnerBanner
==
null
)
this
.
beginnerBanner
=
new
PlayerGachaBannerInfo
();
return
this
.
beginnerBanner
;
}
public
PlayerGachaBannerInfo
getEventCharacterBanner
()
{
if
(
this
.
eventCharacterBanner
==
null
)
this
.
eventCharacterBanner
=
new
PlayerGachaBannerInfo
();
return
this
.
eventCharacterBanner
;
}
public
PlayerGachaBannerInfo
getEventWeaponBanner
()
{
if
(
this
.
eventWeaponBanner
==
null
)
this
.
eventWeaponBanner
=
new
PlayerGachaBannerInfo
();
return
this
.
eventWeaponBanner
;
}
public
PlayerGachaBannerInfo
getBannerInfo
(
GachaBanner
banner
)
{
return
switch
(
banner
.
getBannerType
())
{
case
STANDARD
->
this
.
getStandardBanner
();
case
BEGINNER
->
this
.
getBeginnerBanner
();
case
EVENT
,
CHARACTER
,
CHARACTER2
->
this
.
getEventCharacterBanner
();
case
WEAPON
->
this
.
getEventWeaponBanner
();
};
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment