Commit 5a145c57 authored by mercury233's avatar mercury233

temp fix *2

parent 5f75822d
...@@ -578,7 +578,7 @@ class Room ...@@ -578,7 +578,7 @@ class Room
#log.info(@started,@disconnector,@random_type) #log.info(@started,@disconnector,@random_type)
if @started and @disconnector != 'server' and (client.pos < 4 or client.is_host) if @started and @disconnector != 'server' and (client.pos < 4 or client.is_host)
@finished = true @finished = true
@scores[client.name] = -1 @scores[client.name] = -9
if @random_type and not client.flee_free if @random_type and not client.flee_free
ROOM_ban_player(client.name, client.ip, "${random_ban_reason_flee}") ROOM_ban_player(client.name, client.ip, "${random_ban_reason_flee}")
if @players.length and !(@windbot and client.is_host) if @players.length and !(@windbot and client.is_host)
...@@ -905,7 +905,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)-> ...@@ -905,7 +905,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
replay_id=Cloud_replay_ids[Math.floor(Math.random()*Cloud_replay_ids.length)] replay_id=Cloud_replay_ids[Math.floor(Math.random()*Cloud_replay_ids.length)]
redisdb.hgetall "replay:"+replay_id, client.open_cloud_replay redisdb.hgetall "replay:"+replay_id, client.open_cloud_replay
else if info.version != settings.version and (!(info.version >= 9016 and info.version <= 9019) or settings.version != 4926) #强行兼容23333版 else if info.version != settings.version and (info.version < 9020 or settings.version != 4927) #强行兼容23333版
ygopro.stoc_send_chat(client, settings.modules.update, ygopro.constants.COLORS.RED) ygopro.stoc_send_chat(client, settings.modules.update, ygopro.constants.COLORS.RED)
ygopro.stoc_send client, 'ERROR_MSG', { ygopro.stoc_send client, 'ERROR_MSG', {
msg: 4 msg: 4
...@@ -922,7 +922,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)-> ...@@ -922,7 +922,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
ygopro.stoc_die(client, '${invalid_password_length}') ygopro.stoc_die(client, '${invalid_password_length}')
return return
if info.version >= 9016 and info.version <= 9019 and settings.version == 4926 #强行兼容23333版 if info.version >= 9020 and settings.version == 4927 #强行兼容23333版
info.version = settings.version info.version = settings.version
struct = ygopro.structs["CTOS_JoinGame"] struct = ygopro.structs["CTOS_JoinGame"]
struct._setBuff(buffer) struct._setBuff(buffer)
...@@ -1097,7 +1097,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)-> ...@@ -1097,7 +1097,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
ygopro.stoc_die(client, "${invalid_password_room}") ygopro.stoc_die(client, "${invalid_password_room}")
else else
if info.version >= 9016 and info.version <= 9019 and settings.version == 4926 #强行兼容23333版 if info.version >= 9020 and settings.version == 4927 #强行兼容23333版
info.version = settings.version info.version = settings.version
struct = ygopro.structs["CTOS_JoinGame"] struct = ygopro.structs["CTOS_JoinGame"]
struct._setBuff(buffer) struct._setBuff(buffer)
...@@ -1254,6 +1254,7 @@ ygopro.stoc_follow 'GAME_MSG', false, (buffer, info, client, server)-> ...@@ -1254,6 +1254,7 @@ ygopro.stoc_follow 'GAME_MSG', false, (buffer, info, client, server)->
room.winner = pos room.winner = pos
if room and !room.finished and room.dueling_players[pos] if room and !room.finished and room.dueling_players[pos]
room.winner_name = room.dueling_players[pos].name room.winner_name = room.dueling_players[pos].name
#log.info room.dueling_players, pos
room.scores[room.winner_name] = room.scores[room.winner_name] + 1 room.scores[room.winner_name] = room.scores[room.winner_name] + 1
#lp跟踪 #lp跟踪
...@@ -1728,7 +1729,8 @@ if settings.modules.mycard.enabled ...@@ -1728,7 +1729,8 @@ if settings.modules.mycard.enabled
if time_passed >= settings.modules.random_duel.hang_timeout if time_passed >= settings.modules.random_duel.hang_timeout
room.last_active_time = moment() room.last_active_time = moment()
ygopro.stoc_send_chat_to_room(room, "#{room.waiting_for_player.name} ${kicked_by_system}", ygopro.constants.COLORS.RED) ygopro.stoc_send_chat_to_room(room, "#{room.waiting_for_player.name} ${kicked_by_system}", ygopro.constants.COLORS.RED)
room.scores[room.waiting_for_player.name] = -1 room.scores[room.waiting_for_player.name] = -9
#log.info room.waiting_for_player.name, room.scores[room.waiting_for_player.name]
room.waiting_for_player.server.destroy() room.waiting_for_player.server.destroy()
else if time_passed >= (settings.modules.random_duel.hang_timeout - 20) and not (time_passed % 10) else if time_passed >= (settings.modules.random_duel.hang_timeout - 20) and not (time_passed % 10)
ygopro.stoc_send_chat_to_room(room, "#{room.waiting_for_player.name} ${afk_warn_part1}#{settings.modules.random_duel.hang_timeout - time_passed}${afk_warn_part2}", ygopro.constants.COLORS.RED) ygopro.stoc_send_chat_to_room(room, "#{room.waiting_for_player.name} ${afk_warn_part1}#{settings.modules.random_duel.hang_timeout - time_passed}${afk_warn_part2}", ygopro.constants.COLORS.RED)
......
...@@ -774,7 +774,7 @@ ...@@ -774,7 +774,7 @@
} }
if (this.started && this.disconnector !== 'server' && (client.pos < 4 || client.is_host)) { if (this.started && this.disconnector !== 'server' && (client.pos < 4 || client.is_host)) {
this.finished = true; this.finished = true;
this.scores[client.name] = -1; this.scores[client.name] = -9;
if (this.random_type && !client.flee_free) { if (this.random_type && !client.flee_free) {
ROOM_ban_player(client.name, client.ip, "${random_ban_reason_flee}"); ROOM_ban_player(client.name, client.ip, "${random_ban_reason_flee}");
} }
...@@ -1132,7 +1132,7 @@ ...@@ -1132,7 +1132,7 @@
} else if (info.pass.toUpperCase() === "W" && settings.modules.cloud_replay.enabled) { } else if (info.pass.toUpperCase() === "W" && settings.modules.cloud_replay.enabled) {
replay_id = Cloud_replay_ids[Math.floor(Math.random() * Cloud_replay_ids.length)]; replay_id = Cloud_replay_ids[Math.floor(Math.random() * Cloud_replay_ids.length)];
redisdb.hgetall("replay:" + replay_id, client.open_cloud_replay); redisdb.hgetall("replay:" + replay_id, client.open_cloud_replay);
} else if (info.version !== settings.version && (!(info.version >= 9016 && info.version <= 9019) || settings.version !== 4926)) { } else if (info.version !== settings.version && (info.version < 9020 || settings.version !== 4927)) {
ygopro.stoc_send_chat(client, settings.modules.update, ygopro.constants.COLORS.RED); ygopro.stoc_send_chat(client, settings.modules.update, ygopro.constants.COLORS.RED);
ygopro.stoc_send(client, 'ERROR_MSG', { ygopro.stoc_send(client, 'ERROR_MSG', {
msg: 4, msg: 4,
...@@ -1147,7 +1147,7 @@ ...@@ -1147,7 +1147,7 @@
ygopro.stoc_die(client, '${invalid_password_length}'); ygopro.stoc_die(client, '${invalid_password_length}');
return; return;
} }
if (info.version >= 9016 && info.version <= 9019 && settings.version === 4926) { if (info.version >= 9020 && settings.version === 4927) {
info.version = settings.version; info.version = settings.version;
struct = ygopro.structs["CTOS_JoinGame"]; struct = ygopro.structs["CTOS_JoinGame"];
struct._setBuff(buffer); struct._setBuff(buffer);
...@@ -1333,7 +1333,7 @@ ...@@ -1333,7 +1333,7 @@
} else if (info.pass.length && !ROOM_validate(info.pass)) { } else if (info.pass.length && !ROOM_validate(info.pass)) {
ygopro.stoc_die(client, "${invalid_password_room}"); ygopro.stoc_die(client, "${invalid_password_room}");
} else { } else {
if (info.version >= 9016 && info.version <= 9019 && settings.version === 4926) { if (info.version >= 9020 && settings.version === 4927) {
info.version = settings.version; info.version = settings.version;
struct = ygopro.structs["CTOS_JoinGame"]; struct = ygopro.structs["CTOS_JoinGame"];
struct._setBuff(buffer); struct._setBuff(buffer);
...@@ -2177,7 +2177,7 @@ ...@@ -2177,7 +2177,7 @@
if (time_passed >= settings.modules.random_duel.hang_timeout) { if (time_passed >= settings.modules.random_duel.hang_timeout) {
room.last_active_time = moment(); room.last_active_time = moment();
ygopro.stoc_send_chat_to_room(room, room.waiting_for_player.name + " ${kicked_by_system}", ygopro.constants.COLORS.RED); ygopro.stoc_send_chat_to_room(room, room.waiting_for_player.name + " ${kicked_by_system}", ygopro.constants.COLORS.RED);
room.scores[room.waiting_for_player.name] = -1; room.scores[room.waiting_for_player.name] = -9;
room.waiting_for_player.server.destroy(); room.waiting_for_player.server.destroy();
} else if (time_passed >= (settings.modules.random_duel.hang_timeout - 20) && !(time_passed % 10)) { } else if (time_passed >= (settings.modules.random_duel.hang_timeout - 20) && !(time_passed % 10)) {
ygopro.stoc_send_chat_to_room(room, room.waiting_for_player.name + " ${afk_warn_part1}" + (settings.modules.random_duel.hang_timeout - time_passed) + "${afk_warn_part2}", ygopro.constants.COLORS.RED); ygopro.stoc_send_chat_to_room(room, room.waiting_for_player.name + " ${afk_warn_part1}" + (settings.modules.random_duel.hang_timeout - time_passed) + "${afk_warn_part2}", ygopro.constants.COLORS.RED);
......
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