implement Trend Weapons

This commit is contained in:
wish
2023-07-30 19:40:11 +10:00
parent 00a06fab17
commit d79481f0c8
3 changed files with 51 additions and 19 deletions

View File

@@ -1,18 +1,18 @@
package mhfpacket
import (
"errors"
import (
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
)
// MsgMhfUpdateUseTrendWeaponLog represents the MSG_MHF_UPDATE_USE_TREND_WEAPON_LOG
type MsgMhfUpdateUseTrendWeaponLog struct {
AckHandle uint32
Unk0 uint8
Unk1 uint16 // Weapon/item ID probably?
AckHandle uint32
WeaponType uint8
WeaponID uint16
}
// Opcode returns the ID associated with this packet type.
@@ -23,8 +23,8 @@ func (m *MsgMhfUpdateUseTrendWeaponLog) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfUpdateUseTrendWeaponLog) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
m.Unk0 = bf.ReadUint8()
m.Unk1 = bf.ReadUint16()
m.WeaponType = bf.ReadUint8()
m.WeaponID = bf.ReadUint16()
return nil
}