Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
srvpro
Commits
5a145c57
Commit
5a145c57
authored
Jul 26, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temp fix *2
parent
5f75822d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
ygopro-server.coffee
ygopro-server.coffee
+7
-5
ygopro-server.js
ygopro-server.js
+5
-5
No files found.
ygopro-server.coffee
View file @
5a145c57
...
...
@@ -578,7 +578,7 @@ class Room
#log.info(@started,@disconnector,@random_type)
if
@
started
and
@
disconnector
!=
'server'
and
(
client
.
pos
<
4
or
client
.
is_host
)
@
finished
=
true
@
scores
[
client
.
name
]
=
-
1
@
scores
[
client
.
name
]
=
-
9
if
@
random_type
and
not
client
.
flee_free
ROOM_ban_player
(
client
.
name
,
client
.
ip
,
"${random_ban_reason_flee}"
)
if
@
players
.
length
and
!
(
@
windbot
and
client
.
is_host
)
...
...
@@ -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
)]
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
client
,
'ERROR_MSG'
,
{
msg
:
4
...
...
@@ -922,7 +922,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
ygopro
.
stoc_die
(
client
,
'${invalid_password_length}'
)
return
if
info
.
version
>=
90
16
and
info
.
version
<=
9019
and
settings
.
version
==
4926
#强行兼容23333版
if
info
.
version
>=
90
20
and
settings
.
version
==
4927
#强行兼容23333版
info
.
version
=
settings
.
version
struct
=
ygopro
.
structs
[
"CTOS_JoinGame"
]
struct
.
_setBuff
(
buffer
)
...
...
@@ -1097,7 +1097,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
ygopro
.
stoc_die
(
client
,
"${invalid_password_room}"
)
else
if
info
.
version
>=
90
16
and
info
.
version
<=
9019
and
settings
.
version
==
4926
#强行兼容23333版
if
info
.
version
>=
90
20
and
settings
.
version
==
4927
#强行兼容23333版
info
.
version
=
settings
.
version
struct
=
ygopro
.
structs
[
"CTOS_JoinGame"
]
struct
.
_setBuff
(
buffer
)
...
...
@@ -1254,6 +1254,7 @@ ygopro.stoc_follow 'GAME_MSG', false, (buffer, info, client, server)->
room
.
winner
=
pos
if
room
and
!
room
.
finished
and
room
.
dueling_players
[
pos
]
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
#lp跟踪
...
...
@@ -1728,7 +1729,8 @@ if settings.modules.mycard.enabled
if
time_passed
>=
settings
.
modules
.
random_duel
.
hang_timeout
room
.
last_active_time
=
moment
()
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
()
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-server.js
View file @
5a145c57
...
...
@@ -774,7 +774,7 @@
}
if
(
this
.
started
&&
this
.
disconnector
!==
'
server
'
&&
(
client
.
pos
<
4
||
client
.
is_host
))
{
this
.
finished
=
true
;
this
.
scores
[
client
.
name
]
=
-
1
;
this
.
scores
[
client
.
name
]
=
-
9
;
if
(
this
.
random_type
&&
!
client
.
flee_free
)
{
ROOM_ban_player
(
client
.
name
,
client
.
ip
,
"
${random_ban_reason_flee}
"
);
}
...
...
@@ -1132,7 +1132,7 @@
}
else
if
(
info
.
pass
.
toUpperCase
()
===
"
W
"
&&
settings
.
modules
.
cloud_replay
.
enabled
)
{
replay_id
=
Cloud_replay_ids
[
Math
.
floor
(
Math
.
random
()
*
Cloud_replay_ids
.
length
)];
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
(
client
,
'
ERROR_MSG
'
,
{
msg
:
4
,
...
...
@@ -1147,7 +1147,7 @@
ygopro
.
stoc_die
(
client
,
'
${invalid_password_length}
'
);
return
;
}
if
(
info
.
version
>=
90
16
&&
info
.
version
<=
9019
&&
settings
.
version
===
4926
)
{
if
(
info
.
version
>=
90
20
&&
settings
.
version
===
4927
)
{
info
.
version
=
settings
.
version
;
struct
=
ygopro
.
structs
[
"
CTOS_JoinGame
"
];
struct
.
_setBuff
(
buffer
);
...
...
@@ -1333,7 +1333,7 @@
}
else
if
(
info
.
pass
.
length
&&
!
ROOM_validate
(
info
.
pass
))
{
ygopro
.
stoc_die
(
client
,
"
${invalid_password_room}
"
);
}
else
{
if
(
info
.
version
>=
90
16
&&
info
.
version
<=
9019
&&
settings
.
version
===
4926
)
{
if
(
info
.
version
>=
90
20
&&
settings
.
version
===
4927
)
{
info
.
version
=
settings
.
version
;
struct
=
ygopro
.
structs
[
"
CTOS_JoinGame
"
];
struct
.
_setBuff
(
buffer
);
...
...
@@ -2177,7 +2177,7 @@
if
(
time_passed
>=
settings
.
modules
.
random_duel
.
hang_timeout
)
{
room
.
last_active_time
=
moment
();
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
();
}
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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment