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
2d7cc987
Commit
2d7cc987
authored
Jan 22, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into tcg_random
parents
da08b167
26a869f2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
77 deletions
+80
-77
ygopro-server.coffee
ygopro-server.coffee
+36
-35
ygopro-server.js
ygopro-server.js
+44
-42
No files found.
ygopro-server.coffee
View file @
2d7cc987
...
...
@@ -3627,18 +3627,19 @@ ygopro.ctos_follow 'UPDATE_DECK', true, (buffer, info, client, server, datas)->
struct
.
set
(
"sidec"
,
1
)
struct
.
set
(
"deckbuf"
,
[
4392470
,
4392470
])
ygopro
.
stoc_send_chat
(
client
,
"${deck_incorrect_reconnect}"
,
ygopro
.
constants
.
COLORS
.
RED
)
else
if
room
.
duel_stage
==
ygopro
.
constants
.
DUEL_STAGE
.
BEGIN
and
settings
.
modules
.
tournament_mode
.
enabled
and
settings
.
modules
.
tournament_mode
.
deck_check
and
fs
.
readdirSync
(
settings
.
modules
.
tournament_mode
.
deck_path
).
length
else
if
room
.
duel_stage
==
ygopro
.
constants
.
DUEL_STAGE
.
BEGIN
and
settings
.
modules
.
tournament_mode
.
enabled
and
settings
.
modules
.
tournament_mode
.
deck_check
decks
=
await
fs
.
promises
.
readdir
(
settings
.
modules
.
tournament_mode
.
deck_path
)
if
decks
.
length
struct
.
set
(
"mainc"
,
1
)
struct
.
set
(
"sidec"
,
1
)
struct
.
set
(
"deckbuf"
,
[
4392470
,
4392470
])
buffer
=
struct
.
buffer
found_deck
=
false
decks
=
fs
.
readdirSync
(
settings
.
modules
.
tournament_mode
.
deck_path
)
for
deck
in
decks
if
deck_name_match
(
deck
,
client
.
name
)
found_deck
=
deck
if
found_deck
deck_text
=
fs
.
readFileSync
(
settings
.
modules
.
tournament_mode
.
deck_path
+
found_deck
,{
encoding
:
"ASCII"
})
deck_text
=
await
fs
.
promises
.
readFile
(
settings
.
modules
.
tournament_mode
.
deck_path
+
found_deck
,{
encoding
:
"ASCII"
})
deck_array
=
deck_text
.
split
(
"
\n
"
)
deck_main
=
[]
deck_side
=
[]
...
...
@@ -4227,7 +4228,7 @@ if true
response
.
end
(
addCallback
(
u
.
query
.
callback
,
"['密码错误', 0]"
))
return
death_room_found
=
false
_async
.
each
(
rooms
,
(
room
,
done
)
->
_async
.
each
(
ROOM_all
,
(
room
,
done
)
->
if
!
(
room
and
(
u
.
query
.
deathcancel
==
"all"
or
u
.
query
.
deathcancel
==
room
.
process_pid
.
toString
()
or
u
.
query
.
deathcancel
==
room
.
name
))
done
()
return
...
...
ygopro-server.js
View file @
2d7cc987
...
...
@@ -4838,13 +4838,14 @@
struct
.
set
(
"
deckbuf
"
,
[
4392470
,
4392470
]);
ygopro
.
stoc_send_chat
(
client
,
"
${deck_incorrect_reconnect}
"
,
ygopro
.
constants
.
COLORS
.
RED
);
}
}
else
if
(
room
.
duel_stage
===
ygopro
.
constants
.
DUEL_STAGE
.
BEGIN
&&
settings
.
modules
.
tournament_mode
.
enabled
&&
settings
.
modules
.
tournament_mode
.
deck_check
&&
fs
.
readdirSync
(
settings
.
modules
.
tournament_mode
.
deck_path
).
length
)
{
}
else
if
(
room
.
duel_stage
===
ygopro
.
constants
.
DUEL_STAGE
.
BEGIN
&&
settings
.
modules
.
tournament_mode
.
enabled
&&
settings
.
modules
.
tournament_mode
.
deck_check
)
{
decks
=
(
await
fs
.
promises
.
readdir
(
settings
.
modules
.
tournament_mode
.
deck_path
));
if
(
decks
.
length
)
{
struct
.
set
(
"
mainc
"
,
1
);
struct
.
set
(
"
sidec
"
,
1
);
struct
.
set
(
"
deckbuf
"
,
[
4392470
,
4392470
]);
buffer
=
struct
.
buffer
;
found_deck
=
false
;
decks
=
fs
.
readdirSync
(
settings
.
modules
.
tournament_mode
.
deck_path
);
for
(
j
=
0
,
len
=
decks
.
length
;
j
<
len
;
j
++
)
{
deck
=
decks
[
j
];
if
(
deck_name_match
(
deck
,
client
.
name
))
{
...
...
@@ -4852,9 +4853,9 @@
}
}
if
(
found_deck
)
{
deck_text
=
fs
.
readFileSync
(
settings
.
modules
.
tournament_mode
.
deck_path
+
found_deck
,
{
deck_text
=
(
await
fs
.
promises
.
readFile
(
settings
.
modules
.
tournament_mode
.
deck_path
+
found_deck
,
{
encoding
:
"
ASCII
"
}
);
})
);
deck_array
=
deck_text
.
split
(
"
\n
"
);
deck_main
=
[];
deck_side
=
[];
...
...
@@ -4886,6 +4887,7 @@
ygopro
.
stoc_send_chat
(
client
,
`
${
client
.
name
}
\${deck_not_found}`
,
ygopro
.
constants
.
COLORS
.
RED
);
}
}
}
return
false
;
});
...
...
@@ -5612,7 +5614,7 @@
return
;
}
death_room_found
=
false
;
_async
.
each
(
rooms
,
function
(
room
,
done
)
{
_async
.
each
(
ROOM_all
,
function
(
room
,
done
)
{
if
(
!
(
room
&&
(
u
.
query
.
deathcancel
===
"
all
"
||
u
.
query
.
deathcancel
===
room
.
process_pid
.
toString
()
||
u
.
query
.
deathcancel
===
room
.
name
)))
{
done
();
return
;
...
...
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