simplify Guild Huntdata & decimal conversions

This commit is contained in:
wish
2023-10-07 19:59:37 +11:00
parent 8e27617727
commit f37915bcae

View File

@@ -1851,14 +1851,14 @@ func handleMsgMhfGetGuildWeeklyBonusMaster(s *Session, p mhfpacket.MHFPacket) {
pkt := p.(*mhfpacket.MsgMhfGetGuildWeeklyBonusMaster) pkt := p.(*mhfpacket.MsgMhfGetGuildWeeklyBonusMaster)
// Values taken from brand new guild capture // Values taken from brand new guild capture
doAckBufSucceed(s, pkt.AckHandle, make([]byte, 0x28)) doAckBufSucceed(s, pkt.AckHandle, make([]byte, 40))
} }
func handleMsgMhfGetGuildWeeklyBonusActiveCount(s *Session, p mhfpacket.MHFPacket) { func handleMsgMhfGetGuildWeeklyBonusActiveCount(s *Session, p mhfpacket.MHFPacket) {
pkt := p.(*mhfpacket.MsgMhfGetGuildWeeklyBonusActiveCount) pkt := p.(*mhfpacket.MsgMhfGetGuildWeeklyBonusActiveCount)
bf := byteframe.NewByteFrame() bf := byteframe.NewByteFrame()
bf.WriteUint8(0x3C) // Active count bf.WriteUint8(60) // Active count
bf.WriteUint8(0x3C) // Current active count bf.WriteUint8(60) // Current active count
bf.WriteUint8(0x00) // New active count bf.WriteUint8(0) // New active count
doAckBufSucceed(s, pkt.AckHandle, bf.Data()) doAckBufSucceed(s, pkt.AckHandle, bf.Data())
} }
@@ -1866,18 +1866,18 @@ func handleMsgMhfGuildHuntdata(s *Session, p mhfpacket.MHFPacket) {
pkt := p.(*mhfpacket.MsgMhfGuildHuntdata) pkt := p.(*mhfpacket.MsgMhfGuildHuntdata)
bf := byteframe.NewByteFrame() bf := byteframe.NewByteFrame()
switch pkt.Operation { switch pkt.Operation {
case 0: // Unk case 0: // Acquire
doAckBufSucceed(s, pkt.AckHandle, []byte{}) // Probably mark everything as claimed
case 1: // Get Huntdata case 1: // Enumerate
bf.WriteUint8(0) // Entries bf.WriteUint8(0) // Entries
/* Entry format /* Entry format
uint32 UnkID uint32 UnkID
uint32 MonID uint32 MonID
*/ */
doAckBufSucceed(s, pkt.AckHandle, bf.Data()) case 2: // Check
case 2: // Unk, controls glow bf.WriteBool(false)
doAckBufSucceed(s, pkt.AckHandle, []byte{0x00, 0x00})
} }
doAckBufSucceed(s, pkt.AckHandle, bf.Data())
} }
type MessageBoardPost struct { type MessageBoardPost struct {