diff --git a/channelserver/handlers.go b/channelserver/handlers.go index 4daa6fef2..de185f0f1 100644 --- a/channelserver/handlers.go +++ b/channelserver/handlers.go @@ -855,7 +855,15 @@ func handleMsgMhfGetRengokuBinary(s *Session, p mhfpacket.MHFPacket) {} func handleMsgMhfEnumerateRengokuRanking(s *Session, p mhfpacket.MHFPacket) {} -func handleMsgMhfGetRengokuRankingRank(s *Session, p mhfpacket.MHFPacket) {} +func handleMsgMhfGetRengokuRankingRank(s *Session, p mhfpacket.MHFPacket) { + pkt := p.(*mhfpacket.MsgMhfGetRengokuRankingRank) + + bf := byteframe.NewByteFrame() + bf.WriteUint16(uint16(network.MSG_SYS_ACK)) + bf.WriteUint32(pkt.AckHandle) + bf.WriteBytes([]byte{0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}) + s.cryptConn.SendPacket(bf.Data()) +} func handleMsgMhfAcquireExchangeShop(s *Session, p mhfpacket.MHFPacket) {} diff --git a/channelserver/session.go b/channelserver/session.go index 3b506cd0a..0e95d1b14 100644 --- a/channelserver/session.go +++ b/channelserver/session.go @@ -118,8 +118,6 @@ func (s *Session) handlePacketGroup(pktGroup []byte) { fallthrough case network.MSG_MHF_ACQUIRE_MONTHLY_REWARD: fallthrough - case network.MSG_MHF_GET_RENGOKU_RANKING_RANK: - fallthrough case network.MSG_MHF_LOAD_PLATE_MYSET: fallthrough case network.MSG_MHF_LOAD_RENGOKU_DATA: diff --git a/network/mhfpacket/msg_mhf_acquire_monthly_reward.go b/network/mhfpacket/msg_mhf_acquire_monthly_reward.go index b99a47d8b..8501cca83 100644 --- a/network/mhfpacket/msg_mhf_acquire_monthly_reward.go +++ b/network/mhfpacket/msg_mhf_acquire_monthly_reward.go @@ -6,7 +6,9 @@ import ( ) // MsgMhfAcquireMonthlyReward represents the MSG_MHF_ACQUIRE_MONTHLY_REWARD -type MsgMhfAcquireMonthlyReward struct{} +type MsgMhfAcquireMonthlyReward struct { + AckHandle uint32 +} // Opcode returns the ID associated with this packet type. func (m *MsgMhfAcquireMonthlyReward) Opcode() network.PacketID { @@ -15,10 +17,11 @@ func (m *MsgMhfAcquireMonthlyReward) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfAcquireMonthlyReward) Parse(bf *byteframe.ByteFrame) error { - panic("Not implemented") + m.AckHandle = bf.ReadUint32() + return nil } // Build builds a binary packet from the current data. func (m *MsgMhfAcquireMonthlyReward) Build(bf *byteframe.ByteFrame) error { panic("Not implemented") -} \ No newline at end of file +} diff --git a/network/mhfpacket/msg_mhf_get_rengoku_ranking_rank.go b/network/mhfpacket/msg_mhf_get_rengoku_ranking_rank.go index 4df6aaf35..8e0bf508a 100644 --- a/network/mhfpacket/msg_mhf_get_rengoku_ranking_rank.go +++ b/network/mhfpacket/msg_mhf_get_rengoku_ranking_rank.go @@ -6,7 +6,9 @@ import ( ) // MsgMhfGetRengokuRankingRank represents the MSG_MHF_GET_RENGOKU_RANKING_RANK -type MsgMhfGetRengokuRankingRank struct{} +type MsgMhfGetRengokuRankingRank struct { + AckHandle uint32 +} // Opcode returns the ID associated with this packet type. func (m *MsgMhfGetRengokuRankingRank) Opcode() network.PacketID { @@ -15,10 +17,11 @@ func (m *MsgMhfGetRengokuRankingRank) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfGetRengokuRankingRank) Parse(bf *byteframe.ByteFrame) error { - panic("Not implemented") + m.AckHandle = bf.ReadUint32() + return nil } // Build builds a binary packet from the current data. func (m *MsgMhfGetRengokuRankingRank) Build(bf *byteframe.ByteFrame) error { panic("Not implemented") -} \ No newline at end of file +}