diff --git a/Erupe/network/mhfpacket/msg_mhf_enumerate_title.go b/Erupe/network/mhfpacket/msg_mhf_enumerate_title.go index e7bc8398e..8506e7071 100644 --- a/Erupe/network/mhfpacket/msg_mhf_enumerate_title.go +++ b/Erupe/network/mhfpacket/msg_mhf_enumerate_title.go @@ -1,17 +1,17 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfEnumerateTitle represents the MSG_MHF_ENUMERATE_TITLE type MsgMhfEnumerateTitle struct { - AckHandle uint32 - Unk0 uint32 + AckHandle uint32 + CharID uint32 } // Opcode returns the ID associated with this packet type. @@ -21,9 +21,9 @@ func (m *MsgMhfEnumerateTitle) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfEnumerateTitle) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - m.AckHandle = bf.ReadUint32() - m.Unk0 = bf.ReadUint32() - return nil + m.AckHandle = bf.ReadUint32() + m.CharID = bf.ReadUint32() + return nil } // Build builds a binary packet from the current data. diff --git a/Erupe/server/channelserver/handlers_house.go b/Erupe/server/channelserver/handlers_house.go index 30a016abb..7e77df565 100644 --- a/Erupe/server/channelserver/handlers_house.go +++ b/Erupe/server/channelserver/handlers_house.go @@ -154,7 +154,6 @@ func handleMsgMhfLoadHouse(s *Session, p mhfpacket.MHFPacket) { bf.WriteBytes(data) case 4: // Bookshelf // Hunting log - // Street names/Aliases bf.WriteBytes(make([]byte, 5576)) case 5: // Gallery // Furniture placement @@ -279,14 +278,18 @@ func handleMsgMhfSaveDecoMyset(s *Session, p mhfpacket.MHFPacket) { func handleMsgMhfEnumerateTitle(s *Session, p mhfpacket.MHFPacket) { pkt := p.(*mhfpacket.MsgMhfEnumerateTitle) bf := byteframe.NewByteFrame() - titleCount := 114 // all titles unlocked - bf.WriteUint16(uint16(titleCount)) // title count - bf.WriteUint16(0) // unk - for i := 0; i < titleCount; i++ { - bf.WriteUint16(uint16(i)) - bf.WriteUint16(0) // unk - bf.WriteUint32(0) // timestamp acquired - bf.WriteUint32(0) // timestamp updated + if pkt.CharID == s.charID { + titleCount := 114 // all titles unlocked + bf.WriteUint16(uint16(titleCount)) // title count + bf.WriteUint16(0) // unk + for i := 0; i < titleCount; i++ { + bf.WriteUint16(uint16(i)) + bf.WriteUint16(0) // unk + bf.WriteUint32(0) // timestamp acquired + bf.WriteUint32(0) // timestamp updated + } + } else { + bf.WriteUint16(0) } doAckBufSucceed(s, pkt.AckHandle, bf.Data()) }