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
1ee5b442
Commit
1ee5b442
authored
Jun 19, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update shuffleSetCard.ts
parent
f8597fc0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
3 deletions
+28
-3
src/service/duel/gameMsg.ts
src/service/duel/gameMsg.ts
+1
-1
src/service/duel/shuffleSetCard.ts
src/service/duel/shuffleSetCard.ts
+27
-2
No files found.
src/service/duel/gameMsg.ts
View file @
1ee5b442
...
...
@@ -311,7 +311,7 @@ async function _handleGameMsg(pb: ygopro.YgoStocMsg) {
break
;
}
case
"
shuffle_set_card
"
:
{
onMsgShuffleSetCard
(
msg
.
shuffle_set_card
);
await
onMsgShuffleSetCard
(
msg
.
shuffle_set_card
);
break
;
}
...
...
src/service/duel/shuffleSetCard.ts
View file @
1ee5b442
import
{
ygopro
}
from
"
@/api
"
;
import
{
eventbus
,
Task
}
from
"
@/infra
"
;
import
{
cardStore
}
from
"
@/stores
"
;
import
MsgShuffleSetCard
=
ygopro
.
StocGameMessage
.
MsgShuffleSetCard
;
export
default
(
shuffleSetCard
:
MsgShuffleSetCard
)
=>
{
console
.
log
(
shuffleSetCard
);
export
default
async
(
shuffleSetCard
:
MsgShuffleSetCard
)
=>
{
const
from_locations
=
shuffleSetCard
.
from_locations
;
const
to_locations
=
shuffleSetCard
.
to_locations
;
if
(
from_locations
.
length
!=
to_locations
.
length
)
{
console
.
error
(
"
<ShuffleSetCard>length of from_locations and to_locations not matched
"
);
return
;
}
const
count
=
from_locations
.
length
;
for
(
let
i
=
0
;
i
<
count
;
i
++
)
{
const
from
=
from_locations
[
i
];
const
to
=
to_locations
[
i
];
// TODO: 需要考虑超量么
const
target
=
cardStore
.
at
(
from
.
zone
,
from
.
controller
,
from
.
sequence
);
if
(
target
)
{
// 更新位置
target
.
location
=
to
;
// 渲染动画
await
eventbus
.
call
(
Task
.
Move
,
target
.
uuid
);
}
else
{
console
.
warn
(
`<ShuffleSetCard>target from
${
from
}
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