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
a1f9891e
Commit
a1f9891e
authored
Mar 24, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finish selectSum
parent
32c15388
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
5 deletions
+11
-5
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectTribute.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectTribute.ts
+1
-0
src/reducers/duel/mod.ts
src/reducers/duel/mod.ts
+2
-0
src/reducers/duel/modal/mod.ts
src/reducers/duel/modal/mod.ts
+1
-0
src/service/duel/selectSum.ts
src/service/duel/selectSum.ts
+2
-0
src/ui/Duel/checkCardModalV3.tsx
src/ui/Duel/checkCardModalV3.tsx
+5
-5
No files found.
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectTribute.ts
View file @
a1f9891e
...
...
@@ -10,6 +10,7 @@ import MsgSelectCard = ygopro.StocGameMessage.MsgSelectCard;
* */
export
default
(
data
:
Uint8Array
)
=>
{
// FIXME: handle it correctly
const
reader
=
new
BufferReaderExt
(
data
);
const
player
=
reader
.
inner
.
readUint8
();
...
...
src/reducers/duel/mod.ts
View file @
a1f9891e
...
...
@@ -60,6 +60,7 @@ import {
setCheckCardModalV3ResponseAbleImpl
,
resetCheckCardModalV3Impl
,
setCheckCardModalV3SelectedImpl
,
checkCardModalV3Case
,
}
from
"
./modal/mod
"
;
import
{
MonsterState
,
...
...
@@ -310,6 +311,7 @@ const duelSlice = createSlice({
YesNoModalCase
(
builder
);
optionModalCase
(
builder
);
checkCardModalV2Case
(
builder
);
checkCardModalV3Case
(
builder
);
},
});
...
...
src/reducers/duel/modal/mod.ts
View file @
a1f9891e
...
...
@@ -91,6 +91,7 @@ export interface ModalState {
level2
:
number
;
response
:
number
;
}[];
// TODO: remove this prop
selectedList
:
{
meta
:
CardMeta
;
level1
:
number
;
...
...
src/service/duel/selectSum.ts
View file @
a1f9891e
import
{
ygopro
}
from
"
../../api/ocgcore/idl/ocgcore
"
;
import
{
setCheckCardModalV3AllLevel
,
setCheckCardModalV3IsOpen
,
setCheckCardModalV3MinMax
,
setCheckCardModalV3OverFlow
,
}
from
"
../../reducers/duel/mod
"
;
...
...
@@ -26,4 +27,5 @@ export default (selectSum: MsgSelectSum, dispatch: AppDispatch) => {
options
:
selectSum
.
selectable_cards
,
})
);
dispatch
(
setCheckCardModalV3IsOpen
(
true
));
};
src/ui/Duel/checkCardModalV3.tsx
View file @
a1f9891e
import
React
from
"
react
"
;
import
React
,
{
useState
}
from
"
react
"
;
import
{
useAppSelector
}
from
"
../../hook
"
;
import
{
store
}
from
"
../../store
"
;
import
{
Modal
,
Button
,
Card
,
Row
,
Col
}
from
"
antd
"
;
...
...
@@ -8,7 +8,6 @@ import {
resetCheckCardModalV3
,
setCheckCardModalV3IsOpen
,
setCheckCardModalV3ResponseAble
,
setCheckCardModalV3Selected
,
}
from
"
../../reducers/duel/mod
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
{
selectCheckCardModalV3
}
from
"
../../reducers/duel/modal/checkCardModalV3Slice
"
;
...
...
@@ -21,7 +20,7 @@ const CheckCardModalV3 = () => {
const
max
=
state
.
selectMax
||
0
;
const
mustSelectOptions
=
state
.
mustSelectList
;
const
selectAbleOptions
=
state
.
selectAbleList
;
const
selectedOptions
=
state
.
selectedList
;
const
[
selectedOptions
,
setSelectedOptions
]
=
useState
(
state
.
selectedList
)
;
const
overflow
=
state
.
overflow
;
const
LevelSum
=
state
.
allLevel
;
const
Level1Sum
=
mustSelectOptions
...
...
@@ -68,7 +67,8 @@ const CheckCardModalV3 = () => {
size=
"small"
multiple=
{
true
}
onChange=
{
(
values
:
any
)
=>
{
setCheckCardModalV3Selected
(
values
);
console
.
log
(
values
);
setSelectedOptions
(
values
);
}
}
>
<
Row
>
...
...
@@ -95,7 +95,7 @@ const CheckCardModalV3 = () => {
</
CheckCard
.
Group
>
<
p
>
必须选择的卡片
</
p
>
<
Row
>
{
selected
Options
.
map
((
option
,
idx
)
=>
{
{
mustSelect
Options
.
map
((
option
,
idx
)
=>
{
return
(
<
Col
span=
{
4
}
key=
{
idx
}
>
<
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