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
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
love_飞影
Neos
Commits
dca9b416
Commit
dca9b416
authored
May 28, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix selectCard and selectChain
parent
890a74ea
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
4 deletions
+54
-4
src/service/duel/wait.ts
src/service/duel/wait.ts
+1
-4
src/stores/index.ts
src/stores/index.ts
+1
-0
src/stores/methods/fetchCheckCardMeta.ts
src/stores/methods/fetchCheckCardMeta.ts
+51
-0
src/stores/methods/index.ts
src/stores/methods/index.ts
+1
-0
No files found.
src/service/duel/wait.ts
View file @
dca9b416
import
{
ygopro
}
from
"
@/api
"
;
import
{
cardStore
,
matStore
,
}
from
"
@/stores
"
;
import
{
cardStore
,
matStore
}
from
"
@/stores
"
;
export
default
(
_wait
:
ygopro
.
StocGameMessage
.
MsgWait
)
=>
{
for
(
const
card
of
cardStore
.
inner
)
{
...
...
src/stores/index.ts
x
→
src/stores/index.ts
View file @
dca9b416
...
...
@@ -3,6 +3,7 @@ export * from "./chatStore";
export
*
from
"
./joinStore
"
;
export
*
from
"
./matStore
"
;
export
*
from
"
./messageStore
"
;
export
*
from
"
./methods
"
;
export
*
from
"
./moraStore
"
;
export
*
from
"
./placeStore
"
;
export
*
from
"
./playerStore
"
;
...
...
src/stores/methods/fetchCheckCardMeta.ts
0 → 100644
View file @
dca9b416
import
{
ygopro
}
from
"
@/api
"
;
import
{
fetchCard
,
getCardStr
}
from
"
@/api/cards
"
;
import
{
cardStore
,
messageStore
}
from
"
@/stores
"
;
export
const
fetchCheckCardMeta
=
async
(
{
code
,
location
,
level1
,
level2
,
response
,
effectDescCode
,
}:
{
code
:
number
;
location
:
ygopro
.
CardLocation
;
level1
?:
number
;
level2
?:
number
;
response
:
number
;
effectDescCode
?:
number
;
},
selected
?:
boolean
,
mustSelect
?:
boolean
)
=>
{
const
controller
=
location
.
controler
;
const
newID
=
code
!=
0
?
code
:
cardStore
.
at
(
location
.
location
,
controller
,
location
.
sequence
)?.
code
||
0
;
const
meta
=
await
fetchCard
(
newID
);
const
effectDesc
=
effectDescCode
?
getCardStr
(
meta
,
effectDescCode
&
0xf
)
:
undefined
;
const
newOption
=
{
meta
,
location
:
location
.
toObject
(),
level1
,
level2
,
effectDesc
,
response
,
};
if
(
selected
)
{
messageStore
.
selectCardActions
.
selecteds
.
push
(
newOption
);
}
else
if
(
mustSelect
)
{
messageStore
.
selectCardActions
.
mustSelects
.
push
(
newOption
);
}
else
{
messageStore
.
selectCardActions
.
selectables
.
push
(
newOption
);
}
};
src/stores/methods/index.ts
0 → 100644
View file @
dca9b416
export
*
from
"
./fetchCheckCardMeta
"
;
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