From 991b79a64db97836fea52d534dcb5c46a29bcc79 Mon Sep 17 00:00:00 2001 From: wish Date: Tue, 30 Aug 2022 18:38:51 +1000 Subject: [PATCH] stub rookie guild entry --- network/mhfpacket/msg_mhf_entry_rookie_guild.go | 17 +++++++++++------ server/channelserver/handlers_guild.go | 5 ++++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/network/mhfpacket/msg_mhf_entry_rookie_guild.go b/network/mhfpacket/msg_mhf_entry_rookie_guild.go index d210be01a..e3f12660f 100644 --- a/network/mhfpacket/msg_mhf_entry_rookie_guild.go +++ b/network/mhfpacket/msg_mhf_entry_rookie_guild.go @@ -1,15 +1,18 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfEntryRookieGuild represents the MSG_MHF_ENTRY_ROOKIE_GUILD -type MsgMhfEntryRookieGuild struct{} +type MsgMhfEntryRookieGuild struct { + AckHandle uint32 + Unk uint32 +} // Opcode returns the ID associated with this packet type. func (m *MsgMhfEntryRookieGuild) Opcode() network.PacketID { @@ -18,7 +21,9 @@ func (m *MsgMhfEntryRookieGuild) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfEntryRookieGuild) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - return errors.New("NOT IMPLEMENTED") + m.AckHandle = bf.ReadUint32() + m.Unk = bf.ReadUint32() + return nil } // Build builds a binary packet from the current data. diff --git a/server/channelserver/handlers_guild.go b/server/channelserver/handlers_guild.go index 2a0ec1256..6bbee7eba 100644 --- a/server/channelserver/handlers_guild.go +++ b/server/channelserver/handlers_guild.go @@ -1886,7 +1886,10 @@ func handleMsgMhfUpdateGuildMessageBoard(s *Session, p mhfpacket.MHFPacket) { doAckSimpleSucceed(s, pkt.AckHandle, []byte{0x00, 0x00, 0x00, 0x00}) } -func handleMsgMhfEntryRookieGuild(s *Session, p mhfpacket.MHFPacket) {} +func handleMsgMhfEntryRookieGuild(s *Session, p mhfpacket.MHFPacket) { + pkt := p.(*mhfpacket.MsgMhfEntryRookieGuild) + doAckSimpleFail(s, pkt.AckHandle, make([]byte, 4)) +} func handleMsgMhfUpdateForceGuildRank(s *Session, p mhfpacket.MHFPacket) {}