Commit e02cfdf4 authored by Chunchi Che's avatar Chunchi Che Committed by GitHub

Merge pull request #11 from DarkNeos/dev

Dev
parents 91ceb9b1 453aa29f
......@@ -26,10 +26,11 @@ const (
CtosProtoJoinGame = 18
CtosHsReady = 34
StocJoinGame = 18
StocTypeChange = 19
StocChat = 25
StocHsPlayerEnter = 32
StocJoinGame = 18
StocTypeChange = 19
StocChat = 25
StocHsPlayerEnter = 32
StocHsPlayerChange = 33
)
type YgoPacket struct {
......@@ -134,6 +135,8 @@ func Transform(src []byte, tranformType int, ctx *util.Context) ([]byte, error)
pb = pStocHsPlayerEnter{}.Packet2Pb(packet)
case StocTypeChange:
pb = pStocTypeChage{}.Packet2Pb(packet)
case StocHsPlayerChange:
pb = pStocHsPlayerChange{}.Packet2Pb(packet)
default:
return nil, errors.New(fmt.Sprintf(COMPONENT+"Unhandled YgoStocMsg type, proto=%d", packet.Proto))
}
......@@ -320,3 +323,17 @@ func (_ pStocTypeChage) Packet2Pb(pkt YgoPacket) ygopropb.YgoStocMsg {
Msg: &msg,
}
}
type pStocHsPlayerChange struct{}
func (_ pStocHsPlayerChange) Packet2Pb(pkt YgoPacket) ygopropb.YgoStocMsg {
msg := ygopropb.YgoStocMsg_StocHsPlayerChange{
StocHsPlayerChange: &ygopropb.StocHsPlayerChange{
Status: int32(pkt.Exdata[0]),
},
}
return ygopropb.YgoStocMsg{
Msg: &msg,
}
}
This diff is collapsed.
Subproject commit 1ca09b1d90b55e2c155f83781c8b2a5d2ee30a04
Subproject commit 27613d3f1ebddafc11739501100d8f5973aa0e7b
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment