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
492e22b8
Commit
492e22b8
authored
Nov 14, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix record in ready
parent
6264a952
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
19 deletions
+48
-19
ygopro-server.coffee
ygopro-server.coffee
+2
-2
ygopro-server.js
ygopro-server.js
+13
-2
ygopro.coffee
ygopro.coffee
+11
-4
ygopro.js
ygopro.js
+22
-11
No files found.
ygopro-server.coffee
View file @
492e22b8
...
...
@@ -1772,8 +1772,8 @@ class Room
else
@
last_active_time
=
moment_now_string
addRecorderBuffer
:
(
buffer
)
->
if
settings
.
modules
.
cloud_replay
.
enabled
addRecorderBuffer
:
(
buffer
,
isChat
)
->
if
settings
.
modules
.
cloud_replay
.
enabled
and
(
!
isChat
or
@
arena
or
settings
.
modules
.
tournament_mode
.
enabled
)
@
recorder_buffers
.
push
buffer
return
...
...
ygopro-server.js
View file @
492e22b8
...
...
@@ -2397,8 +2397,8 @@
}
}
addRecorderBuffer
(
buffer
)
{
if
(
settings
.
modules
.
cloud_replay
.
enabled
)
{
addRecorderBuffer
(
buffer
,
isChat
)
{
if
(
settings
.
modules
.
cloud_replay
.
enabled
&&
(
!
isChat
||
this
.
arena
||
settings
.
modules
.
tournament_mode
.
enabled
)
)
{
this
.
recorder_buffers
.
push
(
buffer
);
}
}
...
...
@@ -4280,8 +4280,19 @@
return
cancel
;
});
ygopro
.
ctos_follow
(
'
HS_READY
'
,
true
,
function
(
buffer
,
info
,
client
,
server
,
datas
)
{
log
.
info
(
"
HS_READY
"
,
client
.
name
);
return
false
;
});
ygopro
.
stoc_follow
(
'
ERROR_MSG
'
,
true
,
function
(
buffer
,
info
,
client
,
server
,
datas
)
{
log
.
info
(
"
ERROR_MSG
"
,
client
.
name
,
JSON
.
stringify
(
info
));
return
false
;
});
ygopro
.
ctos_follow
(
'
UPDATE_DECK
'
,
true
,
async
function
(
buffer
,
info
,
client
,
server
,
datas
)
{
var
athleticCheckResult
,
buff_main
,
buff_side
,
card
,
current_deck
,
deck
,
deck_array
,
deck_main
,
deck_side
,
deck_text
,
deckbuf
,
decks
,
found_deck
,
i
,
j
,
l
,
len
,
len1
,
line
,
oppo_pos
,
recover_player_data
,
recoveredDeck
,
room
,
struct
,
win_pos
;
log
.
info
(
"
UPDATE_DECK
"
,
client
.
name
,
info
.
mainc
,
info
.
sidec
);
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
);
...
...
ygopro.coffee
View file @
492e22b8
...
...
@@ -78,10 +78,17 @@ translateHandler = (handler) ->
if
!
room
console
.
log
"err stoc_send_chat_to_room"
return
for
client
in
room
.
players
@
stoc_send_chat
(
client
,
msg
,
player
)
if
client
for
client
in
room
.
watchers
@
stoc_send_chat
(
client
,
msg
,
player
)
if
client
for
line
in
_
.
lines
(
msg
)
chat_buffer
=
@
helper
.
prepareMessage
(
"STOC_CHAT"
,
{
player
:
player
msg
:
line
})
for
client
in
room
.
players
@
helper
.
send
(
client
,
chat_buffer
)
if
client
for
client
in
room
.
watchers
@
helper
.
send
(
client
,
chat_buffer
)
if
client
if
room
.
duel_stage
!=
@
constants
.
DUEL_STAGE
.
BEGIN
room
.
addRecorderBuffer
(
chat_buffer
,
true
)
return
@
stoc_send_hint_card_to_room
=
(
room
,
card
)
->
...
...
ygopro.js
View file @
492e22b8
...
...
@@ -120,23 +120,34 @@
};
this
.
stoc_send_chat_to_room
=
function
(
room
,
msg
,
player
=
8
)
{
var
c
lient
,
i
,
j
,
len
,
len1
,
ref
,
ref1
;
var
c
hat_buffer
,
client
,
i
,
j
,
k
,
len
,
len1
,
len2
,
line
,
ref
,
ref1
,
ref2
;
if
(
!
room
)
{
console
.
log
(
"
err stoc_send_chat_to_room
"
);
return
;
}
ref
=
room
.
players
;
ref
=
_
.
lines
(
msg
)
;
for
(
i
=
0
,
len
=
ref
.
length
;
i
<
len
;
i
++
)
{
client
=
ref
[
i
];
if
(
client
)
{
this
.
stoc_send_chat
(
client
,
msg
,
player
);
line
=
ref
[
i
];
chat_buffer
=
this
.
helper
.
prepareMessage
(
"
STOC_CHAT
"
,
{
player
:
player
,
msg
:
line
});
ref1
=
room
.
players
;
for
(
j
=
0
,
len1
=
ref1
.
length
;
j
<
len1
;
j
++
)
{
client
=
ref1
[
j
];
if
(
client
)
{
this
.
helper
.
send
(
client
,
chat_buffer
);
}
}
}
ref1
=
room
.
watchers
;
for
(
j
=
0
,
len1
=
ref1
.
length
;
j
<
len1
;
j
++
)
{
client
=
ref1
[
j
];
if
(
client
)
{
this
.
stoc_send_chat
(
client
,
msg
,
player
);
ref2
=
room
.
watchers
;
for
(
k
=
0
,
len2
=
ref2
.
length
;
k
<
len2
;
k
++
)
{
client
=
ref2
[
k
];
if
(
client
)
{
this
.
helper
.
send
(
client
,
chat_buffer
);
}
}
if
(
room
.
duel_stage
!==
this
.
constants
.
DUEL_STAGE
.
BEGIN
)
{
room
.
addRecorderBuffer
(
chat_buffer
,
true
);
}
}
};
...
...
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