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
c27b6339
Commit
c27b6339
authored
Nov 15, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve a bit dialog preformance
parent
2fcb6375
Pipeline
#1229
passed with stage
in 10 minutes and 17 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
ygopro-server.coffee
ygopro-server.coffee
+4
-4
ygopro-server.js
ygopro-server.js
+5
-5
No files found.
ygopro-server.coffee
View file @
c27b6339
...
@@ -2913,10 +2913,10 @@ ygopro.stoc_follow 'GAME_MSG', true, (buffer, info, client, server, datas)->
...
@@ -2913,10 +2913,10 @@ ygopro.stoc_follow 'GAME_MSG', true, (buffer, info, client, server, datas)->
if
room
.
hostinfo
.
mode
==
2
if
room
.
hostinfo
.
mode
==
2
act_pos
=
act_pos
*
2
act_pos
=
act_pos
*
2
if
ygopro
.
constants
.
MSG
[
msg
]
!=
'CHAINING'
or
(
trigger_location
&
0x8
)
and
client
.
ready_trap
if
ygopro
.
constants
.
MSG
[
msg
]
!=
'CHAINING'
or
(
trigger_location
&
0x8
)
and
client
.
ready_trap
if
settings
.
modules
.
vip
.
enabled
and
await
CLIENT_check_vip
(
room
.
dueling_players
[
act_pos
])
and
await
dataManager
.
getUserDialogueText
(
CLIENT_get_authorize_key
(
room
.
dueling_players
[
act_pos
]),
card
)
if
settings
.
modules
.
vip
.
enabled
and
await
CLIENT_check_vip
(
room
.
dueling_players
[
act_pos
])
and
dialogText
=
await
dataManager
.
getUserDialogueText
(
CLIENT_get_authorize_key
(
room
.
dueling_players
[
act_pos
]),
card
)
client
.
playLines
await
dataManager
.
getUserDialogueText
(
CLIENT_get_authorize_key
(
room
.
dueling_players
[
act_pos
]),
card
)
client
.
playLines
dialogText
else
if
settings
.
modules
.
vip
.
enabled
and
room
.
hostinfo
.
mode
==
2
and
await
CLIENT_check_vip
(
room
.
dueling_players
[
act_pos
+
1
])
and
await
dataManager
.
getUserDialogueText
(
CLIENT_get_authorize_key
(
room
.
dueling_players
[
act_pos
+
1
]),
card
)
else
if
settings
.
modules
.
vip
.
enabled
and
room
.
hostinfo
.
mode
==
2
and
await
CLIENT_check_vip
(
room
.
dueling_players
[
act_pos
+
1
])
and
dialogText
=
await
dataManager
.
getUserDialogueText
(
CLIENT_get_authorize_key
(
room
.
dueling_players
[
act_pos
+
1
]),
card
)
client
.
playLines
await
dataManager
.
getUserDialogueText
(
CLIENT_get_authorize_key
(
room
.
dueling_players
[
act_pos
+
1
]),
card
)
client
.
playLines
dialogText
else
if
settings
.
modules
.
dialogues
.
enabled
and
dialogues
.
dialogues
[
card
]
else
if
settings
.
modules
.
dialogues
.
enabled
and
dialogues
.
dialogues
[
card
]
client
.
playLines
dialogues
.
dialogues
[
card
][
Math
.
floor
(
Math
.
random
()
*
dialogues
.
dialogues
[
card
].
length
)]
client
.
playLines
dialogues
.
dialogues
[
card
][
Math
.
floor
(
Math
.
random
()
*
dialogues
.
dialogues
[
card
].
length
)]
else
if
settings
.
modules
.
dialogues
.
enabled
and
dialogues
.
dialogues_custom
[
card
]
else
if
settings
.
modules
.
dialogues
.
enabled
and
dialogues
.
dialogues_custom
[
card
]
...
...
ygopro-server.js
View file @
c27b6339
...
@@ -3478,7 +3478,7 @@
...
@@ -3478,7 +3478,7 @@
};
};
ygopro
.
stoc_follow
(
'
GAME_MSG
'
,
true
,
async
function
(
buffer
,
info
,
client
,
server
,
datas
)
{
ygopro
.
stoc_follow
(
'
GAME_MSG
'
,
true
,
async
function
(
buffer
,
info
,
client
,
server
,
datas
)
{
var
act_pos
,
card
,
chain
,
check
,
count
,
cpos
,
deck_found
,
found
,
hint_type
,
i
,
id
,
j
,
l
,
len
,
len1
,
len2
,
len3
,
limbo_found
,
loc
,
m
,
max_loop
,
msg
,
n
,
o
,
oppo_pos
,
phase
,
player
,
playertype
,
pos
,
ppos
,
r_player
,
reason
,
ref
,
ref1
,
ref2
,
ref3
,
ref4
,
room
,
trigger_location
,
val
,
victoryWordPlayerList
,
win_pos
;
var
act_pos
,
card
,
chain
,
check
,
count
,
cpos
,
deck_found
,
dialogText
,
found
,
hint_type
,
i
,
id
,
j
,
l
,
len
,
len1
,
len2
,
len3
,
limbo_found
,
loc
,
m
,
max_loop
,
msg
,
n
,
o
,
oppo_pos
,
phase
,
player
,
playertype
,
pos
,
ppos
,
r_player
,
reason
,
ref
,
ref1
,
ref2
,
ref3
,
ref4
,
room
,
trigger_location
,
val
,
victoryWordPlayerList
,
win_pos
;
room
=
ROOM_all
[
client
.
rid
];
room
=
ROOM_all
[
client
.
rid
];
if
(
!
(
room
&&
!
client
.
reconnecting
))
{
if
(
!
(
room
&&
!
client
.
reconnecting
))
{
return
;
return
;
...
@@ -3854,10 +3854,10 @@
...
@@ -3854,10 +3854,10 @@
act_pos
=
act_pos
*
2
;
act_pos
=
act_pos
*
2
;
}
}
if
(
ygopro
.
constants
.
MSG
[
msg
]
!==
'
CHAINING
'
||
(
trigger_location
&
0x8
)
&&
client
.
ready_trap
)
{
if
(
ygopro
.
constants
.
MSG
[
msg
]
!==
'
CHAINING
'
||
(
trigger_location
&
0x8
)
&&
client
.
ready_trap
)
{
if
(
settings
.
modules
.
vip
.
enabled
&&
(
await
CLIENT_check_vip
(
room
.
dueling_players
[
act_pos
]))
&&
(
await
dataManager
.
getUserDialogueText
(
CLIENT_get_authorize_key
(
room
.
dueling_players
[
act_pos
]),
card
)))
{
if
(
settings
.
modules
.
vip
.
enabled
&&
(
await
CLIENT_check_vip
(
room
.
dueling_players
[
act_pos
]))
&&
(
dialogText
=
(
await
dataManager
.
getUserDialogueText
(
CLIENT_get_authorize_key
(
room
.
dueling_players
[
act_pos
]),
card
)
)))
{
client
.
playLines
(
(
await
dataManager
.
getUserDialogueText
(
CLIENT_get_authorize_key
(
room
.
dueling_players
[
act_pos
]),
card
))
);
client
.
playLines
(
dialogText
);
}
else
if
(
settings
.
modules
.
vip
.
enabled
&&
room
.
hostinfo
.
mode
===
2
&&
(
await
CLIENT_check_vip
(
room
.
dueling_players
[
act_pos
+
1
]))
&&
(
await
dataManager
.
getUserDialogueText
(
CLIENT_get_authorize_key
(
room
.
dueling_players
[
act_pos
+
1
]),
card
)))
{
}
else
if
(
settings
.
modules
.
vip
.
enabled
&&
room
.
hostinfo
.
mode
===
2
&&
(
await
CLIENT_check_vip
(
room
.
dueling_players
[
act_pos
+
1
]))
&&
(
dialogText
=
(
await
dataManager
.
getUserDialogueText
(
CLIENT_get_authorize_key
(
room
.
dueling_players
[
act_pos
+
1
]),
card
)
)))
{
client
.
playLines
(
(
await
dataManager
.
getUserDialogueText
(
CLIENT_get_authorize_key
(
room
.
dueling_players
[
act_pos
+
1
]),
card
))
);
client
.
playLines
(
dialogText
);
}
else
if
(
settings
.
modules
.
dialogues
.
enabled
&&
dialogues
.
dialogues
[
card
])
{
}
else
if
(
settings
.
modules
.
dialogues
.
enabled
&&
dialogues
.
dialogues
[
card
])
{
client
.
playLines
(
dialogues
.
dialogues
[
card
][
Math
.
floor
(
Math
.
random
()
*
dialogues
.
dialogues
[
card
].
length
)]);
client
.
playLines
(
dialogues
.
dialogues
[
card
][
Math
.
floor
(
Math
.
random
()
*
dialogues
.
dialogues
[
card
].
length
)]);
}
else
if
(
settings
.
modules
.
dialogues
.
enabled
&&
dialogues
.
dialogues_custom
[
card
])
{
}
else
if
(
settings
.
modules
.
dialogues
.
enabled
&&
dialogues
.
dialogues_custom
[
card
])
{
...
...
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