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
236be9ff
Commit
236be9ff
authored
Jan 02, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync neos-protobuf
parent
ae0cafb9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
382 additions
and
4 deletions
+382
-4
neos-protobuf
neos-protobuf
+1
-1
src/api/ocgcore/idl/ocgcore.ts
src/api/ocgcore/idl/ocgcore.ts
+381
-3
No files found.
neos-protobuf
@
edc9a649
Subproject commit
621489ace4b9d2ecb653fe0da25279b68154d206
Subproject commit
edc9a6499522f229017e28d97d7a8d07cffdbb1e
src/api/ocgcore/idl/ocgcore.ts
View file @
236be9ff
...
@@ -4163,7 +4163,7 @@ export namespace ygopro {
...
@@ -4163,7 +4163,7 @@ export namespace ygopro {
}
}
}
}
export
class
StocGameMessage
extends
pb_1
.
Message
{
export
class
StocGameMessage
extends
pb_1
.
Message
{
#
one_of_decls
:
number
[][]
=
[[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
]];
#
one_of_decls
:
number
[][]
=
[[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
]];
constructor
(
constructor
(
data
?:
data
?:
|
any
[]
|
any
[]
...
@@ -4177,6 +4177,7 @@ export namespace ygopro {
...
@@ -4177,6 +4177,7 @@ export namespace ygopro {
select_idle_cmd
?:
never
;
select_idle_cmd
?:
never
;
select_place
?:
never
;
select_place
?:
never
;
move
?:
never
;
move
?:
never
;
select_card
?:
never
;
}
}
|
{
|
{
start
?:
never
;
start
?:
never
;
...
@@ -4187,6 +4188,7 @@ export namespace ygopro {
...
@@ -4187,6 +4188,7 @@ export namespace ygopro {
select_idle_cmd
?:
never
;
select_idle_cmd
?:
never
;
select_place
?:
never
;
select_place
?:
never
;
move
?:
never
;
move
?:
never
;
select_card
?:
never
;
}
}
|
{
|
{
start
?:
never
;
start
?:
never
;
...
@@ -4197,6 +4199,7 @@ export namespace ygopro {
...
@@ -4197,6 +4199,7 @@ export namespace ygopro {
select_idle_cmd
?:
never
;
select_idle_cmd
?:
never
;
select_place
?:
never
;
select_place
?:
never
;
move
?:
never
;
move
?:
never
;
select_card
?:
never
;
}
}
|
{
|
{
start
?:
never
;
start
?:
never
;
...
@@ -4207,6 +4210,7 @@ export namespace ygopro {
...
@@ -4207,6 +4210,7 @@ export namespace ygopro {
select_idle_cmd
?:
never
;
select_idle_cmd
?:
never
;
select_place
?:
never
;
select_place
?:
never
;
move
?:
never
;
move
?:
never
;
select_card
?:
never
;
}
}
|
{
|
{
start
?:
never
;
start
?:
never
;
...
@@ -4217,6 +4221,7 @@ export namespace ygopro {
...
@@ -4217,6 +4221,7 @@ export namespace ygopro {
select_idle_cmd
?:
never
;
select_idle_cmd
?:
never
;
select_place
?:
never
;
select_place
?:
never
;
move
?:
never
;
move
?:
never
;
select_card
?:
never
;
}
}
|
{
|
{
start
?:
never
;
start
?:
never
;
...
@@ -4227,6 +4232,7 @@ export namespace ygopro {
...
@@ -4227,6 +4232,7 @@ export namespace ygopro {
select_idle_cmd
?:
StocGameMessage
.
MsgSelectIdleCmd
;
select_idle_cmd
?:
StocGameMessage
.
MsgSelectIdleCmd
;
select_place
?:
never
;
select_place
?:
never
;
move
?:
never
;
move
?:
never
;
select_card
?:
never
;
}
}
|
{
|
{
start
?:
never
;
start
?:
never
;
...
@@ -4237,6 +4243,7 @@ export namespace ygopro {
...
@@ -4237,6 +4243,7 @@ export namespace ygopro {
select_idle_cmd
?:
never
;
select_idle_cmd
?:
never
;
select_place
?:
StocGameMessage
.
MsgSelectPlace
;
select_place
?:
StocGameMessage
.
MsgSelectPlace
;
move
?:
never
;
move
?:
never
;
select_card
?:
never
;
}
}
|
{
|
{
start
?:
never
;
start
?:
never
;
...
@@ -4247,6 +4254,18 @@ export namespace ygopro {
...
@@ -4247,6 +4254,18 @@ export namespace ygopro {
select_idle_cmd
?:
never
;
select_idle_cmd
?:
never
;
select_place
?:
never
;
select_place
?:
never
;
move
?:
StocGameMessage
.
MsgMove
;
move
?:
StocGameMessage
.
MsgMove
;
select_card
?:
never
;
}
|
{
start
?:
never
;
draw
?:
never
;
new_turn
?:
never
;
new_phase
?:
never
;
hint
?:
never
;
select_idle_cmd
?:
never
;
select_place
?:
never
;
move
?:
never
;
select_card
?:
StocGameMessage
.
MsgSelectCard
;
}
}
))
))
)
{
)
{
...
@@ -4284,6 +4303,9 @@ export namespace ygopro {
...
@@ -4284,6 +4303,9 @@ export namespace ygopro {
if
(
"
move
"
in
data
&&
data
.
move
!=
undefined
)
{
if
(
"
move
"
in
data
&&
data
.
move
!=
undefined
)
{
this
.
move
=
data
.
move
;
this
.
move
=
data
.
move
;
}
}
if
(
"
select_card
"
in
data
&&
data
.
select_card
!=
undefined
)
{
this
.
select_card
=
data
.
select_card
;
}
}
}
}
}
get
start
()
{
get
start
()
{
...
@@ -4390,6 +4412,19 @@ export namespace ygopro {
...
@@ -4390,6 +4412,19 @@ export namespace ygopro {
get
has_move
()
{
get
has_move
()
{
return
pb_1
.
Message
.
getField
(
this
,
8
)
!=
null
;
return
pb_1
.
Message
.
getField
(
this
,
8
)
!=
null
;
}
}
get
select_card
()
{
return
pb_1
.
Message
.
getWrapperField
(
this
,
StocGameMessage
.
MsgSelectCard
,
9
)
as
StocGameMessage
.
MsgSelectCard
;
}
set
select_card
(
value
:
StocGameMessage
.
MsgSelectCard
)
{
pb_1
.
Message
.
setOneofWrapperField
(
this
,
9
,
this
.
#
one_of_decls
[
0
],
value
);
}
get
has_select_card
()
{
return
pb_1
.
Message
.
getField
(
this
,
9
)
!=
null
;
}
get
gameMsg
()
{
get
gameMsg
()
{
const
cases
:
{
const
cases
:
{
[
index
:
number
]:
[
index
:
number
]:
...
@@ -4401,7 +4436,8 @@ export namespace ygopro {
...
@@ -4401,7 +4436,8 @@ export namespace ygopro {
|
"
hint
"
|
"
hint
"
|
"
select_idle_cmd
"
|
"
select_idle_cmd
"
|
"
select_place
"
|
"
select_place
"
|
"
move
"
;
|
"
move
"
|
"
select_card
"
;
}
=
{
}
=
{
0
:
"
none
"
,
0
:
"
none
"
,
1
:
"
start
"
,
1
:
"
start
"
,
...
@@ -4412,9 +4448,10 @@ export namespace ygopro {
...
@@ -4412,9 +4448,10 @@ export namespace ygopro {
6
:
"
select_idle_cmd
"
,
6
:
"
select_idle_cmd
"
,
7
:
"
select_place
"
,
7
:
"
select_place
"
,
8
:
"
move
"
,
8
:
"
move
"
,
9
:
"
select_card
"
,
};
};
return
cases
[
return
cases
[
pb_1
.
Message
.
computeOneofCase
(
this
,
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
])
pb_1
.
Message
.
computeOneofCase
(
this
,
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
])
];
];
}
}
static
fromObject
(
data
:
{
static
fromObject
(
data
:
{
...
@@ -4434,6 +4471,9 @@ export namespace ygopro {
...
@@ -4434,6 +4471,9 @@ export namespace ygopro {
typeof
StocGameMessage
.
MsgSelectPlace
.
prototype
.
toObject
typeof
StocGameMessage
.
MsgSelectPlace
.
prototype
.
toObject
>
;
>
;
move
?:
ReturnType
<
typeof
StocGameMessage
.
MsgMove
.
prototype
.
toObject
>
;
move
?:
ReturnType
<
typeof
StocGameMessage
.
MsgMove
.
prototype
.
toObject
>
;
select_card
?:
ReturnType
<
typeof
StocGameMessage
.
MsgSelectCard
.
prototype
.
toObject
>
;
}):
StocGameMessage
{
}):
StocGameMessage
{
const
message
=
new
StocGameMessage
({});
const
message
=
new
StocGameMessage
({});
if
(
data
.
start
!=
null
)
{
if
(
data
.
start
!=
null
)
{
...
@@ -4466,6 +4506,11 @@ export namespace ygopro {
...
@@ -4466,6 +4506,11 @@ export namespace ygopro {
if
(
data
.
move
!=
null
)
{
if
(
data
.
move
!=
null
)
{
message
.
move
=
StocGameMessage
.
MsgMove
.
fromObject
(
data
.
move
);
message
.
move
=
StocGameMessage
.
MsgMove
.
fromObject
(
data
.
move
);
}
}
if
(
data
.
select_card
!=
null
)
{
message
.
select_card
=
StocGameMessage
.
MsgSelectCard
.
fromObject
(
data
.
select_card
);
}
return
message
;
return
message
;
}
}
toObject
()
{
toObject
()
{
...
@@ -4486,6 +4531,9 @@ export namespace ygopro {
...
@@ -4486,6 +4531,9 @@ export namespace ygopro {
typeof
StocGameMessage
.
MsgSelectPlace
.
prototype
.
toObject
typeof
StocGameMessage
.
MsgSelectPlace
.
prototype
.
toObject
>
;
>
;
move
?:
ReturnType
<
typeof
StocGameMessage
.
MsgMove
.
prototype
.
toObject
>
;
move
?:
ReturnType
<
typeof
StocGameMessage
.
MsgMove
.
prototype
.
toObject
>
;
select_card
?:
ReturnType
<
typeof
StocGameMessage
.
MsgSelectCard
.
prototype
.
toObject
>
;
}
=
{};
}
=
{};
if
(
this
.
start
!=
null
)
{
if
(
this
.
start
!=
null
)
{
data
.
start
=
this
.
start
.
toObject
();
data
.
start
=
this
.
start
.
toObject
();
...
@@ -4511,6 +4559,9 @@ export namespace ygopro {
...
@@ -4511,6 +4559,9 @@ export namespace ygopro {
if
(
this
.
move
!=
null
)
{
if
(
this
.
move
!=
null
)
{
data
.
move
=
this
.
move
.
toObject
();
data
.
move
=
this
.
move
.
toObject
();
}
}
if
(
this
.
select_card
!=
null
)
{
data
.
select_card
=
this
.
select_card
.
toObject
();
}
return
data
;
return
data
;
}
}
serialize
():
Uint8Array
;
serialize
():
Uint8Array
;
...
@@ -4541,6 +4592,10 @@ export namespace ygopro {
...
@@ -4541,6 +4592,10 @@ export namespace ygopro {
);
);
if
(
this
.
has_move
)
if
(
this
.
has_move
)
writer
.
writeMessage
(
8
,
this
.
move
,
()
=>
this
.
move
.
serialize
(
writer
));
writer
.
writeMessage
(
8
,
this
.
move
,
()
=>
this
.
move
.
serialize
(
writer
));
if
(
this
.
has_select_card
)
writer
.
writeMessage
(
9
,
this
.
select_card
,
()
=>
this
.
select_card
.
serialize
(
writer
)
);
if
(
!
w
)
return
writer
.
getResultBuffer
();
if
(
!
w
)
return
writer
.
getResultBuffer
();
}
}
static
deserialize
(
bytes
:
Uint8Array
|
pb_1
.
BinaryReader
):
StocGameMessage
{
static
deserialize
(
bytes
:
Uint8Array
|
pb_1
.
BinaryReader
):
StocGameMessage
{
...
@@ -4609,6 +4664,14 @@ export namespace ygopro {
...
@@ -4609,6 +4664,14 @@ export namespace ygopro {
()
=>
(
message
.
move
=
StocGameMessage
.
MsgMove
.
deserialize
(
reader
))
()
=>
(
message
.
move
=
StocGameMessage
.
MsgMove
.
deserialize
(
reader
))
);
);
break
;
break
;
case
9
:
reader
.
readMessage
(
message
.
select_card
,
()
=>
(
message
.
select_card
=
StocGameMessage
.
MsgSelectCard
.
deserialize
(
reader
))
);
break
;
default
:
default
:
reader
.
skipField
();
reader
.
skipField
();
}
}
...
@@ -6240,5 +6303,320 @@ export namespace ygopro {
...
@@ -6240,5 +6303,320 @@ export namespace ygopro {
return
MsgMove
.
deserialize
(
bytes
);
return
MsgMove
.
deserialize
(
bytes
);
}
}
}
}
export
class
MsgSelectCard
extends
pb_1
.
Message
{
#
one_of_decls
:
number
[][]
=
[];
constructor
(
data
?:
|
any
[]
|
{
player
?:
number
;
cancelable
?:
boolean
;
min
?:
number
;
max
?:
number
;
cards
?:
StocGameMessage
.
MsgSelectCard
.
SelectAbleCard
[];
}
)
{
super
();
pb_1
.
Message
.
initialize
(
this
,
Array
.
isArray
(
data
)
?
data
:
[],
0
,
-
1
,
[
5
],
this
.
#
one_of_decls
);
if
(
!
Array
.
isArray
(
data
)
&&
typeof
data
==
"
object
"
)
{
if
(
"
player
"
in
data
&&
data
.
player
!=
undefined
)
{
this
.
player
=
data
.
player
;
}
if
(
"
cancelable
"
in
data
&&
data
.
cancelable
!=
undefined
)
{
this
.
cancelable
=
data
.
cancelable
;
}
if
(
"
min
"
in
data
&&
data
.
min
!=
undefined
)
{
this
.
min
=
data
.
min
;
}
if
(
"
max
"
in
data
&&
data
.
max
!=
undefined
)
{
this
.
max
=
data
.
max
;
}
if
(
"
cards
"
in
data
&&
data
.
cards
!=
undefined
)
{
this
.
cards
=
data
.
cards
;
}
}
}
get
player
()
{
return
pb_1
.
Message
.
getFieldWithDefault
(
this
,
1
,
0
)
as
number
;
}
set
player
(
value
:
number
)
{
pb_1
.
Message
.
setField
(
this
,
1
,
value
);
}
get
cancelable
()
{
return
pb_1
.
Message
.
getFieldWithDefault
(
this
,
2
,
false
)
as
boolean
;
}
set
cancelable
(
value
:
boolean
)
{
pb_1
.
Message
.
setField
(
this
,
2
,
value
);
}
get
min
()
{
return
pb_1
.
Message
.
getFieldWithDefault
(
this
,
3
,
0
)
as
number
;
}
set
min
(
value
:
number
)
{
pb_1
.
Message
.
setField
(
this
,
3
,
value
);
}
get
max
()
{
return
pb_1
.
Message
.
getFieldWithDefault
(
this
,
4
,
0
)
as
number
;
}
set
max
(
value
:
number
)
{
pb_1
.
Message
.
setField
(
this
,
4
,
value
);
}
get
cards
()
{
return
pb_1
.
Message
.
getRepeatedWrapperField
(
this
,
StocGameMessage
.
MsgSelectCard
.
SelectAbleCard
,
5
)
as
StocGameMessage
.
MsgSelectCard
.
SelectAbleCard
[];
}
set
cards
(
value
:
StocGameMessage
.
MsgSelectCard
.
SelectAbleCard
[])
{
pb_1
.
Message
.
setRepeatedWrapperField
(
this
,
5
,
value
);
}
static
fromObject
(
data
:
{
player
?:
number
;
cancelable
?:
boolean
;
min
?:
number
;
max
?:
number
;
cards
?:
ReturnType
<
typeof
StocGameMessage
.
MsgSelectCard
.
SelectAbleCard
.
prototype
.
toObject
>
[];
}):
MsgSelectCard
{
const
message
=
new
MsgSelectCard
({});
if
(
data
.
player
!=
null
)
{
message
.
player
=
data
.
player
;
}
if
(
data
.
cancelable
!=
null
)
{
message
.
cancelable
=
data
.
cancelable
;
}
if
(
data
.
min
!=
null
)
{
message
.
min
=
data
.
min
;
}
if
(
data
.
max
!=
null
)
{
message
.
max
=
data
.
max
;
}
if
(
data
.
cards
!=
null
)
{
message
.
cards
=
data
.
cards
.
map
((
item
)
=>
StocGameMessage
.
MsgSelectCard
.
SelectAbleCard
.
fromObject
(
item
)
);
}
return
message
;
}
toObject
()
{
const
data
:
{
player
?:
number
;
cancelable
?:
boolean
;
min
?:
number
;
max
?:
number
;
cards
?:
ReturnType
<
typeof
StocGameMessage
.
MsgSelectCard
.
SelectAbleCard
.
prototype
.
toObject
>
[];
}
=
{};
if
(
this
.
player
!=
null
)
{
data
.
player
=
this
.
player
;
}
if
(
this
.
cancelable
!=
null
)
{
data
.
cancelable
=
this
.
cancelable
;
}
if
(
this
.
min
!=
null
)
{
data
.
min
=
this
.
min
;
}
if
(
this
.
max
!=
null
)
{
data
.
max
=
this
.
max
;
}
if
(
this
.
cards
!=
null
)
{
data
.
cards
=
this
.
cards
.
map
(
(
item
:
StocGameMessage
.
MsgSelectCard
.
SelectAbleCard
)
=>
item
.
toObject
()
);
}
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
(
this
.
player
!=
0
)
writer
.
writeInt32
(
1
,
this
.
player
);
if
(
this
.
cancelable
!=
false
)
writer
.
writeBool
(
2
,
this
.
cancelable
);
if
(
this
.
min
!=
0
)
writer
.
writeInt32
(
3
,
this
.
min
);
if
(
this
.
max
!=
0
)
writer
.
writeInt32
(
4
,
this
.
max
);
if
(
this
.
cards
.
length
)
writer
.
writeRepeatedMessage
(
5
,
this
.
cards
,
(
item
:
StocGameMessage
.
MsgSelectCard
.
SelectAbleCard
)
=>
item
.
serialize
(
writer
)
);
if
(
!
w
)
return
writer
.
getResultBuffer
();
}
static
deserialize
(
bytes
:
Uint8Array
|
pb_1
.
BinaryReader
):
MsgSelectCard
{
const
reader
=
bytes
instanceof
pb_1
.
BinaryReader
?
bytes
:
new
pb_1
.
BinaryReader
(
bytes
),
message
=
new
MsgSelectCard
();
while
(
reader
.
nextField
())
{
if
(
reader
.
isEndGroup
())
break
;
switch
(
reader
.
getFieldNumber
())
{
case
1
:
message
.
player
=
reader
.
readInt32
();
break
;
case
2
:
message
.
cancelable
=
reader
.
readBool
();
break
;
case
3
:
message
.
min
=
reader
.
readInt32
();
break
;
case
4
:
message
.
max
=
reader
.
readInt32
();
break
;
case
5
:
reader
.
readMessage
(
message
.
cards
,
()
=>
pb_1
.
Message
.
addToRepeatedWrapperField
(
message
,
5
,
StocGameMessage
.
MsgSelectCard
.
SelectAbleCard
.
deserialize
(
reader
),
StocGameMessage
.
MsgSelectCard
.
SelectAbleCard
)
);
break
;
default
:
reader
.
skipField
();
}
}
return
message
;
}
serializeBinary
():
Uint8Array
{
return
this
.
serialize
();
}
static
deserializeBinary
(
bytes
:
Uint8Array
):
MsgSelectCard
{
return
MsgSelectCard
.
deserialize
(
bytes
);
}
}
export
namespace
MsgSelectCard
{
export
class
SelectAbleCard
extends
pb_1
.
Message
{
#
one_of_decls
:
number
[][]
=
[];
constructor
(
data
?:
|
any
[]
|
{
code
?:
number
;
location
?:
CardLocation
;
}
)
{
super
();
pb_1
.
Message
.
initialize
(
this
,
Array
.
isArray
(
data
)
?
data
:
[],
0
,
-
1
,
[],
this
.
#
one_of_decls
);
if
(
!
Array
.
isArray
(
data
)
&&
typeof
data
==
"
object
"
)
{
if
(
"
code
"
in
data
&&
data
.
code
!=
undefined
)
{
this
.
code
=
data
.
code
;
}
if
(
"
location
"
in
data
&&
data
.
location
!=
undefined
)
{
this
.
location
=
data
.
location
;
}
}
}
get
code
()
{
return
pb_1
.
Message
.
getFieldWithDefault
(
this
,
1
,
0
)
as
number
;
}
set
code
(
value
:
number
)
{
pb_1
.
Message
.
setField
(
this
,
1
,
value
);
}
get
location
()
{
return
pb_1
.
Message
.
getWrapperField
(
this
,
CardLocation
,
2
)
as
CardLocation
;
}
set
location
(
value
:
CardLocation
)
{
pb_1
.
Message
.
setWrapperField
(
this
,
2
,
value
);
}
get
has_location
()
{
return
pb_1
.
Message
.
getField
(
this
,
2
)
!=
null
;
}
static
fromObject
(
data
:
{
code
?:
number
;
location
?:
ReturnType
<
typeof
CardLocation
.
prototype
.
toObject
>
;
}):
SelectAbleCard
{
const
message
=
new
SelectAbleCard
({});
if
(
data
.
code
!=
null
)
{
message
.
code
=
data
.
code
;
}
if
(
data
.
location
!=
null
)
{
message
.
location
=
CardLocation
.
fromObject
(
data
.
location
);
}
return
message
;
}
toObject
()
{
const
data
:
{
code
?:
number
;
location
?:
ReturnType
<
typeof
CardLocation
.
prototype
.
toObject
>
;
}
=
{};
if
(
this
.
code
!=
null
)
{
data
.
code
=
this
.
code
;
}
if
(
this
.
location
!=
null
)
{
data
.
location
=
this
.
location
.
toObject
();
}
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
(
this
.
code
!=
0
)
writer
.
writeInt32
(
1
,
this
.
code
);
if
(
this
.
has_location
)
writer
.
writeMessage
(
2
,
this
.
location
,
()
=>
this
.
location
.
serialize
(
writer
)
);
if
(
!
w
)
return
writer
.
getResultBuffer
();
}
static
deserialize
(
bytes
:
Uint8Array
|
pb_1
.
BinaryReader
):
SelectAbleCard
{
const
reader
=
bytes
instanceof
pb_1
.
BinaryReader
?
bytes
:
new
pb_1
.
BinaryReader
(
bytes
),
message
=
new
SelectAbleCard
();
while
(
reader
.
nextField
())
{
if
(
reader
.
isEndGroup
())
break
;
switch
(
reader
.
getFieldNumber
())
{
case
1
:
message
.
code
=
reader
.
readInt32
();
break
;
case
2
:
reader
.
readMessage
(
message
.
location
,
()
=>
(
message
.
location
=
CardLocation
.
deserialize
(
reader
))
);
break
;
default
:
reader
.
skipField
();
}
}
return
message
;
}
serializeBinary
():
Uint8Array
{
return
this
.
serialize
();
}
static
deserializeBinary
(
bytes
:
Uint8Array
):
SelectAbleCard
{
return
SelectAbleCard
.
deserialize
(
bytes
);
}
}
}
}
}
}
}
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