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
321c3729
Commit
321c3729
authored
Jun 19, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix flip summon
parent
d5e5008c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
src/service/duel/gameMsg.ts
src/service/duel/gameMsg.ts
+1
-1
src/service/duel/updateData.ts
src/service/duel/updateData.ts
+10
-4
No files found.
src/service/duel/gameMsg.ts
View file @
321c3729
...
...
@@ -185,7 +185,7 @@ async function _handleGameMsg(pb: ygopro.YgoStocMsg) {
break
;
}
case
"
update_data
"
:
{
onMsgUpdateData
(
msg
.
update_data
);
await
onMsgUpdateData
(
msg
.
update_data
);
break
;
}
...
...
src/service/duel/updateData.ts
View file @
321c3729
import
{
ygopro
}
from
"
@/api
"
;
import
MsgUpdateData
=
ygopro
.
StocGameMessage
.
MsgUpdateData
;
import
{
eventbus
,
Task
}
from
"
@/infra
"
;
import
{
cardStore
}
from
"
@/stores
"
;
export
default
(
updateData
:
MsgUpdateData
)
=>
{
export
default
async
(
updateData
:
MsgUpdateData
)
=>
{
const
{
player
:
controller
,
zone
,
actions
}
=
updateData
;
if
(
controller
!==
undefined
&&
zone
!==
undefined
&&
actions
!==
undefined
)
{
const
field
=
cardStore
.
at
(
zone
,
controller
);
actions
.
forEach
((
action
)
=>
{
for
(
const
action
of
actions
)
{
const
sequence
=
action
.
location
?.
sequence
;
if
(
typeof
sequence
!==
"
undefined
"
)
{
const
target
=
field
...
...
@@ -21,7 +22,12 @@ export default (updateData: MsgUpdateData) => {
meta
.
text
.
id
=
action
.
code
;
}
if
(
action
.
location
!==
undefined
)
{
target
.
location
.
position
=
action
.
location
.
position
;
if
(
target
.
location
.
position
!=
action
.
location
.
position
)
{
// Currently only update position
target
.
location
.
position
=
action
.
location
.
position
;
// animation
await
eventbus
.
call
(
Task
.
Move
,
target
.
uuid
);
}
}
if
(
action
?.
type_
>=
0
)
{
meta
.
data
.
type
=
action
.
type_
;
...
...
@@ -49,6 +55,6 @@ export default (updateData: MsgUpdateData) => {
console
.
info
(
field
);
}
}
}
);
}
}
};
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