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
e84fae99
Commit
e84fae99
authored
Feb 19, 2026
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix reconn deck verify
parent
a621b36b
Pipeline
#43328
passed with stages
in 4 minutes and 52 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
21 deletions
+2
-21
src/feats/lock-deck/lock-deck-service.ts
src/feats/lock-deck/lock-deck-service.ts
+2
-2
src/utility/deck-compare.ts
src/utility/deck-compare.ts
+0
-19
No files found.
src/feats/lock-deck/lock-deck-service.ts
View file @
e84fae99
...
@@ -5,7 +5,7 @@ import {
...
@@ -5,7 +5,7 @@ import {
import
{
ChatColor
}
from
'
ygopro-msg-encode
'
;
import
{
ChatColor
}
from
'
ygopro-msg-encode
'
;
import
{
Context
}
from
'
../../app
'
;
import
{
Context
}
from
'
../../app
'
;
import
{
RoomCheckDeck
}
from
'
../../room
'
;
import
{
RoomCheckDeck
}
from
'
../../room
'
;
import
{
is
SrvproTournamentDeck
Equal
}
from
'
../../utility/deck-compare
'
;
import
{
is
UpdateDeckPayload
Equal
}
from
'
../../utility/deck-compare
'
;
import
{
LockDeckExpectedDeckCheck
}
from
'
./lock-deck-check
'
;
import
{
LockDeckExpectedDeckCheck
}
from
'
./lock-deck-check
'
;
class
SrvproDeckBadError
extends
YGOProLFListError
{
class
SrvproDeckBadError
extends
YGOProLFListError
{
...
@@ -47,7 +47,7 @@ export class LockDeckService {
...
@@ -47,7 +47,7 @@ export class LockDeckService {
}
}
const
deckName
=
expectedDeck
.
name
||
''
;
const
deckName
=
expectedDeck
.
name
||
''
;
if
(
is
SrvproTournamentDeck
Equal
(
msg
.
deck
,
expectedDeck
))
{
if
(
is
UpdateDeckPayload
Equal
(
msg
.
deck
,
expectedDeck
))
{
await
client
.
sendChat
(
await
client
.
sendChat
(
`#{deck_correct_part1}
${
deckName
}
#{deck_correct_part2}`
,
`#{deck_correct_part1}
${
deckName
}
#{deck_correct_part2}`
,
ChatColor
.
BABYBLUE
,
ChatColor
.
BABYBLUE
,
...
...
src/utility/deck-compare.ts
View file @
e84fae99
...
@@ -8,25 +8,6 @@ import YGOProDeck from 'ygopro-deck-encode';
...
@@ -8,25 +8,6 @@ import YGOProDeck from 'ygopro-deck-encode';
export
function
isUpdateDeckPayloadEqual
(
export
function
isUpdateDeckPayloadEqual
(
deck1
:
YGOProDeck
,
deck1
:
YGOProDeck
,
deck2
:
YGOProDeck
,
deck2
:
YGOProDeck
,
):
boolean
{
const
uint8Array1
=
deck1
.
toUpdateDeckPayload
();
const
uint8Array2
=
deck2
.
toUpdateDeckPayload
();
// 将 Uint8Array 转换为 Buffer 再比较
const
buffer1
=
Buffer
.
from
(
uint8Array1
);
const
buffer2
=
Buffer
.
from
(
uint8Array2
);
return
buffer1
.
equals
(
buffer2
);
}
/**
* srvpro 锦标赛模式的对比方式:
* 1. 用 UPDATE_DECK payload 形态归一化(main+extra 统一到 payload 语义)
* 2. 忽略顺序进行比较
*/
export
function
isSrvproTournamentDeckEqual
(
deck1
:
YGOProDeck
,
deck2
:
YGOProDeck
,
):
boolean
{
):
boolean
{
const
normalizedDeck1
=
YGOProDeck
.
fromUpdateDeckPayload
(
const
normalizedDeck1
=
YGOProDeck
.
fromUpdateDeckPayload
(
deck1
.
toUpdateDeckPayload
(),
deck1
.
toUpdateDeckPayload
(),
...
...
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