diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/game/GameRecorder.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/game/GameRecorder.java index e6c2c7cdf..eb727f9e1 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/game/GameRecorder.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/game/GameRecorder.java @@ -93,7 +93,7 @@ public class GameRecorder { final Date startData = new Date(); final Map recordingChannels = new HashMap(); for (String playerId : lotroGame.getPlayersPlaying()) { - GatheringParticipantCommunicationChannel recordChannel = new GatheringParticipantCommunicationChannel(playerId); + GatheringParticipantCommunicationChannel recordChannel = new GatheringParticipantCommunicationChannel(playerId, 0); lotroGame.addGameStateListener(playerId, recordChannel); recordingChannels.put(playerId, recordChannel); } diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/admin.html b/gemp-lotr/gemp-lotr-web/src/main/webapp/admin.html index e03475164..2aa1e7d4b 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/admin.html +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/admin.html @@ -17,10 +17,11 @@
Name:
Code:
- Type:
+ Type: +
Parameters:
Start:
End:
diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/deckBuild.html b/gemp-lotr/gemp-lotr-web/src/main/webapp/deckBuild.html index ccd0b85ba..618e7db20 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/deckBuild.html +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/deckBuild.html @@ -94,6 +94,7 @@ + diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/game.html b/gemp-lotr/gemp-lotr-web/src/main/webapp/game.html index 775c19ee2..80984098a 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/game.html +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/game.html @@ -320,6 +320,7 @@ body { + diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/images/gold.png b/gemp-lotr/gemp-lotr-web/src/main/webapp/images/gold.png new file mode 100644 index 000000000..ba1b5f540 Binary files /dev/null and b/gemp-lotr/gemp-lotr-web/src/main/webapp/images/gold.png differ diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/images/silver.png b/gemp-lotr/gemp-lotr-web/src/main/webapp/images/silver.png new file mode 100644 index 000000000..f94ddd9c9 Binary files /dev/null and b/gemp-lotr/gemp-lotr-web/src/main/webapp/images/silver.png differ diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/common.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/common.js index e422c21cf..ebe28bdf7 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/common.js +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/common.js @@ -9,4 +9,9 @@ function formatToTwoDigits(no) { function formatDate(date) { return monthNames[date.getMonth()] + " " + date.getDate() + " " + formatToTwoDigits(date.getHours()) + ":" + formatToTwoDigits(date.getMinutes()) + ":" + formatToTwoDigits(date.getSeconds()); -} \ No newline at end of file +} + +function formatPrice(price) { + var silver = (price % 100); + return Math.floor(price / 100) + " " + ((silver < 10) ? ("0" + silver) : silver) + ""; +} diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/hallUi.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/hallUi.js index da6a143d3..313abe8f1 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/hallUi.js +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/hallUi.js @@ -155,17 +155,13 @@ var GempLotrHallUI = Class.extend({ } }, - formatPrice: function(price) { - return Math.floor(price / 100) + "G " + price % 100 + "S"; - }, - processHall: function(xml) { var root = xml.documentElement; if (root.tagName == "hall") { this.tablesDiv.html(""); var currency = root.getAttribute("currency"); - this.pocketDiv.html(this.formatPrice(currency)); + this.pocketDiv.html(formatPrice(currency)); var motd = root.getAttribute("motd"); if (motd != null) diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/leagueResultsUi.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/leagueResultsUi.js index c55dd45dd..acc0b20b1 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/leagueResultsUi.js +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/leagueResultsUi.js @@ -52,7 +52,7 @@ var LeagueResultsUI = Class.extend({ var leagueText = leagueName; $("#leagueResults").append("

" + leagueText + "

"); - var costStr = Math.floor(cost / 100) + "G " + cost % 100 + "S"; + var costStr = formatPrice(cost); $("#leagueResults").append("
Cost: " + costStr + "
"); var duration = this.getDateString(start) + " to " + this.getDateString(end); diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/merchantUi.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/merchantUi.js index 8d4d19bb8..b8a1b8497 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/merchantUi.js +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/merchantUi.js @@ -200,7 +200,7 @@ var GempLotrMerchantUI = Class.extend({ clearList: function(rootElem) { $(".card", this.cardsDiv).remove(); this.currencyCount = rootElem.getAttribute("currency"); - this.pocketDiv.html(this.formatPrice(this.currencyCount)); + this.pocketDiv.html(formatPrice(this.currencyCount)); }, addCardToList: function(elem, type, blueprintId, count) { @@ -240,7 +240,7 @@ var GempLotrMerchantUI = Class.extend({ cardDiv.append("
" + count + "
"); if (!this.hideMerchant) { if (buyPrice != null) { - var formattedBuyPrice = this.formatPrice(buyPrice); + var formattedBuyPrice = formatPrice(buyPrice); var buyBut = $("
Sell for
" + formattedBuyPrice + "
").button(); buyBut.click( function() { @@ -254,8 +254,8 @@ var GempLotrMerchantUI = Class.extend({ cardDiv.append(buyBut); } if (sellPrice != null) { - var formattedSellPrice = this.formatPrice(sellPrice); - var sellBut = $("
Buy for
" + this.formatPrice(sellPrice) + "
").button(); + var formattedSellPrice = formatPrice(sellPrice); + var sellBut = $("
Buy for
" + formattedSellPrice + "
").button(); sellBut.click( function() { that.displayMerchantAction(card, "Do you want to buy this item for " + formattedSellPrice + "?", @@ -324,10 +324,6 @@ var GempLotrMerchantUI = Class.extend({ this.questionDialog.dialog("open"); }, - formatPrice: function(price) { - return Math.floor(price / 100) + "G " + price % 100 + "S"; - }, - finishList: function() { this.cardsGroup.layoutCards(); }, diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/merchant.html b/gemp-lotr/gemp-lotr-web/src/main/webapp/merchant.html index c7d766c1c..5405a9a87 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/merchant.html +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/merchant.html @@ -94,6 +94,7 @@ +