shop enumeration pass 2

This commit is contained in:
wish
2022-11-21 11:42:19 +11:00
parent 9103debe99
commit d21ecf2b31
4 changed files with 75 additions and 67 deletions

View File

@@ -1,20 +1,20 @@
package mhfpacket
import (
"errors"
import (
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
)
// MsgMhfExchangeFpoint2Item represents the MSG_MHF_EXCHANGE_FPOINT_2_ITEM
type MsgMhfExchangeFpoint2Item struct{
type MsgMhfExchangeFpoint2Item struct {
AckHandle uint32
ItemHash uint32
ItemType uint16
ItemId uint16
Quantity byte
TradeID uint32
ItemType uint16
ItemId uint16
Quantity byte
}
// Opcode returns the ID associated with this packet type.
@@ -25,7 +25,7 @@ func (m *MsgMhfExchangeFpoint2Item) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfExchangeFpoint2Item) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
m.ItemHash = bf.ReadUint32()
m.TradeID = bf.ReadUint32()
m.ItemType = bf.ReadUint16()
m.ItemId = bf.ReadUint16()
m.Quantity = bf.ReadUint8()

View File

@@ -1,20 +1,20 @@
package mhfpacket
import (
"errors"
import (
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
)
// MsgMhfExchangeItem2Fpoint represents the MSG_MHF_EXCHANGE_ITEM_2_FPOINT
type MsgMhfExchangeItem2Fpoint struct{
type MsgMhfExchangeItem2Fpoint struct {
AckHandle uint32
ItemHash uint32
ItemType uint16
ItemId uint16
Quantity byte
TradeID uint32
ItemType uint16
ItemId uint16
Quantity byte
}
// Opcode returns the ID associated with this packet type.
@@ -25,7 +25,7 @@ func (m *MsgMhfExchangeItem2Fpoint) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfExchangeItem2Fpoint) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
m.ItemHash = bf.ReadUint32()
m.TradeID = bf.ReadUint32()
m.ItemType = bf.ReadUint16()
m.ItemId = bf.ReadUint16()
m.Quantity = bf.ReadUint8()