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
baichixing
Neos
Commits
86ec6b1c
Commit
86ec6b1c
authored
Mar 19, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix update data
parent
ca8a2c9a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
25 deletions
+27
-25
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/updateData.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/updateData.ts
+19
-18
src/reducers/duel/generic.ts
src/reducers/duel/generic.ts
+8
-7
No files found.
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/updateData.ts
View file @
86ec6b1c
...
...
@@ -71,29 +71,30 @@ function _readUpdateAction(
const
flag
=
reader
.
inner
.
readInt32
();
if
(
flag
==
0
)
return
undefined
;
let
code
;
const
mask
=
-
1
;
let
code
=
mask
;
let
location
;
let
alias
;
let
type_
;
let
level
;
let
rank
;
let
attribute
;
let
race
;
let
attack
;
let
defense
;
let
base_attack
;
let
base_defense
;
let
reason
;
let
reason_card
;
let
alias
=
mask
;
let
type_
=
mask
;
let
level
=
mask
;
let
rank
=
mask
;
let
attribute
=
mask
;
let
race
=
mask
;
let
attack
=
mask
;
let
defense
=
mask
;
let
base_attack
=
mask
;
let
base_defense
=
mask
;
let
reason
=
mask
;
let
reason_card
=
mask
;
let
equip_card
;
let
target_cards
=
[];
let
overlay_cards
=
[];
let
counters
=
new
Map
<
number
,
number
>
();
let
owner
;
let
status
;
let
lscale
;
let
rscale
;
let
link
;
let
owner
=
mask
;
let
status
=
mask
;
let
lscale
=
mask
;
let
rscale
=
mask
;
let
link
=
mask
;
if
(
flag
&
QUERY_CODE
)
{
code
=
reader
.
inner
.
readInt32
();
...
...
src/reducers/duel/generic.ts
View file @
86ec6b1c
...
...
@@ -294,33 +294,34 @@ export function updateCardData<T extends DuelFieldState>(
for
(
const
payload
of
actions
)
{
const
sequence
=
payload
.
location
?.
sequence
;
if
(
typeof
sequence
!==
"
undefined
"
)
{
console
.
log
(
payload
.
type_
);
const
target
=
state
?.
inner
.
find
((
_
,
idx
)
=>
idx
==
sequence
);
if
(
target
&&
target
.
occupant
)
{
const
occupant
=
target
.
occupant
;
// 目前只更新以下字段
if
(
payload
.
code
!==
undefined
)
{
if
(
payload
.
code
!==
undefined
&&
payload
.
code
>=
0
)
{
occupant
.
id
=
payload
.
code
;
occupant
.
text
.
id
=
payload
.
code
;
}
if
(
payload
.
location
!==
undefined
)
{
target
.
location
.
position
=
payload
.
location
.
position
;
}
if
(
payload
.
type_
!==
undefined
)
{
if
(
payload
.
type_
!==
undefined
&&
payload
.
type_
>=
0
)
{
occupant
.
data
.
type
=
payload
.
type_
;
}
if
(
payload
.
level
!==
undefined
)
{
if
(
payload
.
level
!==
undefined
&&
payload
.
level
>=
0
)
{
occupant
.
data
.
level
=
payload
.
level
;
}
if
(
payload
.
attribute
!==
undefined
)
{
if
(
payload
.
attribute
!==
undefined
&&
payload
.
attribute
>=
0
)
{
occupant
.
data
.
attribute
=
payload
.
attribute
;
}
if
(
payload
.
race
!==
undefined
)
{
if
(
payload
.
race
!==
undefined
&&
payload
.
race
>=
0
)
{
occupant
.
data
.
race
=
payload
.
race
;
}
if
(
payload
.
attack
!==
undefined
)
{
if
(
payload
.
attack
!==
undefined
&&
payload
.
attack
>=
0
)
{
occupant
.
data
.
atk
=
payload
.
attack
;
}
if
(
payload
.
defense
!==
undefined
)
{
if
(
payload
.
defense
!==
undefined
&&
payload
.
defense
>=
0
)
{
occupant
.
data
.
def
=
payload
.
defense
;
}
}
...
...
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