partial Tenrouirai automation and Gem fix

This commit is contained in:
wish
2023-06-25 00:11:47 +10:00
parent b60bf4979b
commit 4a21272c42
3 changed files with 191 additions and 89 deletions

View File

@@ -12,15 +12,23 @@ import (
type MsgMhfPostTenrouirai struct {
AckHandle uint32
Unk0 uint8
Unk1 uint8
Op uint8
GuildID uint32
Unk3 uint8
Floors uint16
Antiques uint16
Chests uint16
Cats uint16
TRP uint16
Slays uint16
Unk1 uint8
Floors uint16
Antiques uint16
Chests uint16
Cats uint16
TRP uint16
Slays uint16
DonatedRP uint16
PreviousRP uint16
Unk2_0 uint16
Unk2_1 uint16
Unk2_2 uint16
Unk2_3 uint16
}
// Opcode returns the ID associated with this packet type.
@@ -32,15 +40,27 @@ func (m *MsgMhfPostTenrouirai) Opcode() network.PacketID {
func (m *MsgMhfPostTenrouirai) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
m.Unk0 = bf.ReadUint8()
m.Unk1 = bf.ReadUint8()
m.Op = bf.ReadUint8()
m.GuildID = bf.ReadUint32()
m.Unk3 = bf.ReadUint8()
m.Floors = bf.ReadUint16()
m.Antiques = bf.ReadUint16()
m.Chests = bf.ReadUint16()
m.Cats = bf.ReadUint16()
m.TRP = bf.ReadUint16()
m.Slays = bf.ReadUint16()
m.Unk1 = bf.ReadUint8()
switch m.Op {
case 1:
m.Floors = bf.ReadUint16()
m.Antiques = bf.ReadUint16()
m.Chests = bf.ReadUint16()
m.Cats = bf.ReadUint16()
m.TRP = bf.ReadUint16()
m.Slays = bf.ReadUint16()
case 2:
m.DonatedRP = bf.ReadUint16()
m.PreviousRP = bf.ReadUint16()
m.Unk2_0 = bf.ReadUint16()
m.Unk2_1 = bf.ReadUint16()
m.Unk2_2 = bf.ReadUint16()
m.Unk2_3 = bf.ReadUint16()
}
return nil
}