Commit 34d8cf59 authored by mercury233's avatar mercury233

fix

parent e1e57055
...@@ -1443,7 +1443,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)-> ...@@ -1443,7 +1443,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)->
return unless room return unless room
msg = _.trim(info.msg) msg = _.trim(info.msg)
cancel = _.startsWith(msg, "/") cancel = _.startsWith(msg, "/")
room.last_active_time = moment() unless cancel or not room.random_type room.last_active_time = moment() unless cancel or not (room.random_type or room.arena)
cmd = msg.split(' ') cmd = msg.split(' ')
switch cmd[0] switch cmd[0]
when '/投降', '/surrender' when '/投降', '/surrender'
...@@ -1620,7 +1620,7 @@ ygopro.ctos_follow 'RESPONSE', false, (buffer, info, client, server)-> ...@@ -1620,7 +1620,7 @@ ygopro.ctos_follow 'RESPONSE', false, (buffer, info, client, server)->
ygopro.ctos_follow 'HAND_RESULT', false, (buffer, info, client, server)-> ygopro.ctos_follow 'HAND_RESULT', false, (buffer, info, client, server)->
room=ROOM_all[client.rid] room=ROOM_all[client.rid]
return unless room and room.random_type return unless room and (room.random_type or room.arena)
if client.is_host if client.is_host
room.waiting_for_player = room.waiting_for_player2 room.waiting_for_player = room.waiting_for_player2
room.last_active_time = moment().subtract(settings.modules.random_duel.hang_timeout - 19, 's') room.last_active_time = moment().subtract(settings.modules.random_duel.hang_timeout - 19, 's')
...@@ -1628,13 +1628,13 @@ ygopro.ctos_follow 'HAND_RESULT', false, (buffer, info, client, server)-> ...@@ -1628,13 +1628,13 @@ ygopro.ctos_follow 'HAND_RESULT', false, (buffer, info, client, server)->
ygopro.ctos_follow 'TP_RESULT', false, (buffer, info, client, server)-> ygopro.ctos_follow 'TP_RESULT', false, (buffer, info, client, server)->
room=ROOM_all[client.rid] room=ROOM_all[client.rid]
return unless room and room.random_type return unless room and (room.random_type or room.arena)
room.last_active_time = moment() room.last_active_time = moment()
return return
ygopro.stoc_follow 'SELECT_HAND', false, (buffer, info, client, server)-> ygopro.stoc_follow 'SELECT_HAND', false, (buffer, info, client, server)->
room=ROOM_all[client.rid] room=ROOM_all[client.rid]
return unless room and room.random_type return unless room and (room.random_type or room.arena)
if client.is_host if client.is_host
room.waiting_for_player = client room.waiting_for_player = client
else else
...@@ -1646,7 +1646,7 @@ ygopro.stoc_follow 'SELECT_TP', false, (buffer, info, client, server)-> ...@@ -1646,7 +1646,7 @@ ygopro.stoc_follow 'SELECT_TP', false, (buffer, info, client, server)->
room=ROOM_all[client.rid] room=ROOM_all[client.rid]
return unless room return unless room
room.changing_side = false room.changing_side = false
if room.random_type if room.random_type or room.arena
room.waiting_for_player = client room.waiting_for_player = client
room.last_active_time = moment() room.last_active_time = moment()
return return
......
...@@ -1778,7 +1778,7 @@ ...@@ -1778,7 +1778,7 @@
} }
msg = _.trim(info.msg); msg = _.trim(info.msg);
cancel = _.startsWith(msg, "/"); cancel = _.startsWith(msg, "/");
if (!(cancel || !room.random_type)) { if (!(cancel || !(room.random_type || room.arena))) {
room.last_active_time = moment(); room.last_active_time = moment();
} }
cmd = msg.split(' '); cmd = msg.split(' ');
...@@ -2018,7 +2018,7 @@ ...@@ -2018,7 +2018,7 @@
ygopro.ctos_follow('HAND_RESULT', false, function(buffer, info, client, server) { ygopro.ctos_follow('HAND_RESULT', false, function(buffer, info, client, server) {
var room; var room;
room = ROOM_all[client.rid]; room = ROOM_all[client.rid];
if (!(room && room.random_type)) { if (!(room && (room.random_type || room.arena))) {
return; return;
} }
if (client.is_host) { if (client.is_host) {
...@@ -2030,7 +2030,7 @@ ...@@ -2030,7 +2030,7 @@
ygopro.ctos_follow('TP_RESULT', false, function(buffer, info, client, server) { ygopro.ctos_follow('TP_RESULT', false, function(buffer, info, client, server) {
var room; var room;
room = ROOM_all[client.rid]; room = ROOM_all[client.rid];
if (!(room && room.random_type)) { if (!(room && (room.random_type || room.arena))) {
return; return;
} }
room.last_active_time = moment(); room.last_active_time = moment();
...@@ -2039,7 +2039,7 @@ ...@@ -2039,7 +2039,7 @@
ygopro.stoc_follow('SELECT_HAND', false, function(buffer, info, client, server) { ygopro.stoc_follow('SELECT_HAND', false, function(buffer, info, client, server) {
var room; var room;
room = ROOM_all[client.rid]; room = ROOM_all[client.rid];
if (!(room && room.random_type)) { if (!(room && (room.random_type || room.arena))) {
return; return;
} }
if (client.is_host) { if (client.is_host) {
...@@ -2057,7 +2057,7 @@ ...@@ -2057,7 +2057,7 @@
return; return;
} }
room.changing_side = false; room.changing_side = false;
if (room.random_type) { if (room.random_type || room.arena) {
room.waiting_for_player = client; room.waiting_for_player = client;
room.last_active_time = moment(); room.last_active_time = moment();
} }
......
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