Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro2
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
srvpro2
Commits
302b5d5d
Commit
302b5d5d
authored
Feb 14, 2026
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refas
parent
f7c5bf94
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
11 deletions
+17
-11
src/client/client.ts
src/client/client.ts
+1
-0
src/client/ip-resolver.ts
src/client/ip-resolver.ts
+6
-1
src/room/room.ts
src/room/room.ts
+10
-10
No files found.
src/client/client.ts
View file @
302b5d5d
...
...
@@ -39,6 +39,7 @@ export class Client {
// in handshake
ip
=
''
;
isLocal
=
false
;
isInternal
=
false
;
private
logger
=
this
.
ctx
.
createLogger
(
this
.
constructor
.
name
);
private
disconnectSubject
=
new
Subject
<
void
>
();
...
...
src/client/ip-resolver.ts
View file @
302b5d5d
...
...
@@ -116,7 +116,12 @@ export class IpResolver {
);
let
connectCount
=
this
.
connectedIpCount
.
get
(
newIp
)
||
0
;
if
(
!
noConnectCountLimit
&&
!
isLocal
&&
!
this
.
isTrustedProxy
(
newIp
))
{
if
(
!
noConnectCountLimit
&&
!
isLocal
&&
!
client
.
isInternal
&&
!
this
.
isTrustedProxy
(
newIp
)
)
{
connectCount
++
;
this
.
connectedIpCount
.
set
(
newIp
,
connectCount
);
}
else
{
...
...
src/room/room.ts
View file @
302b5d5d
...
...
@@ -1232,7 +1232,7 @@ export class Room {
await
this
.
dispatchGameMsg
(
watcherMsg
.
msg
);
await
this
.
ctx
.
dispatch
(
new
OnRoomDuelStart
(
this
),
this
.
g
a
tIngameOperatingPlayer
(
this
.
turnIngamePos
),
this
.
g
e
tIngameOperatingPlayer
(
this
.
turnIngamePos
),
);
await
Promise
.
all
([
...
...
@@ -1267,7 +1267,7 @@ export class Room {
this
.
phase
=
phase
;
}
g
a
tIngameOperatingPlayer
(
ingameDuelPos
:
number
):
Client
|
undefined
{
g
e
tIngameOperatingPlayer
(
ingameDuelPos
:
number
):
Client
|
undefined
{
const
players
=
this
.
getIngameDuelPosPlayers
(
ingameDuelPos
);
if
(
!
this
.
isTag
)
{
return
players
[
0
];
...
...
@@ -1292,7 +1292,7 @@ export class Room {
return
players
[
0
];
}
private
async
refreshLocations
(
async
refreshLocations
(
refresh
:
RequireQueryLocation
,
options
:
{
queryFlag
?:
number
;
sendToClient
?:
MayBeArray
<
Client
>
}
=
{},
)
{
...
...
@@ -1318,7 +1318,7 @@ export class Room {
}
}
private
async
refreshSingle
(
async
refreshSingle
(
refresh
:
RequireQueryCardLocation
,
options
:
{
queryFlag
?:
number
;
sendToClient
?:
MayBeArray
<
Client
>
}
=
{},
)
{
...
...
@@ -1366,7 +1366,7 @@ export class Room {
}
private
async
sendWaitingToNonOperator
(
ingameDuelPos
:
number
)
{
const
operatingPlayer
=
this
.
g
a
tIngameOperatingPlayer
(
ingameDuelPos
);
const
operatingPlayer
=
this
.
g
e
tIngameOperatingPlayer
(
ingameDuelPos
);
const
noOps
=
this
.
playingPlayers
.
filter
((
p
)
=>
p
!==
operatingPlayer
);
await
Promise
.
all
(
noOps
.
map
((
p
)
=>
...
...
@@ -1414,7 +1414,7 @@ export class Room {
}
const
duelPos
=
this
.
getIngameDuelPos
(
c
);
const
playerView
=
message
.
playerView
(
duelPos
);
const
operatingPlayer
=
this
.
g
a
tIngameOperatingPlayer
(
duelPos
);
const
operatingPlayer
=
this
.
g
e
tIngameOperatingPlayer
(
duelPos
);
return
sendGameMsg
(
c
,
c
===
operatingPlayer
?
playerView
:
playerView
.
teammateView
(),
...
...
@@ -1466,7 +1466,7 @@ export class Room {
message
=
await
this
.
localGameMsgDispatcher
.
dispatch
(
message
);
message
=
await
this
.
ctx
.
dispatch
(
message
,
this
.
g
a
tIngameOperatingPlayer
(
this
.
turnIngamePos
),
this
.
g
e
tIngameOperatingPlayer
(
this
.
turnIngamePos
),
);
}
if
(
options
.
route
)
{
...
...
@@ -1513,7 +1513,7 @@ export class Room {
})
.
middleware
(
YGOProMsgRetry
,
async
(
message
,
next
)
=>
{
if
(
this
.
responsePos
!=
null
)
{
const
op
=
this
.
g
a
tIngameOperatingPlayer
(
const
op
=
this
.
g
e
tIngameOperatingPlayer
(
this
.
getIngameDuelPosByDuelPos
(
this
.
responsePos
),
);
await
op
.
send
(
...
...
@@ -1582,7 +1582,7 @@ export class Room {
}
if
(
client
!==
this
.
g
a
tIngameOperatingPlayer
(
this
.
g
e
tIngameOperatingPlayer
(
this
.
getIngameDuelPosByDuelPos
(
this
.
responsePos
),
)
)
{
...
...
@@ -1617,7 +1617,7 @@ export class Room {
if
(
this
.
responsePos
==
null
||
client
!==
this
.
g
a
tIngameOperatingPlayer
(
this
.
g
e
tIngameOperatingPlayer
(
this
.
getIngameDuelPosByDuelPos
(
this
.
responsePos
),
)
||
!
this
.
ocgcore
...
...
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