Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-proxy
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
MyCard
ygopro-proxy
Commits
3a928f85
Commit
3a928f85
authored
Oct 05, 2022
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle StocHsWatchChange
parent
c43fb60e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
DarkNeos/transform.go
DarkNeos/transform.go
+19
-0
No files found.
DarkNeos/transform.go
View file @
3a928f85
...
...
@@ -31,6 +31,7 @@ const (
StocChat
=
25
StocHsPlayerEnter
=
32
StocHsPlayerChange
=
33
StocHsWatchChange
=
34
)
type
YgoPacket
struct
{
...
...
@@ -137,6 +138,8 @@ func Transform(src []byte, tranformType int, ctx *util.Context) ([]byte, error)
pb
=
pStocTypeChage
{}
.
Packet2Pb
(
packet
)
case
StocHsPlayerChange
:
pb
=
pStocHsPlayerChange
{}
.
Packet2Pb
(
packet
)
case
StocHsWatchChange
:
pb
=
pStocHsWatchChange
{}
.
Packet2Pb
(
packet
)
default
:
return
nil
,
errors
.
New
(
fmt
.
Sprintf
(
COMPONENT
+
"Unhandled YgoStocMsg type, proto=%d"
,
packet
.
Proto
))
}
...
...
@@ -359,3 +362,19 @@ func (_ pStocHsPlayerChange) Packet2Pb(pkt YgoPacket) ygopropb.YgoStocMsg {
Msg
:
&
msg
,
}
}
type
pStocHsWatchChange
struct
{}
func
(
_
pStocHsWatchChange
)
Packet2Pb
(
pkt
YgoPacket
)
ygopropb
.
YgoStocMsg
{
count
:=
binary
.
LittleEndian
.
Uint16
(
pkt
.
Exdata
)
msg
:=
ygopropb
.
YgoStocMsg_StocHsWatchChange
{
StocHsWatchChange
:
&
ygopropb
.
StocHsWatchChange
{
Count
:
int32
(
count
),
},
}
return
ygopropb
.
YgoStocMsg
{
Msg
:
&
msg
,
}
}
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