Commit 5f70c694 authored by nanahira's avatar nanahira

fix draw match handle

parent ef0668ae
...@@ -1720,7 +1720,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)-> ...@@ -1720,7 +1720,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
return return
found = false found = false
for k,match of data for k,match of data
if match and match.match and !match.match.winnerId and match.match.player1Id and match.match.player2Id and (match.match.player1Id == client.challonge_info.id or match.match.player2Id == client.challonge_info.id) if match and match.match and !match.match.winnerId and match.match.state != "complete" and match.match.player1Id and match.match.player2Id and (match.match.player1Id == client.challonge_info.id or match.match.player2Id == client.challonge_info.id)
found = match.match found = match.match
break break
if !found if !found
......
...@@ -2106,7 +2106,7 @@ ...@@ -2106,7 +2106,7 @@
found = false; found = false;
for (k in data) { for (k in data) {
match = data[k]; match = data[k];
if (match && match.match && !match.match.winnerId && match.match.player1Id && match.match.player2Id && (match.match.player1Id === client.challonge_info.id || match.match.player2Id === client.challonge_info.id)) { if (match && match.match && !match.match.winnerId && match.match.state !== "complete" && match.match.player1Id && match.match.player2Id && (match.match.player1Id === client.challonge_info.id || match.match.player2Id === client.challonge_info.id)) {
found = match.match; found = match.match;
break; break;
} }
......
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