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