partially decode TerminalLog

This commit is contained in:
wish
2022-10-06 02:23:01 +11:00
parent d9541a6d1a
commit 4f2a94cc50
2 changed files with 21 additions and 17 deletions

View File

@@ -118,9 +118,14 @@ func handleMsgSysAck(s *Session, p mhfpacket.MHFPacket) {}
func handleMsgSysTerminalLog(s *Session, p mhfpacket.MHFPacket) {
pkt := p.(*mhfpacket.MsgSysTerminalLog)
for i := range pkt.Entries {
s.server.logger.Info("SysTerminalLog",
zap.Uint8("Type1", pkt.Entries[i].Type1),
zap.Uint8("Type2", pkt.Entries[i].Type2),
zap.Int16s("Data", pkt.Entries[i].Data))
}
resp := byteframe.NewByteFrame()
resp.WriteUint32(0x98bd51a9) // LogID to use for requests after this.
resp.WriteUint32(pkt.LogID + 1) // LogID to use for requests after this.
doAckSimpleSucceed(s, pkt.AckHandle, resp.Data())
}