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
87cc4ada
Commit
87cc4ada
authored
May 28, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix chainSolved
parent
593de382
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
src/service/duel/chainSolved.ts
src/service/duel/chainSolved.ts
+7
-2
src/service/duel/chaining.ts
src/service/duel/chaining.ts
+1
-1
No files found.
src/service/duel/chainSolved.ts
View file @
87cc4ada
import
{
ygopro
}
from
"
@/api
"
;
import
{
matStore
}
from
"
@/stores
"
;
import
{
cardStore
,
matStore
}
from
"
@/stores
"
;
// FIXME: 处理连锁会存在三种结果:
// 1. Solved - 已处理;
...
...
@@ -15,7 +15,12 @@ export default async (chainSolved: ygopro.StocGameMessage.MsgChainSolved) => {
.
at
(
0
);
if
(
location
)
{
// 设置被连锁状态为空,解除连锁
matStore
.
setChained
(
location
,
undefined
);
const
target
=
cardStore
.
find
(
location
);
if
(
target
)
{
target
.
chainIndex
=
undefined
;
}
else
{
console
.
log
(
`<ChainSolved>target from
${
location
}
is null`
);
}
}
else
{
console
.
warn
(
`pop from chains return null! solved_index=
${
chainSolved
.
solved_index
}
, len of chains in store=
${
matStore
.
chains
.
length
}
`
...
...
src/service/duel/chaining.ts
View file @
87cc4ada
...
...
@@ -23,6 +23,6 @@ export default async (chaining: ygopro.StocGameMessage.MsgChaining) => {
if
(
target
)
{
target
.
chainIndex
=
matStore
.
chains
.
length
;
}
else
{
console
.
warn
(
`<
c
haining>target from
${
location
}
is null`
);
console
.
warn
(
`<
C
haining>target from
${
location
}
is null`
);
}
};
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