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
b42b70b0
Commit
b42b70b0
authored
Sep 06, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix selectOption service
parent
625200f7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
21 deletions
+12
-21
src/api/strings.ts
src/api/strings.ts
+2
-2
src/service/duel/hint.ts
src/service/duel/hint.ts
+1
-1
src/service/duel/selectChain.ts
src/service/duel/selectChain.ts
+1
-1
src/service/duel/selectOption.ts
src/service/duel/selectOption.ts
+5
-14
src/service/duel/selectYesNo.ts
src/service/duel/selectYesNo.ts
+1
-1
src/stores/matStore/methods/fetchHint.ts
src/stores/matStore/methods/fetchHint.ts
+2
-2
No files found.
src/api/strings.ts
View file @
b42b70b0
...
...
@@ -29,13 +29,13 @@ export function fetchStrings(region: Region, id: string | number): string {
return
localStorage
.
getItem
(
`
${
region
}
_
${
id
}
`
)
||
""
;
}
export
async
function
getStrings
(
description
:
number
):
Promise
<
string
>
{
export
function
getStrings
(
description
:
number
):
string
{
if
(
description
<
DESCRIPTION_LIMIT
)
{
return
fetchStrings
(
Region
.
System
,
description
);
}
else
{
const
code
=
description
>>
4
;
const
index
=
description
&
0xf
;
return
getCardStr
(
fetchCard
(
code
),
index
)
||
"
"
;
return
getCardStr
(
fetchCard
(
code
),
index
)
??
"
[?]
"
;
}
}
src/service/duel/hint.ts
View file @
b42b70b0
...
...
@@ -18,7 +18,7 @@ export default async (hint: MsgHint) => {
break
;
}
case
MsgHint
.
HintType
.
HINT_SELECTMSG
:
{
await
fetchSelectHintMeta
({
fetchSelectHintMeta
({
selectHintData
:
hint
.
hint_data
,
esHint
:
""
,
});
...
...
src/service/duel/selectChain.ts
View file @
b42b70b0
...
...
@@ -67,7 +67,7 @@ export default async (selectChain: MsgSelectChain) => {
case
2
:
// 处理多张
case
3
:
{
// 处理强制发动的卡
await
fetchSelectHintMeta
({
fetchSelectHintMeta
({
selectHintData
:
203
,
});
const
{
selecteds
,
mustSelects
,
selectables
}
=
await
fetchCheckCardMeta
(
...
...
src/service/duel/selectOption.ts
View file @
b42b70b0
import
{
fetchCard
,
fetchStrings
,
getCardStr
,
Region
,
type
ygopro
,
}
from
"
@/api
"
;
import
{
fetchStrings
,
getStrings
,
Region
,
type
ygopro
}
from
"
@/api
"
;
import
{
displayOptionModal
}
from
"
@/ui/Duel/Message
"
;
export
default
async
(
selectOption
:
ygopro
.
StocGameMessage
.
MsgSelectOption
)
=>
{
const
options
=
selectOption
.
options
;
await
displayOptionModal
(
fetchStrings
(
Region
.
System
,
556
),
await
Promise
.
all
(
options
.
map
(
async
({
code
,
response
})
=>
{
const
meta
=
fetchCard
(
code
>>
4
);
const
info
=
getCardStr
(
meta
,
code
&
0xf
)
??
"
[?]
"
;
return
{
info
,
response
};
}),
),
options
.
map
(({
code
,
response
})
=>
({
info
:
getStrings
(
code
),
response
,
})),
1
,
);
};
src/service/duel/selectYesNo.ts
View file @
b42b70b0
...
...
@@ -7,6 +7,6 @@ export default async (selectYesNo: MsgSelectYesNo) => {
const
_player
=
selectYesNo
.
player
;
const
effect_description
=
selectYesNo
.
effect_description
;
const
msg
=
await
getStrings
(
effect_description
);
const
msg
=
getStrings
(
effect_description
);
await
displayYesNoModal
(
msg
);
};
src/stores/matStore/methods/fetchHint.ts
View file @
b42b70b0
...
...
@@ -10,7 +10,7 @@ export const fetchCommonHintMeta = (code: number) => {
matStore
.
hint
.
msg
=
fetchStrings
(
Region
.
System
,
code
);
};
export
const
fetchSelectHintMeta
=
async
({
export
const
fetchSelectHintMeta
=
({
selectHintData
,
esHint
,
}:
{
...
...
@@ -26,7 +26,7 @@ export const fetchSelectHintMeta = async ({
cardMeta
.
text
.
name
||
"
[?]
"
,
);
}
else
{
selectHintMeta
=
await
getStrings
(
selectHintData
);
selectHintMeta
=
getStrings
(
selectHintData
);
}
matStore
.
hint
.
code
=
selectHintData
;
...
...
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