mirror of
https://github.com/Melledy/Nebula.git
synced 2025-12-14 05:14:46 +01:00
Only show boss blitz leaderboard for the current season
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user