mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
Make single-player banzai games not give achievements
This commit is contained in:
parent
304907ddf1
commit
ae412592b1
@ -157,11 +157,14 @@ public class BattleBanzaiGame extends Game {
|
|||||||
public void onEnd() {
|
public void onEnd() {
|
||||||
GameTeam winningTeam = null;
|
GameTeam winningTeam = null;
|
||||||
|
|
||||||
|
boolean singleTeamGame = this.teams.values().stream().filter(t -> t.getMembers().size() > 0).count() == 1;
|
||||||
|
|
||||||
for (GameTeam team : this.teams.values()) {
|
for (GameTeam team : this.teams.values()) {
|
||||||
for (GamePlayer player : team.getMembers()) {
|
if (!singleTeamGame) {
|
||||||
if (player.getScore() > 0) {
|
for (GamePlayer player : team.getMembers()) {
|
||||||
AchievementManager.progressAchievement(player.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("BattleBallPlayer"));
|
if (player.getScore() > 0) {
|
||||||
AchievementManager.progressAchievement(player.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("BattleBallQuestCompleted"));
|
AchievementManager.progressAchievement(player.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("BattleBallPlayer"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,10 +174,12 @@ public class BattleBanzaiGame extends Game {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (winningTeam != null) {
|
if (winningTeam != null) {
|
||||||
for (GamePlayer player : winningTeam.getMembers()) {
|
if (!singleTeamGame) {
|
||||||
if (player.getScore() > 0) {
|
for (GamePlayer player : winningTeam.getMembers()) {
|
||||||
this.room.sendComposer(new RoomUserActionComposer(player.getHabbo().getRoomUnit(), RoomUserAction.WAVE).compose());
|
if (player.getScore() > 0) {
|
||||||
AchievementManager.progressAchievement(player.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("BattleBallWinner"));
|
this.room.sendComposer(new RoomUserActionComposer(player.getHabbo().getRoomUnit(), RoomUserAction.WAVE).compose());
|
||||||
|
AchievementManager.progressAchievement(player.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("BattleBallWinner"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user