mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 08:50:51 +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()) {
|
||||||
|
if (!singleTeamGame) {
|
||||||
for (GamePlayer player : team.getMembers()) {
|
for (GamePlayer player : team.getMembers()) {
|
||||||
if (player.getScore() > 0) {
|
if (player.getScore() > 0) {
|
||||||
AchievementManager.progressAchievement(player.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("BattleBallPlayer"));
|
AchievementManager.progressAchievement(player.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("BattleBallPlayer"));
|
||||||
AchievementManager.progressAchievement(player.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("BattleBallQuestCompleted"));
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,12 +174,14 @@ public class BattleBanzaiGame extends Game {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (winningTeam != null) {
|
if (winningTeam != null) {
|
||||||
|
if (!singleTeamGame) {
|
||||||
for (GamePlayer player : winningTeam.getMembers()) {
|
for (GamePlayer player : winningTeam.getMembers()) {
|
||||||
if (player.getScore() > 0) {
|
if (player.getScore() > 0) {
|
||||||
this.room.sendComposer(new RoomUserActionComposer(player.getHabbo().getRoomUnit(), RoomUserAction.WAVE).compose());
|
this.room.sendComposer(new RoomUserActionComposer(player.getHabbo().getRoomUnit(), RoomUserAction.WAVE).compose());
|
||||||
AchievementManager.progressAchievement(player.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("BattleBallWinner"));
|
AchievementManager.progressAchievement(player.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("BattleBallWinner"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (HabboItem item : this.room.getRoomSpecialTypes().getItemsOfType(InteractionBattleBanzaiSphere.class)) {
|
for (HabboItem item : this.room.getRoomSpecialTypes().getItemsOfType(InteractionBattleBanzaiSphere.class)) {
|
||||||
item.setExtradata((6 + winningTeam.teamColor.type) + "");
|
item.setExtradata((6 + winningTeam.teamColor.type) + "");
|
||||||
|
Loading…
Reference in New Issue
Block a user