mirror of
https://github.com/correl/mage.git
synced 2024-11-25 03:00:11 +00:00
Re-add the getHistory method.
This commit is contained in:
parent
1945e8eaa6
commit
a33aa5d2df
4 changed files with 12 additions and 3 deletions
|
@ -55,7 +55,7 @@ public class SeatView implements Serializable {
|
||||||
this.history = "";
|
this.history = "";
|
||||||
} else {
|
} else {
|
||||||
this.flagName = seat.getPlayer().getUserData().getFlagName();
|
this.flagName = seat.getPlayer().getUserData().getFlagName();
|
||||||
this.history = seat.getPlayer().getUserData().getMatchHistory() + " " + seat.getPlayer().getUserData().getTourneyHistory();
|
this.history = seat.getPlayer().getUserData().getHistory();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Empty seat
|
// Empty seat
|
||||||
|
|
|
@ -551,6 +551,11 @@ public class User {
|
||||||
return "<not available>";
|
return "<not available>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String userStatsToHistory(ResultProtos.UserStatsProto proto) {
|
||||||
|
return "Matches:" + userStatsToMatchHistory(proto) +
|
||||||
|
" Tourneys: " + userStatsToTourneyHistory(proto);
|
||||||
|
}
|
||||||
|
|
||||||
public static String userStatsToMatchHistory(ResultProtos.UserStatsProto proto) {
|
public static String userStatsToMatchHistory(ResultProtos.UserStatsProto proto) {
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
builder.append(proto.getMatches());
|
builder.append(proto.getMatches());
|
||||||
|
|
|
@ -205,9 +205,9 @@ public class UserManager {
|
||||||
if (userStats == null) {
|
if (userStats == null) {
|
||||||
return "User " + userName + " not found";
|
return "User " + userName + " not found";
|
||||||
}
|
}
|
||||||
return "History of user " + userName + ": " + User.userStatsToMatchHistory(userStats.getProto()) + " " + User.userStatsToTourneyHistory(userStats.getProto());
|
return "History of user " + userName + ": " + User.userStatsToHistory(userStats.getProto());
|
||||||
}
|
}
|
||||||
return "History of user " + userName + ": " + user.getUserData().getMatchHistory() + " " + user.getUserData().getTourneyHistory();
|
return "History of user " + userName + ": " + user.getUserData().getHistory();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateUserHistory() {
|
public void updateUserHistory() {
|
||||||
|
|
|
@ -171,6 +171,10 @@ public class UserData implements Serializable {
|
||||||
this.autoOrderTrigger = autoOrderTrigger;
|
this.autoOrderTrigger = autoOrderTrigger;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getHistory() {
|
||||||
|
return "Matches:" + this.matchHistory + " Tourneys:" + this.tourneyHistory;
|
||||||
|
}
|
||||||
|
|
||||||
public void setMatchHistory(String history) {
|
public void setMatchHistory(String history) {
|
||||||
this.matchHistory = history;
|
this.matchHistory = history;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue