diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/AlienInvasion.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/AlienInvasion.java index 9d56c072a..541d02c34 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/AlienInvasion.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/AlienInvasion.java @@ -70,6 +70,7 @@ public class AlienInvasion extends SoloGame return 0; }; + private static final String GAME_COMPLETED_STAT = "Alien Invasion Chest Given"; private final List _sources = new ArrayList<>(); private final List _targets = new ArrayList<>(); @@ -371,18 +372,23 @@ public class AlienInvasion extends SoloGame // Reward title if (score.Score == _path.size() - 1) { - Manager.getInventoryManager().addItemToInventory(success -> + if (Manager.GetStatsManager().Get(player).getStat(GAME_COMPLETED_STAT) > 0) { - if (success) - { - player.sendMessage(F.main("Game", "Unlocked 1 " + C.cAqua + "Omega Chest" + C.mBody + ".")); - } - else - { - player.sendMessage(F.main("Game", "Failed to give you your Omega Chest, you should inform a staff member!")); - } + Manager.GetStatsManager().incrementStat(player, GAME_COMPLETED_STAT, 1); - }, player, "Omega Chest", 1); + Manager.getInventoryManager().addItemToInventory(success -> + { + if (success) + { + player.sendMessage(F.main("Game", "Unlocked 1 " + C.cAqua + "Omega Chest" + C.mBody + ".")); + } + else + { + player.sendMessage(F.main("Game", "Failed to give you your Omega Chest, you should inform a staff member!")); + } + + }, player, "Omega Chest", 1); + } TrackManager trackManager = Manager.getTrackManager(); Track track = trackManager.getTrack(AlienInvasionTrack.class);