mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-14 07:55:33 +01:00
fix merc saving/loading
This commit is contained in:
@@ -1,18 +1,20 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfSaveMercenary represents the MSG_MHF_SAVE_MERCENARY
|
||||
type MsgMhfSaveMercenary struct{
|
||||
AckHandle uint32
|
||||
DataSize uint32
|
||||
RawDataPayload []byte
|
||||
type MsgMhfSaveMercenary struct {
|
||||
AckHandle uint32
|
||||
GCP uint32
|
||||
Unk0 uint32
|
||||
MercData []byte
|
||||
Unk1 uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -23,8 +25,11 @@ func (m *MsgMhfSaveMercenary) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfSaveMercenary) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.DataSize = bf.ReadUint32()
|
||||
m.RawDataPayload = bf.ReadBytes(uint(m.DataSize))
|
||||
bf.ReadUint32() // lenData
|
||||
m.GCP = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint32()
|
||||
m.MercData = bf.ReadBytes(uint(bf.ReadUint32()))
|
||||
m.Unk1 = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user