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
dca20f60
Commit
dca20f60
authored
Dec 17, 2015
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
bb22aa46
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
room.coffee
room.coffee
+1
-1
room.js
room.js
+1
-1
ygopro-server.coffee
ygopro-server.coffee
+1
-1
ygopro-server.js
ygopro-server.js
+1
-1
No files found.
room.coffee
View file @
dca20f60
...
@@ -82,7 +82,7 @@ class Room
...
@@ -82,7 +82,7 @@ class Room
return
{
"error"
:
"因为您近期在游戏中
#{
bannedplayer
.
reason
}
,您已被禁止使用随机对战功能,将在
#{
moment
(
bannedplayer
.
time
).
fromNow
(
true
)
}
后解封"
}
return
{
"error"
:
"因为您近期在游戏中
#{
bannedplayer
.
reason
}
,您已被禁止使用随机对战功能,将在
#{
moment
(
bannedplayer
.
time
).
fromNow
(
true
)
}
后解封"
}
max_player
=
if
type
==
'T'
then
4
else
2
max_player
=
if
type
==
'T'
then
4
else
2
result
=
_
.
find
@
all
,
(
room
)
->
result
=
_
.
find
@
all
,
(
room
)
->
room
.
random_type
!=
''
and
!
room
.
started
and
((
type
==
''
and
room
.
random_type
!=
'T'
)
or
room
.
random_type
==
type
)
and
room
.
get_playing_player
().
length
<
max_player
and
room
.
get_host
().
remoteAddress
!=
Room
.
players_oppentlist
[
player_ip
]
room
.
random_type
!=
''
and
!
room
.
started
and
((
type
==
''
and
room
.
random_type
!=
'T'
)
or
room
.
random_type
==
type
)
and
room
.
get_playing_player
().
length
<
max_player
and
(
room
.
get_host
()
==
null
or
room
.
get_host
().
remoteAddress
!=
Room
.
players_oppentlist
[
player_ip
])
if
result
if
result
result
.
welcome
=
'对手已经在等你了,开始决斗吧!'
result
.
welcome
=
'对手已经在等你了,开始决斗吧!'
#log.info 'found room', player_name
#log.info 'found room', player_name
...
...
room.js
View file @
dca20f60
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
}
}
max_player
=
type
===
'
T
'
?
4
:
2
;
max_player
=
type
===
'
T
'
?
4
:
2
;
result
=
_
.
find
(
this
.
all
,
function
(
room
)
{
result
=
_
.
find
(
this
.
all
,
function
(
room
)
{
return
room
.
random_type
!==
''
&&
!
room
.
started
&&
((
type
===
''
&&
room
.
random_type
!==
'
T
'
)
||
room
.
random_type
===
type
)
&&
room
.
get_playing_player
().
length
<
max_player
&&
room
.
get_host
().
remoteAddress
!==
Room
.
players_oppentlist
[
player_ip
]
;
return
room
.
random_type
!==
''
&&
!
room
.
started
&&
((
type
===
''
&&
room
.
random_type
!==
'
T
'
)
||
room
.
random_type
===
type
)
&&
room
.
get_playing_player
().
length
<
max_player
&&
(
room
.
get_host
()
===
null
||
room
.
get_host
().
remoteAddress
!==
Room
.
players_oppentlist
[
player_ip
])
;
});
});
if
(
result
)
{
if
(
result
)
{
result
.
welcome
=
'
对手已经在等你了,开始决斗吧!
'
;
result
.
welcome
=
'
对手已经在等你了,开始决斗吧!
'
;
...
...
ygopro-server.coffee
View file @
dca20f60
...
@@ -499,7 +499,7 @@ ygopro.stoc_send_random_tip_to_room = (room)->
...
@@ -499,7 +499,7 @@ ygopro.stoc_send_random_tip_to_room = (room)->
setInterval
()
->
setInterval
()
->
for
room
in
Room
.
all
for
room
in
Room
.
all
ygopro
.
stoc_send_random_tip_to_room
(
room
)
unless
room
.
started
ygopro
.
stoc_send_random_tip_to_room
(
room
)
unless
room
and
room
.
started
return
return
,
30000
,
30000
...
...
ygopro-server.js
View file @
dca20f60
...
@@ -576,7 +576,7 @@
...
@@ -576,7 +576,7 @@
ref
=
Room
.
all
;
ref
=
Room
.
all
;
for
(
k
=
0
,
len
=
ref
.
length
;
k
<
len
;
k
++
)
{
for
(
k
=
0
,
len
=
ref
.
length
;
k
<
len
;
k
++
)
{
room
=
ref
[
k
];
room
=
ref
[
k
];
if
(
!
room
.
started
)
{
if
(
!
(
room
&&
room
.
started
)
)
{
ygopro
.
stoc_send_random_tip_to_room
(
room
);
ygopro
.
stoc_send_random_tip_to_room
(
room
);
}
}
}
}
...
...
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