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
baichixing
Neos
Commits
19073671
Commit
19073671
authored
Aug 20, 2023
by
timel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: remove useless await
parent
338735da
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
17 additions
and
17 deletions
+17
-17
src/api/strings.ts
src/api/strings.ts
+1
-1
src/service/duel/announce.ts
src/service/duel/announce.ts
+1
-1
src/service/duel/chaining.ts
src/service/duel/chaining.ts
+1
-1
src/service/duel/confirmCards.ts
src/service/duel/confirmCards.ts
+1
-1
src/service/duel/draw.ts
src/service/duel/draw.ts
+1
-1
src/service/duel/move.ts
src/service/duel/move.ts
+1
-1
src/service/duel/selectEffectYn.ts
src/service/duel/selectEffectYn.ts
+1
-1
src/service/duel/selectOption.ts
src/service/duel/selectOption.ts
+1
-1
src/service/duel/sortCard.ts
src/service/duel/sortCard.ts
+1
-1
src/service/duel/start.ts
src/service/duel/start.ts
+1
-1
src/service/duel/updateData.ts
src/service/duel/updateData.ts
+1
-1
src/service/room/errorMsg.ts
src/service/room/errorMsg.ts
+1
-1
src/service/utils/fetchCheckCardMeta.ts
src/service/utils/fetchCheckCardMeta.ts
+1
-1
src/stores/matStore/methods/fetchHint.ts
src/stores/matStore/methods/fetchHint.ts
+2
-2
src/ui/BuildDeck/index.tsx
src/ui/BuildDeck/index.tsx
+2
-2
No files found.
src/api/strings.ts
View file @
19073671
...
...
@@ -36,6 +36,6 @@ export async function getStrings(description: number): Promise<string> {
const
code
=
description
>>
4
;
const
index
=
description
&
0xf
;
return
getCardStr
(
await
fetchCard
(
code
),
index
)
||
""
;
return
getCardStr
(
fetchCard
(
code
),
index
)
||
""
;
}
}
src/service/duel/announce.ts
View file @
19073671
...
...
@@ -40,7 +40,7 @@ export default async (announce: MsgAnnounce) => {
case
MsgAnnounce
.
AnnounceType
.
Card
:
{
const
options
=
[];
for
(
const
option
of
announce
.
options
)
{
const
meta
=
await
fetchCard
(
option
.
code
);
const
meta
=
fetchCard
(
option
.
code
);
if
(
meta
.
text
.
name
)
{
options
.
push
({
info
:
meta
.
text
.
name
,
...
...
src/service/duel/chaining.ts
View file @
19073671
...
...
@@ -18,7 +18,7 @@ export default async (chaining: ygopro.StocGameMessage.MsgChaining) => {
// 设置连锁序号
target
.
chainIndex
=
matStore
.
chains
.
length
;
const
meta
=
await
fetchCard
(
chaining
.
code
);
const
meta
=
fetchCard
(
chaining
.
code
);
// 这里不能设置`code`,因为存在一个场景:
// 对方的`魔神仪-曼德拉护肤草`发动效果后,后端会发一次`MSG_SHUFFLE_HAND`,但传给前端的codes全是0,如果这里设置了`code`的话,在后面的`MSG_SHUFFLE_HAND`处理就会有问题。
// target.code = meta.id;
...
...
src/service/duel/confirmCards.ts
View file @
19073671
...
...
@@ -11,7 +11,7 @@ export default async (confirmCards: ygopro.StocGameMessage.MsgConfirmCards) => {
if
(
target
)
{
// 设置`occupant`
const
meta
=
await
fetchCard
(
card
.
code
);
const
meta
=
fetchCard
(
card
.
code
);
target
.
meta
=
meta
;
// 动画
await
callCardFocus
(
target
.
uuid
);
...
...
src/service/duel/draw.ts
View file @
19073671
...
...
@@ -17,7 +17,7 @@ export default async (draw: ygopro.StocGameMessage.MsgDraw) => {
for
(
const
idx
in
newHands
)
{
const
card
=
newHands
[
Number
(
idx
)];
const
code
=
draw
.
cards
[
idx
];
const
meta
=
await
fetchCard
(
code
);
const
meta
=
fetchCard
(
code
);
card
.
code
=
code
;
card
.
meta
=
meta
;
card
.
location
.
zone
=
ygopro
.
CardZone
.
HAND
;
...
...
src/service/duel/move.ts
View file @
19073671
...
...
@@ -34,7 +34,7 @@ export default async (move: MsgMove) => {
const
to
=
move
.
to
;
const
reason
=
move
.
reason
;
const
meta
=
await
fetchCard
(
code
);
const
meta
=
fetchCard
(
code
);
if
(
meta
.
data
.
type
!==
undefined
&&
(
meta
.
data
.
type
&
TYPE_TOKEN
)
>
0
)
{
// 衍生物
if
(
from
.
zone
===
DECK
)
{
...
...
src/service/duel/selectEffectYn.ts
View file @
19073671
...
...
@@ -32,6 +32,6 @@ export default async (selectEffectYn: MsgSelectEffectYn) => {
// TODO: 国际化文案
const
desc
=
fetchStrings
(
Region
.
System
,
effect_description
);
const
meta
=
await
fetchCard
(
code
);
const
meta
=
fetchCard
(
code
);
await
displayYesNoModal
(
textGenerator
(
desc
,
meta
,
location
));
};
src/service/duel/selectOption.ts
View file @
19073671
...
...
@@ -13,7 +13,7 @@ export default async (selectOption: ygopro.StocGameMessage.MsgSelectOption) => {
fetchStrings
(
Region
.
System
,
556
),
await
Promise
.
all
(
options
.
map
(
async
({
code
,
response
})
=>
{
const
meta
=
await
fetchCard
(
code
>>
4
);
const
meta
=
fetchCard
(
code
>>
4
);
const
msg
=
getCardStr
(
meta
,
code
&
0xf
)
||
"
[?]
"
;
return
{
msg
,
response
};
}),
...
...
src/service/duel/sortCard.ts
View file @
19073671
...
...
@@ -6,7 +6,7 @@ type MsgSortCard = ygopro.StocGameMessage.MsgSortCard;
export
default
async
(
sortCard
:
MsgSortCard
)
=>
{
const
options
=
await
Promise
.
all
(
sortCard
.
options
.
map
(
async
({
code
,
response
})
=>
{
const
meta
=
await
fetchCard
(
code
!
);
const
meta
=
fetchCard
(
code
!
);
return
{
meta
,
response
:
response
!
,
...
...
src/service/duel/start.ts
View file @
19073671
...
...
@@ -106,7 +106,7 @@ export default async (start: ygopro.StocGameMessage.MsgStart) => {
const
genCard
=
(
o
:
CardType
)
=>
{
const
t
=
proxy
(
o
);
subscribeKey
(
t
,
"
code
"
,
async
(
code
)
=>
{
const
meta
=
await
fetchCard
(
code
??
0
);
const
meta
=
fetchCard
(
code
??
0
);
t
.
meta
=
meta
;
});
return
t
;
...
...
src/service/duel/updateData.ts
View file @
19073671
...
...
@@ -16,7 +16,7 @@ export default async (updateData: MsgUpdateData) => {
if
(
target
)
{
// 目前只更新以下字段
if
(
action
?.
code
>=
0
)
{
const
newMeta
=
await
fetchCard
(
action
.
code
);
const
newMeta
=
fetchCard
(
action
.
code
);
target
.
code
=
action
.
code
;
target
.
meta
=
newMeta
;
}
...
...
src/service/room/errorMsg.ts
View file @
19073671
...
...
@@ -24,7 +24,7 @@ export default async function handleErrorMsg(errorMsg: ygopro.StocErrorMsg) {
case
ErrorType
.
DECKERROR
:
{
const
flag
=
error_code
>>
28
;
const
code
=
error_code
&&
0xfffffff
;
const
card
=
await
fetchCard
(
code
);
const
card
=
fetchCard
(
code
);
const
baseMsg
=
`卡组非法,请检查:
${
card
.
text
.
name
}
`
;
switch
(
flag
)
{
case
DECKERROR_LFLIST
:
{
...
...
src/service/utils/fetchCheckCardMeta.ts
View file @
19073671
...
...
@@ -30,7 +30,7 @@ const helper = async (
code
!==
0
?
code
:
cardStore
.
at
(
location
.
zone
,
controller
,
location
.
sequence
)?.
code
||
0
;
const
meta
=
await
fetchCard
(
newID
);
const
meta
=
fetchCard
(
newID
);
const
effectDesc
=
effect_description
?
getCardStr
(
meta
,
effect_description
&
0xf
)
...
...
src/stores/matStore/methods/fetchHint.ts
View file @
19073671
...
...
@@ -22,7 +22,7 @@ export const fetchSelectHintMeta = async ({
let
selectHintMeta
=
""
;
if
(
selectHintData
>
DESCRIPTION_LIMIT
)
{
// 针对`MSG_SELECT_PLACE`的特化逻辑
const
cardMeta
=
await
fetchCard
(
selectHintData
);
const
cardMeta
=
fetchCard
(
selectHintData
);
selectHintMeta
=
fetchStrings
(
Region
.
System
,
569
).
replace
(
"
[%ls]
"
,
cardMeta
.
text
.
name
||
"
[?]
"
,
...
...
@@ -55,7 +55,7 @@ export const fetchEsHintMeta = async ({
?
originMsg
:
fetchStrings
(
Region
.
System
,
originMsg
);
const
cardMeta
=
cardID
?
await
fetchCard
(
cardID
)
:
undefined
;
const
cardMeta
=
cardID
?
fetchCard
(
cardID
)
:
undefined
;
let
esHint
=
newOriginMsg
;
...
...
src/ui/BuildDeck/index.tsx
View file @
19073671
...
...
@@ -260,8 +260,8 @@ const Search: React.FC = () => {
]
as
const
).
map
(([
label
,
onClick
],
key
)
=>
({
key
,
label
,
onClick
}));
const
handleSearch
=
async
(
conditions
:
FtsConditions
=
searchConditions
)
=>
{
const
result
=
(
await
searchCards
({
query
:
searchWord
,
conditions
})
)
const
handleSearch
=
(
conditions
:
FtsConditions
=
searchConditions
)
=>
{
const
result
=
searchCards
({
query
:
searchWord
,
conditions
}
)
.
filter
((
card
)
=>
!
isToken
(
card
.
data
.
type
??
0
))
.
sort
(
sortRef
.
current
);
// 衍生物不显示
setSearchResult
(()
=>
result
);
...
...
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