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
814d4819
Commit
814d4819
authored
3 years ago
by
GanyusLeftHorn
Committed by
Melledy
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Unlock Gnostic Hymn
parent
422e25e0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/emu/grasscutter/game/battlepass/BattlePassManager.java
+9
-2
9 additions, 2 deletions
...va/emu/grasscutter/game/battlepass/BattlePassManager.java
with
9 additions
and
2 deletions
src/main/java/emu/grasscutter/game/battlepass/BattlePassManager.java
+
9
−
2
View file @
814d4819
...
@@ -12,6 +12,7 @@ import dev.morphia.annotations.Id;
...
@@ -12,6 +12,7 @@ import dev.morphia.annotations.Id;
import
dev.morphia.annotations.Indexed
;
import
dev.morphia.annotations.Indexed
;
import
dev.morphia.annotations.Transient
;
import
dev.morphia.annotations.Transient
;
import
emu.grasscutter.GameConstants
;
import
emu.grasscutter.GameConstants
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.common.ItemParamData
;
import
emu.grasscutter.data.common.ItemParamData
;
import
emu.grasscutter.data.excels.BattlePassRewardData
;
import
emu.grasscutter.data.excels.BattlePassRewardData
;
...
@@ -44,7 +45,7 @@ public class BattlePassManager {
...
@@ -44,7 +45,7 @@ public class BattlePassManager {
@Getter
private
int
level
;
@Getter
private
int
level
;
@Getter
private
boolean
viewed
;
@Getter
private
boolean
viewed
;
@Getter
private
boolean
paid
;
private
boolean
paid
;
private
Map
<
Integer
,
BattlePassMission
>
missions
;
private
Map
<
Integer
,
BattlePassMission
>
missions
;
private
Map
<
Integer
,
BattlePassReward
>
takenRewards
;
private
Map
<
Integer
,
BattlePassReward
>
takenRewards
;
...
@@ -122,6 +123,11 @@ public class BattlePassManager {
...
@@ -122,6 +123,11 @@ public class BattlePassManager {
return
getMissions
().
containsKey
(
id
);
return
getMissions
().
containsKey
(
id
);
}
}
public
boolean
isPaid
()
{
// ToDo: Change this when we actually support unlocking "paid" BP.
return
true
;
}
public
Map
<
Integer
,
BattlePassReward
>
getTakenRewards
()
{
public
Map
<
Integer
,
BattlePassReward
>
getTakenRewards
()
{
if
(
this
.
takenRewards
==
null
)
this
.
takenRewards
=
new
HashMap
<>();
if
(
this
.
takenRewards
==
null
)
this
.
takenRewards
=
new
HashMap
<>();
return
this
.
takenRewards
;
return
this
.
takenRewards
;
...
@@ -266,7 +272,8 @@ public class BattlePassManager {
...
@@ -266,7 +272,8 @@ public class BattlePassManager {
.
setEndTime
(
2059483200
)
.
setEndTime
(
2059483200
)
.
setIsViewed
(
this
.
isViewed
())
.
setIsViewed
(
this
.
isViewed
())
.
setUnlockStatus
(
this
.
isPaid
()
?
BattlePassUnlockStatus
.
BATTLE_PASS_UNLOCK_STATUS_PAID
:
BattlePassUnlockStatus
.
BATTLE_PASS_UNLOCK_STATUS_FREE
)
.
setUnlockStatus
(
this
.
isPaid
()
?
BattlePassUnlockStatus
.
BATTLE_PASS_UNLOCK_STATUS_PAID
:
BattlePassUnlockStatus
.
BATTLE_PASS_UNLOCK_STATUS_FREE
)
.
setCurCyclePoints
(
this
.
getCyclePoints
())
.
setJPFMGBEBBBJ
(
2
)
// Not bought on Playstation.
.
setCurCyclePoints
(
this
.
getCyclePoints
())
.
setCurCycle
(
BattlePassCycle
.
newBuilder
().
setBeginTime
(
0
).
setEndTime
(
2059483200
).
setCycleIdx
(
3
));
.
setCurCycle
(
BattlePassCycle
.
newBuilder
().
setBeginTime
(
0
).
setEndTime
(
2059483200
).
setCycleIdx
(
3
));
for
(
BattlePassReward
reward
:
getTakenRewards
().
values
())
{
for
(
BattlePassReward
reward
:
getTakenRewards
().
values
())
{
...
...
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