mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-23 20:35:04 +01:00
major rewrite
This commit is contained in:
@@ -10,10 +10,8 @@ import (
|
||||
|
||||
// MsgMhfAcquireItem represents the MSG_MHF_ACQUIRE_ITEM
|
||||
type MsgMhfAcquireItem struct {
|
||||
AckHandle uint32
|
||||
NullPadding uint16 //0 in Z2
|
||||
Length uint16
|
||||
Unk1 []uint32
|
||||
AckHandle uint32
|
||||
RewardIDs []uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -24,10 +22,10 @@ func (m *MsgMhfAcquireItem) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfAcquireItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.NullPadding = bf.ReadUint16()
|
||||
m.Length = bf.ReadUint16()
|
||||
for i := 0; i < int(m.Length); i++ {
|
||||
m.Unk1 = append(m.Unk1, bf.ReadUint32())
|
||||
bf.ReadUint16() // Zeroed
|
||||
ids := bf.ReadUint16()
|
||||
for i := uint16(0); i < ids; i++ {
|
||||
m.RewardIDs = append(m.RewardIDs, bf.ReadUint32())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user