fix EnumerateQuest parsing and limit tuneValue slice length

This commit is contained in:
wish
2023-08-21 22:22:15 +10:00
parent 192e68ba86
commit f680e33f16
2 changed files with 26 additions and 3 deletions

View File

@@ -30,10 +30,12 @@ func (m *MsgMhfEnumerateQuest) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Cli
m.Unk0 = bf.ReadUint8()
m.World = bf.ReadUint8()
m.Counter = bf.ReadUint16()
m.Offset = bf.ReadUint16()
if _config.ErupeConfig.RealClientMode > _config.Z1 {
m.Unk4 = bf.ReadUint8()
if _config.ErupeConfig.RealClientMode <= _config.Z1 {
m.Offset = uint16(bf.ReadUint8())
} else {
m.Offset = bf.ReadUint16()
}
m.Unk4 = bf.ReadUint8()
return nil
}