This commit is contained in:
azw 2023-08-16 22:12:31 +08:00
parent 6eeedf4061
commit cb8a84e989

View File

@ -209,8 +209,8 @@ func ParsePb(msgId uint16, data []byte) interface{} {
type MsgHandler interface {`;
this.ssProtoPb.nested.ss.nestedArray.forEach(
(item) => {
if (item.name[0] == 'C' &&
item.name[1] == 'M') {
if (item.name[0] == 'S' &&
item.name[1] == 'S') {
data += `
${item.name}(*f5.MsgHdr, *${item.name})`;
}
@ -234,7 +234,7 @@ func (this *MsgHandlerImpl) ${item.name}(hdr *f5.MsgHdr, msg *${item.name}) {
item.name[1] == 'S') {
data += `
func (this *${item.name}) GetNetMsgId() uint16 {
return uint16(CMMessageIdE__${item.name})
return uint16(SSMessageIdE__${item.name})
}
`;
} else if (item.name[0] == 'S' &&
@ -255,7 +255,7 @@ func init() {
item.name[1] == 'S') {
data += `
handlers[int(SSMessageIdE__${item.name})] = &SsNetMsgHandler{
MsgId: int(CMMessageIdE__${item.name}),
MsgId: int(SSMessageIdE__${item.name}),
ParseCb: func (data []byte) interface{} {
msg := &${item.name}{}
proto.Unmarshal(data, msg)