Commit 17e9dd97 authored by nanahira's avatar nanahira

Merge branch 'master' into tcg_random

parents 4bbd5357 68cb8638
......@@ -1391,6 +1391,9 @@ class Room
score_array[1] = { name: null, score: -5, deck: null }
score_array[0].score = -5
score_array[1].score = -5
formatted_replays = []
for repbuf in @replays when repbuf
formatted_replays.push(repbuf.toString("base64"))
request.post { url : settings.modules.arena_mode.post_score , form : {
accesskey: settings.modules.arena_mode.accesskey,
usernameA: score_array[0].name,
......@@ -1399,7 +1402,7 @@ class Room
userscoreB: score_array[1].score,
userdeckA: score_array[0].deck,
userdeckB: score_array[1].deck,
replays: @replays,
replays: formatted_replays,
start: @start_time,
end: end_time,
arena: @arena
......
......@@ -1745,7 +1745,7 @@
}
Room.prototype["delete"] = function() {
var end_time, index, log_rep_id, name, player_ips, player_names, recorder_buffer, ref3, replay_id, room_name, score, score_array, score_form;
var end_time, formatted_replays, index, len3, log_rep_id, m, name, player_ips, player_names, recorder_buffer, ref3, ref4, repbuf, replay_id, room_name, score, score_array, score_form;
if (this.deleted) {
return;
}
......@@ -1804,6 +1804,14 @@
score_array[0].score = -5;
score_array[1].score = -5;
}
formatted_replays = [];
ref4 = this.replays;
for (m = 0, len3 = ref4.length; m < len3; m++) {
repbuf = ref4[m];
if (repbuf) {
formatted_replays.push(repbuf.toString("base64"));
}
}
request.post({
url: settings.modules.arena_mode.post_score,
form: {
......@@ -1814,7 +1822,7 @@
userscoreB: score_array[1].score,
userdeckA: score_array[0].deck,
userdeckB: score_array[1].deck,
replays: this.replays,
replays: formatted_replays,
start: this.start_time,
end: end_time,
arena: this.arena
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment