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
0509adc7
Commit
0509adc7
authored
Oct 07, 2022
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle CtosHsStart
parent
b5867aaa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
5 deletions
+81
-5
neos-protobuf
neos-protobuf
+1
-1
src/api/idl/ocgcore.ts
src/api/idl/ocgcore.ts
+80
-4
No files found.
neos-protobuf
@
1484721f
Subproject commit
7b87e8a035a016c44d551f85c1ce0a719b507b8f
Subproject commit
1484721f97b2353631d11f869c8371a46a7def9d
src/api/idl/ocgcore.ts
View file @
0509adc7
...
...
@@ -6,27 +6,37 @@
import
*
as
pb_1
from
"
google-protobuf
"
;
export
namespace
ygopro
{
export
class
YgoCtosMsg
extends
pb_1
.
Message
{
#
one_of_decls
:
number
[][]
=
[[
1
,
2
,
3
,
4
]];
#
one_of_decls
:
number
[][]
=
[[
1
,
2
,
3
,
4
,
5
]];
constructor
(
data
?:
any
[]
|
({}
&
(({
ctos_player_info
?:
CtosPlayerInfo
;
ctos_join_game
?:
never
;
ctos_update_deck
?:
never
;
ctos_hs_ready
?:
never
;
ctos_hs_start
?:
never
;
}
|
{
ctos_player_info
?:
never
;
ctos_join_game
?:
CtosJoinGame
;
ctos_update_deck
?:
never
;
ctos_hs_ready
?:
never
;
ctos_hs_start
?:
never
;
}
|
{
ctos_player_info
?:
never
;
ctos_join_game
?:
never
;
ctos_update_deck
?:
CtosUpdateDeck
;
ctos_hs_ready
?:
never
;
ctos_hs_start
?:
never
;
}
|
{
ctos_player_info
?:
never
;
ctos_join_game
?:
never
;
ctos_update_deck
?:
never
;
ctos_hs_ready
?:
CtosHsReady
;
ctos_hs_start
?:
never
;
}
|
{
ctos_player_info
?:
never
;
ctos_join_game
?:
never
;
ctos_update_deck
?:
never
;
ctos_hs_ready
?:
never
;
ctos_hs_start
?:
CtosHsStart
;
}))))
{
super
();
pb_1
.
Message
.
initialize
(
this
,
Array
.
isArray
(
data
)
?
data
:
[],
0
,
-
1
,
[],
this
.
#
one_of_decls
);
...
...
@@ -43,6 +53,9 @@ export namespace ygopro {
if
(
"
ctos_hs_ready
"
in
data
&&
data
.
ctos_hs_ready
!=
undefined
)
{
this
.
ctos_hs_ready
=
data
.
ctos_hs_ready
;
}
if
(
"
ctos_hs_start
"
in
data
&&
data
.
ctos_hs_start
!=
undefined
)
{
this
.
ctos_hs_start
=
data
.
ctos_hs_start
;
}
}
}
get
ctos_player_info
()
{
...
...
@@ -81,23 +94,34 @@ export namespace ygopro {
get
has_ctos_hs_ready
()
{
return
pb_1
.
Message
.
getField
(
this
,
4
)
!=
null
;
}
get
ctos_hs_start
()
{
return
pb_1
.
Message
.
getWrapperField
(
this
,
CtosHsStart
,
5
)
as
CtosHsStart
;
}
set
ctos_hs_start
(
value
:
CtosHsStart
)
{
pb_1
.
Message
.
setOneofWrapperField
(
this
,
5
,
this
.
#
one_of_decls
[
0
],
value
);
}
get
has_ctos_hs_start
()
{
return
pb_1
.
Message
.
getField
(
this
,
5
)
!=
null
;
}
get
msg
()
{
const
cases
:
{
[
index
:
number
]:
"
none
"
|
"
ctos_player_info
"
|
"
ctos_join_game
"
|
"
ctos_update_deck
"
|
"
ctos_hs_ready
"
;
[
index
:
number
]:
"
none
"
|
"
ctos_player_info
"
|
"
ctos_join_game
"
|
"
ctos_update_deck
"
|
"
ctos_hs_ready
"
|
"
ctos_hs_start
"
;
}
=
{
0
:
"
none
"
,
1
:
"
ctos_player_info
"
,
2
:
"
ctos_join_game
"
,
3
:
"
ctos_update_deck
"
,
4
:
"
ctos_hs_ready
"
4
:
"
ctos_hs_ready
"
,
5
:
"
ctos_hs_start
"
};
return
cases
[
pb_1
.
Message
.
computeOneofCase
(
this
,
[
1
,
2
,
3
,
4
])];
return
cases
[
pb_1
.
Message
.
computeOneofCase
(
this
,
[
1
,
2
,
3
,
4
,
5
])];
}
static
fromObject
(
data
:
{
ctos_player_info
?:
ReturnType
<
typeof
CtosPlayerInfo
.
prototype
.
toObject
>
;
ctos_join_game
?:
ReturnType
<
typeof
CtosJoinGame
.
prototype
.
toObject
>
;
ctos_update_deck
?:
ReturnType
<
typeof
CtosUpdateDeck
.
prototype
.
toObject
>
;
ctos_hs_ready
?:
ReturnType
<
typeof
CtosHsReady
.
prototype
.
toObject
>
;
ctos_hs_start
?:
ReturnType
<
typeof
CtosHsStart
.
prototype
.
toObject
>
;
}):
YgoCtosMsg
{
const
message
=
new
YgoCtosMsg
({});
if
(
data
.
ctos_player_info
!=
null
)
{
...
...
@@ -112,6 +136,9 @@ export namespace ygopro {
if
(
data
.
ctos_hs_ready
!=
null
)
{
message
.
ctos_hs_ready
=
CtosHsReady
.
fromObject
(
data
.
ctos_hs_ready
);
}
if
(
data
.
ctos_hs_start
!=
null
)
{
message
.
ctos_hs_start
=
CtosHsStart
.
fromObject
(
data
.
ctos_hs_start
);
}
return
message
;
}
toObject
()
{
...
...
@@ -120,6 +147,7 @@ export namespace ygopro {
ctos_join_game
?:
ReturnType
<
typeof
CtosJoinGame
.
prototype
.
toObject
>
;
ctos_update_deck
?:
ReturnType
<
typeof
CtosUpdateDeck
.
prototype
.
toObject
>
;
ctos_hs_ready
?:
ReturnType
<
typeof
CtosHsReady
.
prototype
.
toObject
>
;
ctos_hs_start
?:
ReturnType
<
typeof
CtosHsStart
.
prototype
.
toObject
>
;
}
=
{};
if
(
this
.
ctos_player_info
!=
null
)
{
data
.
ctos_player_info
=
this
.
ctos_player_info
.
toObject
();
...
...
@@ -133,6 +161,9 @@ export namespace ygopro {
if
(
this
.
ctos_hs_ready
!=
null
)
{
data
.
ctos_hs_ready
=
this
.
ctos_hs_ready
.
toObject
();
}
if
(
this
.
ctos_hs_start
!=
null
)
{
data
.
ctos_hs_start
=
this
.
ctos_hs_start
.
toObject
();
}
return
data
;
}
serialize
():
Uint8Array
;
...
...
@@ -147,6 +178,8 @@ export namespace ygopro {
writer
.
writeMessage
(
3
,
this
.
ctos_update_deck
,
()
=>
this
.
ctos_update_deck
.
serialize
(
writer
));
if
(
this
.
has_ctos_hs_ready
)
writer
.
writeMessage
(
4
,
this
.
ctos_hs_ready
,
()
=>
this
.
ctos_hs_ready
.
serialize
(
writer
));
if
(
this
.
has_ctos_hs_start
)
writer
.
writeMessage
(
5
,
this
.
ctos_hs_start
,
()
=>
this
.
ctos_hs_start
.
serialize
(
writer
));
if
(
!
w
)
return
writer
.
getResultBuffer
();
}
...
...
@@ -168,6 +201,9 @@ export namespace ygopro {
case
4
:
reader
.
readMessage
(
message
.
ctos_hs_ready
,
()
=>
message
.
ctos_hs_ready
=
CtosHsReady
.
deserialize
(
reader
));
break
;
case
5
:
reader
.
readMessage
(
message
.
ctos_hs_start
,
()
=>
message
.
ctos_hs_start
=
CtosHsStart
.
deserialize
(
reader
));
break
;
default
:
reader
.
skipField
();
}
}
...
...
@@ -762,6 +798,46 @@ export namespace ygopro {
return
CtosHsReady
.
deserialize
(
bytes
);
}
}
export
class
CtosHsStart
extends
pb_1
.
Message
{
#
one_of_decls
:
number
[][]
=
[];
constructor
(
data
?:
any
[]
|
{})
{
super
();
pb_1
.
Message
.
initialize
(
this
,
Array
.
isArray
(
data
)
?
data
:
[],
0
,
-
1
,
[],
this
.
#
one_of_decls
);
if
(
!
Array
.
isArray
(
data
)
&&
typeof
data
==
"
object
"
)
{
}
}
static
fromObject
(
data
:
{}):
CtosHsStart
{
const
message
=
new
CtosHsStart
({});
return
message
;
}
toObject
()
{
const
data
:
{}
=
{};
return
data
;
}
serialize
():
Uint8Array
;
serialize
(
w
:
pb_1
.
BinaryWriter
):
void
;
serialize
(
w
?:
pb_1
.
BinaryWriter
):
Uint8Array
|
void
{
const
writer
=
w
||
new
pb_1
.
BinaryWriter
();
if
(
!
w
)
return
writer
.
getResultBuffer
();
}
static
deserialize
(
bytes
:
Uint8Array
|
pb_1
.
BinaryReader
):
CtosHsStart
{
const
reader
=
bytes
instanceof
pb_1
.
BinaryReader
?
bytes
:
new
pb_1
.
BinaryReader
(
bytes
),
message
=
new
CtosHsStart
();
while
(
reader
.
nextField
())
{
if
(
reader
.
isEndGroup
())
break
;
switch
(
reader
.
getFieldNumber
())
{
default
:
reader
.
skipField
();
}
}
return
message
;
}
serializeBinary
():
Uint8Array
{
return
this
.
serialize
();
}
static
deserializeBinary
(
bytes
:
Uint8Array
):
CtosHsStart
{
return
CtosHsStart
.
deserialize
(
bytes
);
}
}
export
class
StocJoinGame
extends
pb_1
.
Message
{
#
one_of_decls
:
number
[][]
=
[];
constructor
(
data
?:
any
[]
|
{
...
...
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