initial ravi-v3 commit

This commit is contained in:
wish
2023-08-27 22:16:51 +10:00
parent a0f37d98b9
commit 1685f409e7
5 changed files with 103 additions and 289 deletions

View File

@@ -11,7 +11,7 @@ import (
type MsgSysLoadRegister struct {
AckHandle uint32
RegisterID uint32
Unk1 uint8
Values uint8
}
// Opcode returns the ID associated with this packet type.
@@ -23,7 +23,7 @@ func (m *MsgSysLoadRegister) Opcode() network.PacketID {
func (m *MsgSysLoadRegister) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
m.RegisterID = bf.ReadUint32()
m.Unk1 = bf.ReadUint8()
m.Values = bf.ReadUint8()
_ = bf.ReadUint8()
_ = bf.ReadUint16()
return nil

View File

@@ -25,7 +25,8 @@ func (m *MsgSysOperateRegister) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Cl
m.SemaphoreID = bf.ReadUint32()
_ = bf.ReadUint16()
dataSize := bf.ReadUint16()
m.RawDataPayload = bf.ReadBytes(uint(dataSize))
m.RawDataPayload = bf.ReadBytes(uint(dataSize) - 1)
_ = bf.ReadBytes(1) // Null terminator
return nil
}