include bookshelf data

This commit is contained in:
wish
2022-07-25 21:31:27 +10:00
parent 15440fcac6
commit 101e2b4399
2 changed files with 8 additions and 4 deletions

View File

@@ -61,8 +61,9 @@ func handleMsgMhfSavedata(s *Session, p mhfpacket.MHFPacket) {
s.logger.Fatal("Failed to character weapon type in db", zap.Error(err)) s.logger.Fatal("Failed to character weapon type in db", zap.Error(err))
} }
s.myseries.houseTier = decompressedData[129900:129905] // 0x1FB6C + 5 s.myseries.houseTier = decompressedData[129900:129905] // 0x1FB6C + 5
s.myseries.houseData = decompressedData[130561:130756] // 0x1FE01 + 195 s.myseries.houseData = decompressedData[130561:130756] // 0x1FE01 + 195
s.myseries.bookshelfData = decompressedData[139928:145504] // 0x22298 + 5576
// Gallery data also exists at 0x21578, is this the contest submission? // Gallery data also exists at 0x21578, is this the contest submission?
s.myseries.galleryData = decompressedData[140064:141812] // 0x22320 + 1748 s.myseries.galleryData = decompressedData[140064:141812] // 0x22320 + 1748
s.myseries.toreData = decompressedData[130228:130468] // 0x1FCB4 + 240 s.myseries.toreData = decompressedData[130228:130468] // 0x1FCB4 + 240

View File

@@ -152,8 +152,11 @@ func handleMsgMhfLoadHouse(s *Session, p mhfpacket.MHFPacket) {
} }
} }
case 4: // Bookshelf case 4: // Bookshelf
// TODO: Find where the hunting log data offset is in the savefile for _, session := range s.server.sessions {
bf.WriteBytes(make([]byte, 5576)) if session.charID == pkt.CharID {
bf.WriteBytes(session.myseries.bookshelfData)
}
}
case 5: // Gallery case 5: // Gallery
for _, session := range s.server.sessions { for _, session := range s.server.sessions {
if session.charID == pkt.CharID { if session.charID == pkt.CharID {