fix guild enumeration and applications

This commit is contained in:
wish
2022-08-04 06:43:41 +10:00
parent 872a0b3785
commit ba927f877d
5 changed files with 97 additions and 98 deletions

View File

@@ -2,6 +2,7 @@ package mhfpacket
import (
"errors"
"io"
"erupe-ce/common/byteframe"
"erupe-ce/network"
@@ -30,6 +31,7 @@ const (
type MsgMhfEnumerateGuild struct {
AckHandle uint32
Type EnumerateGuildType
Page uint8
RawDataPayload []byte
}
@@ -42,8 +44,9 @@ func (m *MsgMhfEnumerateGuild) Opcode() network.PacketID {
func (m *MsgMhfEnumerateGuild) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
m.Type = EnumerateGuildType(bf.ReadUint8())
m.Page = bf.ReadUint8()
m.RawDataPayload = bf.DataFromCurrent()
bf.Seek(int64(len(bf.Data())-2), 0)
bf.Seek(-2, io.SeekEnd)
return nil
}

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
import (
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
)
type OperateGuildMemberAction uint8
@@ -23,6 +23,7 @@ type MsgMhfOperateGuildMember struct {
GuildID uint32
CharID uint32
Action uint8
Unk []byte
}
// Opcode returns the ID associated with this packet type.
@@ -36,7 +37,7 @@ func (m *MsgMhfOperateGuildMember) Parse(bf *byteframe.ByteFrame, ctx *clientctx
m.GuildID = bf.ReadUint32()
m.CharID = bf.ReadUint32()
m.Action = bf.ReadUint8()
m.Unk = bf.ReadBytes(3)
return nil
}