mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-14 16:04:38 +01:00
stub guild hunt box
This commit is contained in:
@@ -1,17 +1,18 @@
|
|||||||
package mhfpacket
|
package mhfpacket
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"erupe-ce/network/clientctx"
|
|
||||||
"erupe-ce/network"
|
|
||||||
"erupe-ce/common/byteframe"
|
"erupe-ce/common/byteframe"
|
||||||
|
"erupe-ce/network"
|
||||||
|
"erupe-ce/network/clientctx"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MsgMhfGuildHuntdata represents the MSG_MHF_GUILD_HUNTDATA
|
// MsgMhfGuildHuntdata represents the MSG_MHF_GUILD_HUNTDATA
|
||||||
type MsgMhfGuildHuntdata struct{
|
type MsgMhfGuildHuntdata struct {
|
||||||
AckHandle uint32
|
AckHandle uint32
|
||||||
Unk0 uint8
|
Operation uint8
|
||||||
|
GuildID uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
// Opcode returns the ID associated with this packet type.
|
// Opcode returns the ID associated with this packet type.
|
||||||
@@ -22,7 +23,10 @@ func (m *MsgMhfGuildHuntdata) Opcode() network.PacketID {
|
|||||||
// Parse parses the packet from binary
|
// Parse parses the packet from binary
|
||||||
func (m *MsgMhfGuildHuntdata) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
func (m *MsgMhfGuildHuntdata) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||||
m.AckHandle = bf.ReadUint32()
|
m.AckHandle = bf.ReadUint32()
|
||||||
m.Unk0 = bf.ReadUint8()
|
m.Operation = bf.ReadUint8()
|
||||||
|
if m.Operation == 1 {
|
||||||
|
m.GuildID = bf.ReadUint32()
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1806,7 +1806,20 @@ func handleMsgMhfGetGuildWeeklyBonusActiveCount(s *Session, p mhfpacket.MHFPacke
|
|||||||
|
|
||||||
func handleMsgMhfGuildHuntdata(s *Session, p mhfpacket.MHFPacket) {
|
func handleMsgMhfGuildHuntdata(s *Session, p mhfpacket.MHFPacket) {
|
||||||
pkt := p.(*mhfpacket.MsgMhfGuildHuntdata)
|
pkt := p.(*mhfpacket.MsgMhfGuildHuntdata)
|
||||||
doAckSimpleSucceed(s, pkt.AckHandle, make([]byte, 4))
|
bf := byteframe.NewByteFrame()
|
||||||
|
switch pkt.Operation {
|
||||||
|
case 0: // Unk
|
||||||
|
doAckBufSucceed(s, pkt.AckHandle, []byte{})
|
||||||
|
case 1: // Get Huntdata
|
||||||
|
bf.WriteUint8(0) // Entries
|
||||||
|
/* Entry format
|
||||||
|
uint32 UnkID
|
||||||
|
uint32 MonID
|
||||||
|
*/
|
||||||
|
doAckBufSucceed(s, pkt.AckHandle, bf.Data())
|
||||||
|
case 2: // Unk, controls glow
|
||||||
|
doAckBufSucceed(s, pkt.AckHandle, []byte{0x00, 0x00})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type MessageBoardPost struct {
|
type MessageBoardPost struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user