Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
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
2
Merge Requests
2
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
MyCard
Neos
Commits
0863a675
Commit
0863a675
authored
Mar 19, 2024
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix room logic
parent
a470cf07
Pipeline
#25947
passed with stages
in 7 minutes and 34 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
src/service/room/errorMsg.ts
src/service/room/errorMsg.ts
+1
-1
src/ui/WaitRoom/index.tsx
src/ui/WaitRoom/index.tsx
+11
-7
No files found.
src/service/room/errorMsg.ts
View file @
0863a675
...
...
@@ -23,7 +23,7 @@ export default async function handleErrorMsg(errorMsg: ygopro.StocErrorMsg) {
}
case
ErrorType
.
DECKERROR
:
{
const
flag
=
error_code
>>
28
;
const
code
=
error_code
&
&
0xfffffff
;
const
code
=
error_code
&
0xfffffff
;
const
card
=
fetchCard
(
code
);
const
baseMsg
=
`卡组非法,请检查:
${
card
.
text
.
name
}
`
;
switch
(
flag
)
{
...
...
src/ui/WaitRoom/index.tsx
View file @
0863a675
...
...
@@ -53,12 +53,18 @@ export const Component: React.FC = () => {
const
op
=
room
.
getOpPlayer
();
const
navigate
=
useNavigate
();
const
updateDeck
=
(
deck
:
IDeck
)
=>
{
sendUpdateDeck
(
deck
);
// 设置side里面的卡组
sideStore
.
deck
=
deck
;
};
const
onDeckSelected
=
(
deckName
:
string
)
=>
{
const
d
eck
=
deckStore
.
get
(
deckName
);
if
(
d
eck
)
{
const
newD
eck
=
deckStore
.
get
(
deckName
);
if
(
newD
eck
)
{
sendHsNotReady
();
sendUpdateDeck
(
d
eck
);
setDeck
(
d
eck
);
updateDeck
(
newD
eck
);
setDeck
(
newD
eck
);
}
else
{
message
.
error
(
`Deck
${
deckName
}
not found`
);
}
...
...
@@ -67,9 +73,7 @@ export const Component: React.FC = () => {
const
onReady
=
()
=>
{
if
(
me
?.
state
===
PlayerState
.
NO_READY
)
{
if
(
deck
)
{
sendUpdateDeck
(
deck
);
// 设置side里面的卡组
sideStore
.
deck
=
deck
;
updateDeck
(
deck
);
sendHsReady
();
}
else
{
message
.
error
(
"
请先选择卡组
"
);
...
...
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