Commit 921824dd authored by nanahira's avatar nanahira

update

parent 5c87ab3a
......@@ -1504,15 +1504,15 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
return
found = false
for k,match of data
if match and match.match and (match.match.player1Id == client.challonge_info.id or match.match.player2Id == client.challonge_info.id)
if match and match.match and !match.winnerId and (match.match.player1Id == client.challonge_info.id or match.match.player2Id == client.challonge_info.id)
found = match.match
break
if !found
ygopro.stoc_die(client, '${challonge_match_not_found}')
return
if found.winnerId
ygopro.stoc_die(client, '${challonge_match_already_finished}')
return
#if found.winnerId
# ygopro.stoc_die(client, '${challonge_match_already_finished}')
# return
room = ROOM_find_or_create_by_name('M#' + found.id)
if room
room.challonge_info = found
......
......@@ -1843,7 +1843,7 @@
found = false;
for (k in data) {
match = data[k];
if (match && match.match && (match.match.player1Id === client.challonge_info.id || match.match.player2Id === client.challonge_info.id)) {
if (match && match.match && !match.winnerId && (match.match.player1Id === client.challonge_info.id || match.match.player2Id === client.challonge_info.id)) {
found = match.match;
break;
}
......@@ -1852,10 +1852,6 @@
ygopro.stoc_die(client, '${challonge_match_not_found}');
return;
}
if (found.winnerId) {
ygopro.stoc_die(client, '${challonge_match_already_finished}');
return;
}
room = ROOM_find_or_create_by_name('M#' + found.id);
if (room) {
room.challonge_info = found;
......
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