variable changes

This commit is contained in:
wish
2023-01-15 21:36:50 +11:00
parent e1df9fca04
commit 7d4559b589
5 changed files with 47 additions and 50 deletions

View File

@@ -1,19 +1,19 @@
package mhfpacket
import (
"errors"
import (
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
)
// MsgMhfPlayBoxGacha represents the MSG_MHF_PLAY_BOX_GACHA
type MsgMhfPlayBoxGacha struct{
type MsgMhfPlayBoxGacha struct {
AckHandle uint32
GachaHash uint32
RollType uint8
CurrencyMode uint8
GachaID uint32
RollType uint8
GachaType uint8
}
// Opcode returns the ID associated with this packet type.
@@ -24,9 +24,9 @@ func (m *MsgMhfPlayBoxGacha) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfPlayBoxGacha) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
m.GachaHash = bf.ReadUint32()
m.GachaID = bf.ReadUint32()
m.RollType = bf.ReadUint8()
m.CurrencyMode = bf.ReadUint8()
m.GachaType = bf.ReadUint8()
return nil
}

View File

@@ -10,10 +10,10 @@ import (
// MsgMhfPlayNormalGacha represents the MSG_MHF_PLAY_NORMAL_GACHA
type MsgMhfPlayNormalGacha struct {
AckHandle uint32
GachaID uint32
RollType uint8
CurrencyMode uint8
AckHandle uint32
GachaID uint32
RollType uint8
GachaType uint8
}
// Opcode returns the ID associated with this packet type.
@@ -26,7 +26,7 @@ func (m *MsgMhfPlayNormalGacha) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Cl
m.AckHandle = bf.ReadUint32()
m.GachaID = bf.ReadUint32()
m.RollType = bf.ReadUint8()
m.CurrencyMode = bf.ReadUint8()
m.GachaType = bf.ReadUint8()
return nil
}

View File

@@ -1,19 +1,19 @@
package mhfpacket
import (
"errors"
import (
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
)
// MsgMhfPlayStepupGacha represents the MSG_MHF_PLAY_STEPUP_GACHA
type MsgMhfPlayStepupGacha struct{
type MsgMhfPlayStepupGacha struct {
AckHandle uint32
GachaHash uint32
RollType uint8
CurrencyMode uint8
GachaID uint32
RollType uint8
GachaType uint8
}
// Opcode returns the ID associated with this packet type.
@@ -24,9 +24,9 @@ func (m *MsgMhfPlayStepupGacha) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfPlayStepupGacha) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
m.GachaHash = bf.ReadUint32()
m.GachaID = bf.ReadUint32()
m.RollType = bf.ReadUint8()
m.CurrencyMode = bf.ReadUint8()
m.GachaType = bf.ReadUint8()
return nil
}