mirror of
https://github.com/Melledy/Nebula.git
synced 2025-12-12 20:34:36 +01:00
Reset score entry if control id doesn't match
This commit is contained in:
@@ -80,7 +80,7 @@ public class ScoreBossManager extends PlayerManager {
|
||||
}
|
||||
|
||||
// Settle
|
||||
this.ranking.settle(this.getPlayer(), build, this.getLevelId(), stars, score);
|
||||
this.ranking.settle(this.getPlayer(), build, getControlId(), getLevelId(), stars, score);
|
||||
|
||||
// Save ranking
|
||||
this.ranking.save();
|
||||
|
||||
@@ -60,10 +60,16 @@ public class ScoreBossRankEntry implements GameDatabaseObject {
|
||||
this.honor = player.getHonor();
|
||||
}
|
||||
|
||||
public void settle(Player player, StarTowerBuild build, int level, int stars, int score) {
|
||||
public void settle(Player player, StarTowerBuild build, int controlId, int level, int stars, int score) {
|
||||
// Update player data
|
||||
this.update(player);
|
||||
|
||||
// Reset score entry if control id doesn't match
|
||||
if (this.controlId != controlId) {
|
||||
this.controlId = controlId;
|
||||
this.getTeams().clear();
|
||||
}
|
||||
|
||||
// Set team entry
|
||||
var team = new ScoreBossTeamEntry(player, build, stars, score);
|
||||
this.getTeams().put(level, team);
|
||||
|
||||
Reference in New Issue
Block a user