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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
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
nanahira
srvpro
Commits
4bef43d7
Commit
4bef43d7
authored
Jan 29, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'mc'
parents
1abbd49a
6a67ab4c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
9 deletions
+38
-9
data/default_config.json
data/default_config.json
+4
-0
data/i18n.json
data/i18n.json
+2
-0
ygopro-server.coffee
ygopro-server.coffee
+9
-0
ygopro-server.js
ygopro-server.js
+23
-9
No files found.
data/default_config.json
View file @
4bef43d7
...
...
@@ -177,6 +177,10 @@
"password"
:
"123456"
,
"port"
:
7933
},
"side_restrict"
:
{
"enabled"
:
false
,
"restrict_cards"
:
[]
},
"test_mode"
:
{
"watch_public_hand"
:
false
,
"no_connect_count_limit"
:
false
,
...
...
data/i18n.json
View file @
4bef43d7
...
...
@@ -189,6 +189,7 @@
"pre_release_compat_hint"
:
"It seems like you're a duelist with pre-release cards. The pre-release compat mode is turned on."
,
"replay_hint_part1"
:
"Sending the replay of the duel number "
,
"replay_hint_part2"
:
"."
,
"invalid_side_rule"
:
"Illegal cards are contained in your side deck."
,
"athletic_arena_tip"
:
"During an athletic match, a game quit behavior is regarded as a surrender."
},
"es-es"
:
{
...
...
@@ -525,6 +526,7 @@
"pre_release_compat_hint"
:
"看起来你是使用先行卡数据的用户,已开启先行卡兼容模式。"
,
"replay_hint_part1"
:
"正在发送第"
,
"replay_hint_part2"
:
"局决斗的录像。"
,
"invalid_side_rule"
:
"副卡组中包含不允许换入副卡组的卡。"
,
"athletic_arena_tip"
:
"在竞技匹配中,比赛开始前退出游戏也会视为投降。"
},
"ko-kr"
:
{
...
...
ygopro-server.coffee
View file @
4bef43d7
...
...
@@ -3293,6 +3293,15 @@ ygopro.ctos_follow 'UPDATE_DECK', true, (buffer, info, client, server, datas)->
CLIENT_kick
(
room
.
dueling_players
[
oppo_pos
-
win_pos
])
CLIENT_kick
(
room
.
dueling_players
[
oppo_pos
-
win_pos
+
1
])
if
room
.
hostinfo
.
mode
==
2
return
true
if
settings
.
modules
.
side_restrict
.
enabled
and
room
.
started
for
code
in
settings
.
modules
.
side_restrict
.
restrict_cards
if
_
.
indexOf
(
buff_side
,
code
)
>
-
1
or
(
settings
.
modules
.
pre_release_compat
.
enabled
and
_
.
indexOf
(
buff_side
,
room
.
list_pre_to_official
[
code
])
>
-
1
)
ygopro
.
stoc_send_chat_to_room
(
room
,
"${invalid_side_rule}"
,
ygopro
.
constants
.
COLORS
.
RED
)
ygopro
.
stoc_send
client
,
'ERROR_MSG'
,
{
msg
:
3
code
:
0
}
return
true
struct
=
ygopro
.
structs
[
"deck"
]
struct
.
_setBuff
(
buffer
)
if
room
.
random_type
or
room
.
arena
...
...
ygopro-server.js
View file @
4bef43d7
...
...
@@ -4149,7 +4149,7 @@
});
ygopro
.
ctos_follow
(
'
UPDATE_DECK
'
,
true
,
function
(
buffer
,
info
,
client
,
server
,
datas
)
{
var
buff_main
,
buff_main_new
,
buff_side
,
buff_side_new
,
card
,
code
,
code_
,
compat_deckbuf
,
current_deck
,
deck
,
deck_array
,
deck_main
,
deck_side
,
deck_text
,
deckbuf
,
decks
,
found
,
found_deck
,
i
,
len3
,
len4
,
len5
,
len6
,
l
ine
,
m
,
n
,
o
,
oppo_pos
,
p
,
room
,
struct
,
win_pos
;
var
buff_main
,
buff_main_new
,
buff_side
,
buff_side_new
,
card
,
code
,
code_
,
compat_deckbuf
,
current_deck
,
deck
,
deck_array
,
deck_main
,
deck_side
,
deck_text
,
deckbuf
,
decks
,
found
,
found_deck
,
i
,
len3
,
len4
,
len5
,
len6
,
l
en7
,
line
,
m
,
n
,
o
,
oppo_pos
,
p
,
q
,
ref3
,
room
,
struct
,
win_pos
;
if
(
settings
.
modules
.
reconnect
.
enabled
&&
client
.
pre_reconnecting
)
{
if
(
!
CLIENT_is_able_to_reconnect
(
client
)
&&
!
CLIENT_is_able_to_kick_reconnect
(
client
))
{
ygopro
.
stoc_send_chat
(
client
,
"
${reconnect_failed}
"
,
ygopro
.
constants
.
COLORS
.
RED
);
...
...
@@ -4225,6 +4225,20 @@
}
return
true
;
}
if
(
settings
.
modules
.
side_restrict
.
enabled
&&
room
.
started
)
{
ref3
=
settings
.
modules
.
side_restrict
.
restrict_cards
;
for
(
m
=
0
,
len3
=
ref3
.
length
;
m
<
len3
;
m
++
)
{
code
=
ref3
[
m
];
if
(
_
.
indexOf
(
buff_side
,
code
)
>
-
1
||
(
settings
.
modules
.
pre_release_compat
.
enabled
&&
_
.
indexOf
(
buff_side
,
room
.
list_pre_to_official
[
code
])
>
-
1
))
{
ygopro
.
stoc_send_chat_to_room
(
room
,
"
${invalid_side_rule}
"
,
ygopro
.
constants
.
COLORS
.
RED
);
ygopro
.
stoc_send
(
client
,
'
ERROR_MSG
'
,
{
msg
:
3
,
code
:
0
});
return
true
;
}
}
}
struct
=
ygopro
.
structs
[
"
deck
"
];
struct
.
_setBuff
(
buffer
);
if
(
room
.
random_type
||
room
.
arena
)
{
...
...
@@ -4239,8 +4253,8 @@
buffer
=
struct
.
buffer
;
found_deck
=
false
;
decks
=
fs
.
readdirSync
(
settings
.
modules
.
tournament_mode
.
deck_path
);
for
(
m
=
0
,
len3
=
decks
.
length
;
m
<
len3
;
m
++
)
{
deck
=
decks
[
m
];
for
(
n
=
0
,
len4
=
decks
.
length
;
n
<
len4
;
n
++
)
{
deck
=
decks
[
n
];
if
(
_
.
endsWith
(
deck
,
client
.
name
+
"
.ydk
"
))
{
found_deck
=
deck
;
}
...
...
@@ -4256,8 +4270,8 @@
deck_main
=
[];
deck_side
=
[];
current_deck
=
deck_main
;
for
(
n
=
0
,
len4
=
deck_array
.
length
;
n
<
len4
;
n
++
)
{
line
=
deck_array
[
n
];
for
(
o
=
0
,
len5
=
deck_array
.
length
;
o
<
len5
;
o
++
)
{
line
=
deck_array
[
o
];
if
(
line
.
indexOf
(
"
!side
"
)
>=
0
)
{
current_deck
=
deck_side
;
}
...
...
@@ -4286,8 +4300,8 @@
found
=
false
;
buff_main_new
=
[];
buff_side_new
=
[];
for
(
o
=
0
,
len5
=
buff_main
.
length
;
o
<
len5
;
o
++
)
{
code
=
buff_main
[
o
];
for
(
p
=
0
,
len6
=
buff_main
.
length
;
p
<
len6
;
p
++
)
{
code
=
buff_main
[
p
];
code_
=
code
;
if
(
room
.
list_pre_to_official
[
code
])
{
code_
=
room
.
list_pre_to_official
[
code
];
...
...
@@ -4295,8 +4309,8 @@
}
buff_main_new
.
push
(
code_
);
}
for
(
p
=
0
,
len6
=
buff_side
.
length
;
p
<
len6
;
p
++
)
{
code
=
buff_side
[
p
];
for
(
q
=
0
,
len7
=
buff_side
.
length
;
q
<
len7
;
q
++
)
{
code
=
buff_side
[
q
];
code_
=
code
;
if
(
room
.
list_pre_to_official
[
code
])
{
code_
=
room
.
list_pre_to_official
[
code
];
...
...
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