- Game history now includes also name of the format the game was played in, as well as your deck name you used in it.
This commit is contained in:
@@ -22,7 +22,7 @@ public class GameHistoryDAO {
|
||||
try {
|
||||
Connection connection = _dbAccess.getDataSource().getConnection();
|
||||
try {
|
||||
PreparedStatement statement = connection.prepareStatement("insert into game_history (winner, loser, win_reason, lose_reason, win_recording_id, lose_recording_id, format_name, winner_deck_name, loser_deck_name, start_date, end_date) values (?,?,?,?,?,?,?,?)");
|
||||
PreparedStatement statement = connection.prepareStatement("insert into game_history (winner, loser, win_reason, lose_reason, win_recording_id, lose_recording_id, format_name, winner_deck_name, loser_deck_name, start_date, end_date) values (?,?,?,?,?,?,?,?,?,?,?)");
|
||||
try {
|
||||
statement.setString(1, winner);
|
||||
statement.setString(2, loser);
|
||||
|
||||
@@ -147,23 +147,23 @@ public class LotroServer extends AbstractServer {
|
||||
}
|
||||
}
|
||||
});
|
||||
if (!_test) {
|
||||
Map<String, String> deckNames = new HashMap<String, String>();
|
||||
for (LotroGameParticipant participant : participants)
|
||||
deckNames.put(participant.getPlayerId(), participant.getDeckName());
|
||||
// if (!_test) {
|
||||
Map<String, String> deckNames = new HashMap<String, String>();
|
||||
for (LotroGameParticipant participant : participants)
|
||||
deckNames.put(participant.getPlayerId(), participant.getDeckName());
|
||||
|
||||
final GameRecorder.GameRecordingInProgress gameRecordingInProgress = _gameRecorder.recordGame(lotroGameMediator, formatName, deckNames);
|
||||
lotroGameMediator.addGameResultListener(
|
||||
new GameResultListener() {
|
||||
@Override
|
||||
public void gameFinished(String winnerPlayerId, String winReason, Map<String, String> loserPlayerIdsWithReasons) {
|
||||
final Map.Entry<String, String> loserEntry = loserPlayerIdsWithReasons.entrySet().iterator().next();
|
||||
final GameRecorder.GameRecordingInProgress gameRecordingInProgress = _gameRecorder.recordGame(lotroGameMediator, formatName, deckNames);
|
||||
lotroGameMediator.addGameResultListener(
|
||||
new GameResultListener() {
|
||||
@Override
|
||||
public void gameFinished(String winnerPlayerId, String winReason, Map<String, String> loserPlayerIdsWithReasons) {
|
||||
final Map.Entry<String, String> loserEntry = loserPlayerIdsWithReasons.entrySet().iterator().next();
|
||||
|
||||
gameRecordingInProgress.finishRecording(winnerPlayerId, winReason, loserEntry.getKey(), loserEntry.getValue());
|
||||
}
|
||||
gameRecordingInProgress.finishRecording(winnerPlayerId, winReason, loserEntry.getKey(), loserEntry.getValue());
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
// }
|
||||
|
||||
_runningGames.put(gameId, lotroGameMediator);
|
||||
_nextGameId++;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
- When instructed to choose a card to heal/wound X times, a card with vitality/wounds <X can be chosen, as long as
|
||||
that character can be healed/wounded by the card at least once.
|
||||
- "Narya" from Reflections now has a twilight cost of 0.
|
||||
- Game history now includes also name of the format the game was played in, as well as your deck name you used in it.
|
||||
|
||||
<b>27 Nov. 2011</b>
|
||||
- Characters should not die between turns.
|
||||
|
||||
@@ -47,7 +47,6 @@ var GameHistoryUI = Class.extend({
|
||||
else
|
||||
row.append($("<td></td>").html(" "));
|
||||
row.append($("<td></td>").html(winner));
|
||||
row.append($("<td></td>").html(winner));
|
||||
row.append($("<td></td>").html(loser));
|
||||
row.append($("<td></td>").html(winReason));
|
||||
row.append($("<td></td>").html(loseReason));
|
||||
|
||||
Reference in New Issue
Block a user