Commit ed988ca0 authored by nanahira's avatar nanahira

fix missing client.isClosed

parent cbc7251c
......@@ -3048,7 +3048,7 @@ ygopro.ctos_follow 'SURRENDER', true, (buffer, info, client, server, datas)->
ygopro.stoc_send_chat(client, "${surrender_denied}", ygopro.constants.COLORS.BABYBLUE)
return true
if room.hostinfo.mode == 2
if !client.surrend_confirm and !CLIENT_get_partner(client).closed and !CLIENT_get_partner(client).is_local
if !client.surrend_confirm and !CLIENT_get_partner(client).isClosed and !CLIENT_get_partner(client).is_local
sur_player = CLIENT_get_partner(client)
ygopro.stoc_send_chat(sur_player, "${surrender_confirm_tag}", ygopro.constants.COLORS.BABYBLUE)
ygopro.stoc_send_chat(client, "${surrender_confirm_sent}", ygopro.constants.COLORS.BABYBLUE)
......@@ -3097,7 +3097,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server, datas)->
ygopro.ctos_send(client.server, 'SURRENDER')
else
sur_player = CLIENT_get_partner(client)
if !sur_player or sur_player.closed or sur_player.is_local
if !sur_player or sur_player.isClosed or sur_player.is_local
sur_player = client
if room.hostinfo.mode==2 and sur_player != client
ygopro.stoc_send_chat(sur_player, "${surrender_confirm_tag}", ygopro.constants.COLORS.BABYBLUE)
......
......@@ -4075,7 +4075,7 @@
return true;
}
if (room.hostinfo.mode === 2) {
if (!client.surrend_confirm && !CLIENT_get_partner(client).closed && !CLIENT_get_partner(client).is_local) {
if (!client.surrend_confirm && !CLIENT_get_partner(client).isClosed && !CLIENT_get_partner(client).is_local) {
sur_player = CLIENT_get_partner(client);
ygopro.stoc_send_chat(sur_player, "${surrender_confirm_tag}", ygopro.constants.COLORS.BABYBLUE);
ygopro.stoc_send_chat(client, "${surrender_confirm_sent}", ygopro.constants.COLORS.BABYBLUE);
......@@ -4145,7 +4145,7 @@
ygopro.ctos_send(client.server, 'SURRENDER');
} else {
sur_player = CLIENT_get_partner(client);
if (!sur_player || sur_player.closed || sur_player.is_local) {
if (!sur_player || sur_player.isClosed || sur_player.is_local) {
sur_player = client;
}
if (room.hostinfo.mode === 2 && sur_player !== client) {
......
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