Merge branch 'main' into feature/diva

This commit is contained in:
wish
2022-12-24 19:43:58 +11:00
17 changed files with 754 additions and 297 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()

View File

@@ -1,17 +1,17 @@
package mhfpacket
import (
"errors"
import (
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
)
// MsgMhfGetGachaPlayHistory represents the MSG_MHF_GET_GACHA_PLAY_HISTORY
type MsgMhfGetGachaPlayHistory struct{
type MsgMhfGetGachaPlayHistory struct {
AckHandle uint32
GachaHash uint32
GachaID uint32
}
// Opcode returns the ID associated with this packet type.
@@ -22,7 +22,7 @@ func (m *MsgMhfGetGachaPlayHistory) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfGetGachaPlayHistory) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
m.GachaHash = bf.ReadUint32()
m.GachaID = bf.ReadUint32()
return nil
}