From d81e55cab44b2de6f32741bab9187fa339b0e53d Mon Sep 17 00:00:00 2001 From: wish Date: Thu, 8 Sep 2022 15:16:44 +1000 Subject: [PATCH] stub GetGemInfo --- network/mhfpacket/msg_mhf_get_gem_info.go | 19 +++++++++++++------ server/channelserver/handlers_tower.go | 5 ++++- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/network/mhfpacket/msg_mhf_get_gem_info.go b/network/mhfpacket/msg_mhf_get_gem_info.go index 516aea6be..36eb7948e 100644 --- a/network/mhfpacket/msg_mhf_get_gem_info.go +++ b/network/mhfpacket/msg_mhf_get_gem_info.go @@ -1,15 +1,19 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetGemInfo represents the MSG_MHF_GET_GEM_INFO -type MsgMhfGetGemInfo struct{} +type MsgMhfGetGemInfo struct { + AckHandle uint32 + Unk uint32 + Unk1 []byte +} // Opcode returns the ID associated with this packet type. func (m *MsgMhfGetGemInfo) Opcode() network.PacketID { @@ -18,7 +22,10 @@ func (m *MsgMhfGetGemInfo) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfGetGemInfo) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - return errors.New("NOT IMPLEMENTED") + m.AckHandle = bf.ReadUint32() + m.Unk = bf.ReadUint32() + m.Unk1 = bf.ReadBytes(24) + return nil } // Build builds a binary packet from the current data. diff --git a/server/channelserver/handlers_tower.go b/server/channelserver/handlers_tower.go index 49029753f..10c3070f9 100644 --- a/server/channelserver/handlers_tower.go +++ b/server/channelserver/handlers_tower.go @@ -58,6 +58,9 @@ func handleMsgMhfPostTowerInfo(s *Session, p mhfpacket.MHFPacket) { doAckSimpleSucceed(s, pkt.AckHandle, []byte{0x00, 0x00, 0x00, 0x00}) } -func handleMsgMhfGetGemInfo(s *Session, p mhfpacket.MHFPacket) {} +func handleMsgMhfGetGemInfo(s *Session, p mhfpacket.MHFPacket) { + pkt := p.(*mhfpacket.MsgMhfGetGemInfo) + doAckBufSucceed(s, pkt.AckHandle, make([]byte, 8)) +} func handleMsgMhfPostGemInfo(s *Session, p mhfpacket.MHFPacket) {}