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
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
Hide 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
{
ygopro
}
from
"
@/api
"
;
import
{
matStore
}
from
"
@/stores
"
;
import
{
cardStore
,
matStore
}
from
"
@/stores
"
;
// FIXME: 处理连锁会存在三种结果:
// FIXME: 处理连锁会存在三种结果:
// 1. Solved - 已处理;
// 1. Solved - 已处理;
...
@@ -15,7 +15,12 @@ export default async (chainSolved: ygopro.StocGameMessage.MsgChainSolved) => {
...
@@ -15,7 +15,12 @@ export default async (chainSolved: ygopro.StocGameMessage.MsgChainSolved) => {
.
at
(
0
);
.
at
(
0
);
if
(
location
)
{
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
{
}
else
{
console
.
warn
(
console
.
warn
(
`pop from chains return null! solved_index=
${
chainSolved
.
solved_index
}
, len of chains in store=
${
matStore
.
chains
.
length
}
`
`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) => {
...
@@ -23,6 +23,6 @@ export default async (chaining: ygopro.StocGameMessage.MsgChaining) => {
if
(
target
)
{
if
(
target
)
{
target
.
chainIndex
=
matStore
.
chains
.
length
;
target
.
chainIndex
=
matStore
.
chains
.
length
;
}
else
{
}
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