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
24d62791
Commit
24d62791
authored
Jun 29, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix small
parent
7d31ef65
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
31 deletions
+11
-31
src/service/duel/gameMsg.ts
src/service/duel/gameMsg.ts
+1
-1
src/service/duel/hint.ts
src/service/duel/hint.ts
+3
-3
src/service/duel/selectChain.ts
src/service/duel/selectChain.ts
+1
-1
src/ui/Duel/Message/SelectCardsModal/index.tsx
src/ui/Duel/Message/SelectCardsModal/index.tsx
+2
-2
src/ui/Duel/PlayMat/Card/index.tsx
src/ui/Duel/PlayMat/Card/index.tsx
+4
-24
No files found.
src/service/duel/gameMsg.ts
View file @
24d62791
...
@@ -104,7 +104,7 @@ async function _handleGameMsg(pb: ygopro.YgoStocMsg) {
...
@@ -104,7 +104,7 @@ async function _handleGameMsg(pb: ygopro.YgoStocMsg) {
break
;
break
;
}
}
case
"
hint
"
:
{
case
"
hint
"
:
{
onMsgHint
(
msg
.
hint
);
await
onMsgHint
(
msg
.
hint
);
break
;
break
;
}
}
...
...
src/service/duel/hint.ts
View file @
24d62791
...
@@ -7,10 +7,10 @@ import {
...
@@ -7,10 +7,10 @@ import {
import
MsgHint
=
ygopro
.
StocGameMessage
.
MsgHint
;
import
MsgHint
=
ygopro
.
StocGameMessage
.
MsgHint
;
export
default
(
hint
:
MsgHint
)
=>
{
export
default
async
(
hint
:
MsgHint
)
=>
{
switch
(
hint
.
hint_type
)
{
switch
(
hint
.
hint_type
)
{
case
MsgHint
.
HintType
.
HINT_EVENT
:
{
case
MsgHint
.
HintType
.
HINT_EVENT
:
{
fetchEsHintMeta
({
originMsg
:
hint
.
hint_data
});
await
fetchEsHintMeta
({
originMsg
:
hint
.
hint_data
});
break
;
break
;
}
}
case
MsgHint
.
HintType
.
HINT_MESSAGE
:
{
case
MsgHint
.
HintType
.
HINT_MESSAGE
:
{
...
@@ -18,7 +18,7 @@ export default (hint: MsgHint) => {
...
@@ -18,7 +18,7 @@ export default (hint: MsgHint) => {
break
;
break
;
}
}
case
MsgHint
.
HintType
.
HINT_SELECTMSG
:
{
case
MsgHint
.
HintType
.
HINT_SELECTMSG
:
{
fetchSelectHintMeta
({
await
fetchSelectHintMeta
({
selectHintData
:
hint
.
hint_data
,
selectHintData
:
hint
.
hint_data
,
esHint
:
""
,
esHint
:
""
,
});
});
...
...
src/service/duel/selectChain.ts
View file @
24d62791
...
@@ -63,7 +63,7 @@ export default async (selectChain: MsgSelectChain) => {
...
@@ -63,7 +63,7 @@ export default async (selectChain: MsgSelectChain) => {
case
2
:
// 处理多张
case
2
:
// 处理多张
case
3
:
{
case
3
:
{
// 处理强制发动的卡
// 处理强制发动的卡
fetchSelectHintMeta
({
await
fetchSelectHintMeta
({
selectHintData
:
203
,
selectHintData
:
203
,
});
});
const
{
selecteds
,
mustSelects
,
selectables
}
=
await
fetchCheckCardMeta
(
const
{
selecteds
,
mustSelects
,
selectables
}
=
await
fetchCheckCardMeta
(
...
...
src/ui/Duel/Message/SelectCardsModal/index.tsx
View file @
24d62791
...
@@ -72,8 +72,8 @@ export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({
...
@@ -72,8 +72,8 @@ export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({
const
[
submitable
,
setSubmitable
]
=
useState
(
false
);
const
[
submitable
,
setSubmitable
]
=
useState
(
false
);
const
hint
=
useSnapshot
(
matStore
.
hint
);
const
hint
=
useSnapshot
(
matStore
.
hint
);
const
preHintMsg
=
hint
?
.
esHint
||
""
;
const
preHintMsg
=
hint
.
esHint
||
""
;
const
selectHintMsg
=
hint
?
.
esSelectHint
||
"
请选择卡片
"
;
const
selectHintMsg
=
hint
.
esSelectHint
||
"
请选择卡片
"
;
const
minMaxText
=
min
===
max
?
min
:
`
${
min
}
-
${
max
}
`
;
const
minMaxText
=
min
===
max
?
min
:
`
${
min
}
-
${
max
}
`
;
...
...
src/ui/Duel/PlayMat/Card/index.tsx
View file @
24d62791
...
@@ -6,20 +6,9 @@ import classnames from "classnames";
...
@@ -6,20 +6,9 @@ import classnames from "classnames";
import
React
,
{
type
CSSProperties
,
useEffect
,
useState
}
from
"
react
"
;
import
React
,
{
type
CSSProperties
,
useEffect
,
useState
}
from
"
react
"
;
import
{
proxy
,
useSnapshot
}
from
"
valtio
"
;
import
{
proxy
,
useSnapshot
}
from
"
valtio
"
;
import
{
import
{
getCardStr
,
sendSelectIdleCmdResponse
,
ygopro
}
from
"
@/api
"
;
fetchStrings
,
getCardStr
,
sendSelectIdleCmdResponse
,
ygopro
,
}
from
"
@/api
"
;
import
{
eventbus
,
Task
}
from
"
@/infra
"
;
import
{
eventbus
,
Task
}
from
"
@/infra
"
;
import
{
import
{
cardStore
,
CardType
,
Interactivity
,
InteractType
}
from
"
@/stores
"
;
cardStore
,
CardType
,
Interactivity
,
InteractType
,
matStore
,
}
from
"
@/stores
"
;
import
{
showCardModal
as
displayCardModal
}
from
"
@/ui/Duel/Message/CardModal
"
;
import
{
showCardModal
as
displayCardModal
}
from
"
@/ui/Duel/Message/CardModal
"
;
import
{
YgoCard
}
from
"
@/ui/Shared
"
;
import
{
YgoCard
}
from
"
@/ui/Shared
"
;
...
@@ -297,12 +286,7 @@ const handleDropdownMenu = (cards: CardType[], isField: boolean) => {
...
@@ -297,12 +286,7 @@ const handleDropdownMenu = (cards: CardType[], isField: boolean) => {
sendSelectIdleCmdResponse
(
getNonEffectResponse
(
action
,
card
));
sendSelectIdleCmdResponse
(
getNonEffectResponse
(
action
,
card
));
}
else
{
}
else
{
// 场地: 选择卡片
// 场地: 选择卡片
// TODO: hint
// 更新hint
matStore
.
hint
=
{
code
:
0
,
esSelectHint
:
fetchStrings
(
"
!system
"
,
509
),
};
const
option
=
await
displaySimpleSelectCardsModal
({
const
option
=
await
displaySimpleSelectCardsModal
({
selectables
:
cards
.
map
((
card
)
=>
({
selectables
:
cards
.
map
((
card
)
=>
({
meta
:
card
.
meta
,
meta
:
card
.
meta
,
...
@@ -335,11 +319,7 @@ const handleDropdownMenu = (cards: CardType[], isField: boolean) => {
...
@@ -335,11 +319,7 @@ const handleDropdownMenu = (cards: CardType[], isField: boolean) => {
card
=
cards
[
0
];
card
=
cards
[
0
];
}
else
{
}
else
{
// 场地: 选择卡片
// 场地: 选择卡片
// 更新hint
// TODO: hint
matStore
.
hint
=
{
code
:
0
,
esSelectHint
:
fetchStrings
(
"
!system
"
,
566
),
};
const
option
=
await
displaySimpleSelectCardsModal
({
const
option
=
await
displaySimpleSelectCardsModal
({
selectables
:
cards
selectables
:
cards
// 过滤掉不能发效果的卡
// 过滤掉不能发效果的卡
...
...
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