mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-14 07:55:33 +01:00
fix Warehouse packet parsing
This commit is contained in:
@@ -25,7 +25,8 @@ func (m *MsgMhfEnumerateWarehouse) Parse(bf *byteframe.ByteFrame, ctx *clientctx
|
|||||||
m.AckHandle = bf.ReadUint32()
|
m.AckHandle = bf.ReadUint32()
|
||||||
m.BoxType = bf.ReadUint8()
|
m.BoxType = bf.ReadUint8()
|
||||||
m.BoxIndex = bf.ReadUint8()
|
m.BoxIndex = bf.ReadUint8()
|
||||||
bf.ReadBytes(2) // Zeroed
|
bf.ReadUint8() // Zeroed
|
||||||
|
bf.ReadUint8() // Zeroed
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,9 +29,11 @@ func (m *MsgMhfOperateWarehouse) Parse(bf *byteframe.ByteFrame, ctx *clientctx.C
|
|||||||
m.Operation = bf.ReadUint8()
|
m.Operation = bf.ReadUint8()
|
||||||
m.BoxType = bf.ReadUint8()
|
m.BoxType = bf.ReadUint8()
|
||||||
m.BoxIndex = bf.ReadUint8()
|
m.BoxIndex = bf.ReadUint8()
|
||||||
_ = bf.ReadUint8() // lenName
|
lenName := bf.ReadUint8()
|
||||||
bf.ReadUint16() // Zeroed
|
bf.ReadUint16() // Zeroed
|
||||||
m.Name = stringsupport.SJISToUTF8(bf.ReadNullTerminatedBytes())
|
if lenName > 0 {
|
||||||
|
m.Name = stringsupport.SJISToUTF8(bf.ReadNullTerminatedBytes())
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user