Only show boss blitz leaderboard for the current season

This commit is contained in:
Melledy
2025-11-30 23:48:24 -08:00
parent 354f390c3b
commit faa4ea0780
4 changed files with 15 additions and 8 deletions

View File

@@ -19,9 +19,8 @@ public class ScoreBossManager extends PlayerManager {
super(player);
}
// TODO calculate from bin data
public int getControlId() {
return 2;
return Nebula.getGameContext().getScoreBossModule().getControlId();
}
public ScoreBossControlDef getControlData() {

View File

@@ -21,6 +21,11 @@ public class ScoreBossModule extends GameContextModule {
this.ranking = new ArrayList<>();
}
// TODO calculate from bin data
public int getControlId() {
return 2;
}
private long getRefreshTime() {
return Nebula.getConfig().getServerOptions().leaderboardRefreshTime * 1000;
}
@@ -39,7 +44,7 @@ public class ScoreBossModule extends GameContextModule {
this.ranking.clear();
// Get from database
var list = Nebula.getGameDatabase().getSortedObjects(ScoreBossRankEntry.class, "score", 50);
var list = Nebula.getGameDatabase().getSortedObjects(ScoreBossRankEntry.class, "controlId", this.getControlId(), "score", 50);
for (int i = 0; i < list.size(); i++) {
// Get rank entry and set proto