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
865766e8
Commit
865766e8
authored
Jun 05, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize chaining
parent
745e7944
Pipeline
#22136
passed with stages
in 12 minutes and 57 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
src/service/duel/chaining.ts
src/service/duel/chaining.ts
+9
-1
src/ui/Duel/PlayMat/Card/index.tsx
src/ui/Duel/PlayMat/Card/index.tsx
+1
-1
No files found.
src/service/duel/chaining.ts
View file @
865766e8
import
{
ygopro
}
from
"
@/api
"
;
import
{
fetchCard
,
ygopro
}
from
"
@/api
"
;
import
{
eventbus
,
Task
}
from
"
@/infra
"
;
import
{
cardStore
,
fetchEsHintMeta
,
matStore
}
from
"
@/stores
"
;
...
...
@@ -18,6 +18,14 @@ export default async (chaining: ygopro.StocGameMessage.MsgChaining) => {
// 设置连锁序号
target
.
chainIndex
=
matStore
.
chains
.
length
;
const
meta
=
await
fetchCard
(
chaining
.
code
);
// 这里不能设置`code`,因为存在一个场景:
// 对方的`魔神仪-曼德拉护肤草`发动效果后,后端会发一次`MSG_SHUFFLE_HAND`,但传给前端的codes全是0,如果这里设置了`code`的话,在后面的`MSG_SHUFFLE_HAND`处理就会有问题。
// target.code = meta.id;
// 设置`Meta`信息,让对手发动效果的卡也能展示正面卡图
target
.
meta
=
meta
;
// 发动效果动画
await
eventbus
.
call
(
Task
.
Focus
,
target
.
uuid
);
console
.
color
(
"
blue
"
)(
`
${
target
.
meta
.
text
.
name
}
chaining`
);
...
...
src/ui/Duel/PlayMat/Card/index.tsx
View file @
865766e8
...
...
@@ -127,7 +127,7 @@ export const Card: FC<{ idx: number }> = React.memo(({ idx }) => {
onError=
{
()
=>
{
console
.
log
(
""
);
}
}
src=
{
getCardImgUrl
(
snap
.
code
)
}
src=
{
getCardImgUrl
(
snap
.
code
==
0
?
snap
.
meta
.
id
:
snap
.
code
)
}
/>
<
img
className=
"card-back"
src=
{
getCardImgUrl
(
0
,
true
)
}
/>
</
div
>
...
...
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