mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-18 09:54:46 +01:00
Added code
This commit is contained in:
@@ -3,6 +3,7 @@ package mhfpacket
|
||||
import (
|
||||
"errors"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/common/stringsupport"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
@@ -12,7 +13,7 @@ type MsgMhfApplyCampaign struct {
|
||||
AckHandle uint32
|
||||
CampaignID uint32
|
||||
NullPadding uint16 // set as 0 in z2
|
||||
CodeString []byte
|
||||
CodeString string
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -25,7 +26,8 @@ func (m *MsgMhfApplyCampaign) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Clie
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.CampaignID = bf.ReadUint32()
|
||||
m.NullPadding = bf.ReadUint16()
|
||||
m.CodeString = bf.ReadBytes(16)
|
||||
m.CodeString = stringsupport.SJISToUTF8(bf.ReadNullTerminatedBytes())
|
||||
bf.ReadInt8()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user