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
435fedfd
Commit
435fedfd
authored
Jan 05, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update MsgSelectChainAdapter
parent
8e31a226
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectChain.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectChain.ts
+2
-1
src/api/ocgcore/ocgAdapter/util.ts
src/api/ocgcore/ocgAdapter/util.ts
+19
-0
No files found.
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectChain.ts
View file @
435fedfd
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../bufferIO
"
;
import
MsgSelectChain
=
ygopro
.
StocGameMessage
.
MsgSelectChain
;
import
{
numberToChainFlag
}
from
"
../../util
"
;
/*
* Msg Select Chain
...
...
@@ -37,7 +38,7 @@ export default (data: Uint8Array) => {
msg
.
chains
.
push
(
new
MsgSelectChain
.
Chain
({
flag
,
flag
:
numberToChainFlag
(
flag
)
,
code
,
location
,
effect_description
:
effect_desc
,
...
...
src/api/ocgcore/ocgAdapter/util.ts
View file @
435fedfd
...
...
@@ -191,3 +191,22 @@ export function numberToCardPosition(
}
}
}
export
function
numberToChainFlag
(
flag
:
number
):
ygopro
.
StocGameMessage
.
MsgSelectChain
.
ChainFlag
|
undefined
{
switch
(
flag
)
{
case
0
:
{
return
ygopro
.
StocGameMessage
.
MsgSelectChain
.
ChainFlag
.
COMMON
;
}
case
1
:
{
return
ygopro
.
StocGameMessage
.
MsgSelectChain
.
ChainFlag
.
EDESC_OPERATION
;
}
case
2
:
{
return
ygopro
.
StocGameMessage
.
MsgSelectChain
.
ChainFlag
.
EDESC_RESET
;
}
default
:
{
return
undefined
;
}
}
}
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