mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-21 19:34:45 +01:00
initial databasing
This commit is contained in:
@@ -10,10 +10,10 @@ import (
|
||||
|
||||
// MsgMhfAcquireItem represents the MSG_MHF_ACQUIRE_ITEM
|
||||
type MsgMhfAcquireItem struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16
|
||||
Length uint16
|
||||
Unk1 []uint32
|
||||
AckHandle uint32
|
||||
NullPadding uint16 //0 in Z2
|
||||
Length uint16
|
||||
Unk1 []uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -24,7 +24,7 @@ func (m *MsgMhfAcquireItem) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfAcquireItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.NullPadding = bf.ReadUint16()
|
||||
m.Length = bf.ReadUint16()
|
||||
for i := 0; i < int(m.Length); i++ {
|
||||
m.Unk1 = append(m.Unk1, bf.ReadUint32())
|
||||
|
||||
@@ -9,10 +9,10 @@ import (
|
||||
|
||||
// MsgMhfApplyCampaign represents the MSG_MHF_APPLY_CAMPAIGN
|
||||
type MsgMhfApplyCampaign struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint32
|
||||
Unk1 uint16
|
||||
Unk2 []byte
|
||||
AckHandle uint32
|
||||
CampaignID uint32
|
||||
NullPadding uint16 // set as 0 in z2
|
||||
CodeString []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -23,9 +23,9 @@ func (m *MsgMhfApplyCampaign) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfApplyCampaign) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint32()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
m.Unk2 = bf.ReadBytes(16)
|
||||
m.CampaignID = bf.ReadUint32()
|
||||
m.NullPadding = bf.ReadUint16()
|
||||
m.CodeString = bf.ReadBytes(16)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ import (
|
||||
|
||||
// MsgMhfEnumerateCampaign represents the MSG_MHF_ENUMERATE_CAMPAIGN
|
||||
type MsgMhfEnumerateCampaign struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16
|
||||
Unk1 uint16
|
||||
AckHandle uint32
|
||||
NullPadding1 uint16 // 0 in z2
|
||||
NullPadding2 uint16 // 0 in z2
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -21,15 +21,15 @@ func (m *MsgMhfEnumerateCampaign) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfEnumerateCampaign) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
m.NullPadding1 = bf.ReadUint16()
|
||||
m.NullPadding2 = bf.ReadUint16()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfEnumerateCampaign) Build(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
bf.WriteUint32(m.AckHandle)
|
||||
bf.WriteUint16(m.Unk0)
|
||||
bf.WriteUint16(m.Unk1)
|
||||
bf.WriteUint16(m.NullPadding1)
|
||||
bf.WriteUint16(m.NullPadding2)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -10,10 +10,10 @@ import (
|
||||
|
||||
// MsgMhfEnumerateItem represents the MSG_MHF_ENUMERATE_ITEM
|
||||
type MsgMhfEnumerateItem struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16
|
||||
Unk1 uint16
|
||||
CampaignID uint32
|
||||
AckHandle uint32
|
||||
NullPadding uint16 // 0 in Z2
|
||||
Unk1 uint16 //0002
|
||||
CampaignID uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -24,7 +24,7 @@ func (m *MsgMhfEnumerateItem) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfEnumerateItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.NullPadding = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
m.CampaignID = bf.ReadUint32()
|
||||
return nil
|
||||
|
||||
@@ -10,9 +10,9 @@ import (
|
||||
|
||||
// MsgMhfStateCampaign represents the MSG_MHF_STATE_CAMPAIGN
|
||||
type MsgMhfStateCampaign struct {
|
||||
AckHandle uint32
|
||||
CampaignID uint32
|
||||
Unk1 uint16
|
||||
AckHandle uint32
|
||||
CampaignID uint32
|
||||
NullPadding uint16
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -24,7 +24,7 @@ func (m *MsgMhfStateCampaign) Opcode() network.PacketID {
|
||||
func (m *MsgMhfStateCampaign) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.CampaignID = bf.ReadUint32()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
m.NullPadding = bf.ReadUint16() //0 in Z2
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user