initial warehouse-v2 concept commit

This commit is contained in:
wish
2023-10-01 03:17:51 +11:00
parent 4bf8dc32eb
commit a9f280a2ef
6 changed files with 258 additions and 151 deletions

View File

@@ -11,7 +11,7 @@ import (
// MsgMhfEnumerateWarehouse represents the MSG_MHF_ENUMERATE_WAREHOUSE
type MsgMhfEnumerateWarehouse struct {
AckHandle uint32
BoxType string
BoxType uint8
BoxIndex uint8
}
@@ -23,15 +23,9 @@ func (m *MsgMhfEnumerateWarehouse) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfEnumerateWarehouse) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
boxType := bf.ReadUint8()
switch boxType {
case 0:
m.BoxType = "item"
case 1:
m.BoxType = "equip"
}
m.BoxType = bf.ReadUint8()
m.BoxIndex = bf.ReadUint8()
_ = bf.ReadUint16()
bf.ReadBytes(2) // Zeroed
return nil
}