handle diva shop coins

This commit is contained in:
wish
2022-10-17 05:27:09 +11:00
parent b88a128739
commit 619b0bf166
2 changed files with 17 additions and 7 deletions

View File

@@ -1,15 +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"
)
// MsgMhfUseUdShopCoin represents the MSG_MHF_USE_UD_SHOP_COIN
type MsgMhfUseUdShopCoin struct{}
type MsgMhfUseUdShopCoin struct {
AckHandle uint32
Cost uint8
}
// Opcode returns the ID associated with this packet type.
func (m *MsgMhfUseUdShopCoin) Opcode() network.PacketID {
@@ -18,7 +21,9 @@ func (m *MsgMhfUseUdShopCoin) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfUseUdShopCoin) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
return errors.New("NOT IMPLEMENTED")
m.AckHandle = bf.ReadUint32()
m.Cost = bf.ReadUint8()
return nil
}
// Build builds a binary packet from the current data.