mirror of
https://github.com/Melledy/Nebula.git
synced 2025-12-16 22:34:41 +01:00
Fix disc secondary skills
This commit is contained in:
@@ -327,9 +327,18 @@ public class StarTowerManager extends PlayerManager {
|
||||
// Database
|
||||
|
||||
public void loadFromDatabase() {
|
||||
// Init builds
|
||||
this.builds = new Long2ObjectOpenHashMap<>();
|
||||
|
||||
// Load builds with the current player's uid
|
||||
Nebula.getGameDatabase().getObjects(StarTowerBuild.class, "playerUid", getPlayerUid()).forEach(build -> {
|
||||
// Fix outdated builds
|
||||
if (build.getSecondarySkills() == null) {
|
||||
build.calculateScore();
|
||||
build.save();
|
||||
}
|
||||
|
||||
// Add build
|
||||
this.builds.put(build.getUid(), build);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user