mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-15 16:34:51 +01:00
Initial chat prototype
This commit is contained in:
@@ -6,7 +6,11 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfEnumerateOrder represents the MSG_MHF_ENUMERATE_ORDER
|
||||
type MsgMhfEnumerateOrder struct{}
|
||||
type MsgMhfEnumerateOrder struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint32
|
||||
Unk1 uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfEnumerateOrder) Opcode() network.PacketID {
|
||||
@@ -15,10 +19,13 @@ func (m *MsgMhfEnumerateOrder) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfEnumerateOrder) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint32()
|
||||
m.Unk1 = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfEnumerateOrder) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,11 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfEnumeratePrice represents the MSG_MHF_ENUMERATE_PRICE
|
||||
type MsgMhfEnumeratePrice struct{}
|
||||
type MsgMhfEnumeratePrice struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16 // Hardcoded 0 in the binary
|
||||
Unk1 uint16 // Hardcoded 0 in the binary
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfEnumeratePrice) Opcode() network.PacketID {
|
||||
@@ -15,10 +19,13 @@ func (m *MsgMhfEnumeratePrice) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfEnumeratePrice) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfEnumeratePrice) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,15 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfEnumerateShop represents the MSG_MHF_ENUMERATE_SHOP
|
||||
type MsgMhfEnumerateShop struct{}
|
||||
type MsgMhfEnumerateShop struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint8 // Shop ID maybe? I seen 0 -> 10.
|
||||
Unk1 uint32
|
||||
Unk2 uint16
|
||||
Unk3 uint8
|
||||
Unk4 uint8
|
||||
Unk5 uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfEnumerateShop) Opcode() network.PacketID {
|
||||
@@ -15,10 +23,17 @@ func (m *MsgMhfEnumerateShop) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfEnumerateShop) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
m.Unk1 = bf.ReadUint32()
|
||||
m.Unk2 = bf.ReadUint16()
|
||||
m.Unk3 = bf.ReadUint8()
|
||||
m.Unk4 = bf.ReadUint8()
|
||||
m.Unk5 = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfEnumerateShop) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfGetBoostRight represents the MSG_MHF_GET_BOOST_RIGHT
|
||||
type MsgMhfGetBoostRight struct{}
|
||||
type MsgMhfGetBoostRight struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfGetBoostRight) Opcode() network.PacketID {
|
||||
@@ -15,10 +17,11 @@ func (m *MsgMhfGetBoostRight) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfGetBoostRight) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfGetBoostRight) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfGetBoostTime represents the MSG_MHF_GET_BOOST_TIME
|
||||
type MsgMhfGetBoostTime struct{}
|
||||
type MsgMhfGetBoostTime struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfGetBoostTime) Opcode() network.PacketID {
|
||||
@@ -15,10 +17,11 @@ func (m *MsgMhfGetBoostTime) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfGetBoostTime) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfGetBoostTime) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfGetBoostTimeLimit represents the MSG_MHF_GET_BOOST_TIME_LIMIT
|
||||
type MsgMhfGetBoostTimeLimit struct{}
|
||||
type MsgMhfGetBoostTimeLimit struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfGetBoostTimeLimit) Opcode() network.PacketID {
|
||||
@@ -15,10 +17,11 @@ func (m *MsgMhfGetBoostTimeLimit) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfGetBoostTimeLimit) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfGetBoostTimeLimit) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,11 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfGetEarthStatus represents the MSG_MHF_GET_EARTH_STATUS
|
||||
type MsgMhfGetEarthStatus struct{}
|
||||
type MsgMhfGetEarthStatus struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint32
|
||||
Unk1 uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfGetEarthStatus) Opcode() network.PacketID {
|
||||
@@ -15,10 +19,13 @@ func (m *MsgMhfGetEarthStatus) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfGetEarthStatus) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint32()
|
||||
m.Unk1 = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfGetEarthStatus) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,16 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfGetEarthValue represents the MSG_MHF_GET_EARTH_VALUE
|
||||
type MsgMhfGetEarthValue struct{}
|
||||
type MsgMhfGetEarthValue struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint32
|
||||
Unk1 uint32
|
||||
Unk2 uint32
|
||||
Unk3 uint32
|
||||
Unk4 uint32
|
||||
Unk5 uint32
|
||||
Unk6 uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfGetEarthValue) Opcode() network.PacketID {
|
||||
@@ -15,10 +24,18 @@ func (m *MsgMhfGetEarthValue) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfGetEarthValue) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint32()
|
||||
m.Unk1 = bf.ReadUint32()
|
||||
m.Unk2 = bf.ReadUint32()
|
||||
m.Unk3 = bf.ReadUint32()
|
||||
m.Unk4 = bf.ReadUint32()
|
||||
m.Unk5 = bf.ReadUint32()
|
||||
m.Unk6 = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfGetEarthValue) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,10 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfGetEnhancedMinidata represents the MSG_MHF_GET_ENHANCED_MINIDATA
|
||||
type MsgMhfGetEnhancedMinidata struct{}
|
||||
type MsgMhfGetEnhancedMinidata struct {
|
||||
AckHandle uint32
|
||||
CharID uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfGetEnhancedMinidata) Opcode() network.PacketID {
|
||||
@@ -15,10 +18,12 @@ func (m *MsgMhfGetEnhancedMinidata) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfGetEnhancedMinidata) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.CharID = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfGetEnhancedMinidata) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfGetKeepLoginBoostStatus represents the MSG_MHF_GET_KEEP_LOGIN_BOOST_STATUS
|
||||
type MsgMhfGetKeepLoginBoostStatus struct{}
|
||||
type MsgMhfGetKeepLoginBoostStatus struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfGetKeepLoginBoostStatus) Opcode() network.PacketID {
|
||||
@@ -15,10 +17,11 @@ func (m *MsgMhfGetKeepLoginBoostStatus) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfGetKeepLoginBoostStatus) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfGetKeepLoginBoostStatus) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfGetKouryouPoint represents the MSG_MHF_GET_KOURYOU_POINT
|
||||
type MsgMhfGetKouryouPoint struct{}
|
||||
type MsgMhfGetKouryouPoint struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfGetKouryouPoint) Opcode() network.PacketID {
|
||||
@@ -15,10 +17,11 @@ func (m *MsgMhfGetKouryouPoint) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfGetKouryouPoint) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfGetKouryouPoint) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,12 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfGetPaperData represents the MSG_MHF_GET_PAPER_DATA
|
||||
type MsgMhfGetPaperData struct{}
|
||||
type MsgMhfGetPaperData struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint32
|
||||
Unk1 uint32
|
||||
Unk2 uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfGetPaperData) Opcode() network.PacketID {
|
||||
@@ -15,10 +20,14 @@ func (m *MsgMhfGetPaperData) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfGetPaperData) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint32()
|
||||
m.Unk1 = bf.ReadUint32()
|
||||
m.Unk2 = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfGetPaperData) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,23 @@ import (
|
||||
"github.com/Andoryuuta/byteframe"
|
||||
)
|
||||
|
||||
// The server sends different responses based on these values.
|
||||
const (
|
||||
TowerInfoTypeUnk0 = iota
|
||||
TowerInfoTypeTowerRankPoint
|
||||
TowerInfoTypeGetOwnTowerSkill
|
||||
TowerInfoTypeUnk3
|
||||
TowerInfoTypeTowerTouhaHistory
|
||||
TowerInfoTypeUnk5
|
||||
)
|
||||
|
||||
// MsgMhfGetTowerInfo represents the MSG_MHF_GET_TOWER_INFO
|
||||
type MsgMhfGetTowerInfo struct{}
|
||||
type MsgMhfGetTowerInfo struct {
|
||||
AckHandle uint32
|
||||
InfoType uint32 // Requested response type
|
||||
Unk0 uint32
|
||||
Unk1 uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfGetTowerInfo) Opcode() network.PacketID {
|
||||
@@ -15,10 +30,14 @@ func (m *MsgMhfGetTowerInfo) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfGetTowerInfo) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.InfoType = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint32()
|
||||
m.Unk1 = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfGetTowerInfo) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfGetUdInfo represents the MSG_MHF_GET_UD_INFO
|
||||
type MsgMhfGetUdInfo struct{}
|
||||
type MsgMhfGetUdInfo struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfGetUdInfo) Opcode() network.PacketID {
|
||||
@@ -15,10 +17,11 @@ func (m *MsgMhfGetUdInfo) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfGetUdInfo) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfGetUdInfo) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfGetUdMonsterPoint represents the MSG_MHF_GET_UD_MONSTER_POINT
|
||||
type MsgMhfGetUdMonsterPoint struct{}
|
||||
type MsgMhfGetUdMonsterPoint struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfGetUdMonsterPoint) Opcode() network.PacketID {
|
||||
@@ -15,10 +17,11 @@ func (m *MsgMhfGetUdMonsterPoint) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfGetUdMonsterPoint) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfGetUdMonsterPoint) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfGetUdSchedule represents the MSG_MHF_GET_UD_SCHEDULE
|
||||
type MsgMhfGetUdSchedule struct{}
|
||||
type MsgMhfGetUdSchedule struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfGetUdSchedule) Opcode() network.PacketID {
|
||||
@@ -15,10 +17,11 @@ func (m *MsgMhfGetUdSchedule) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfGetUdSchedule) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfGetUdSchedule) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfGetWeeklySchedule represents the MSG_MHF_GET_WEEKLY_SCHEDULE
|
||||
type MsgMhfGetWeeklySchedule struct{}
|
||||
type MsgMhfGetWeeklySchedule struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfGetWeeklySchedule) Opcode() network.PacketID {
|
||||
@@ -15,10 +17,11 @@ func (m *MsgMhfGetWeeklySchedule) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfGetWeeklySchedule) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfGetWeeklySchedule) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,11 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfInfoFesta represents the MSG_MHF_INFO_FESTA
|
||||
type MsgMhfInfoFesta struct{}
|
||||
type MsgMhfInfoFesta struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16 // Hardcoded 0 in the binary
|
||||
Unk1 uint16 // Hardcoded 0 in the binary
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfInfoFesta) Opcode() network.PacketID {
|
||||
@@ -15,10 +19,13 @@ func (m *MsgMhfInfoFesta) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfInfoFesta) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfInfoFesta) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfLoadDecoMyset represents the MSG_MHF_LOAD_DECO_MYSET
|
||||
type MsgMhfLoadDecoMyset struct{}
|
||||
type MsgMhfLoadDecoMyset struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfLoadDecoMyset) Opcode() network.PacketID {
|
||||
@@ -15,10 +17,11 @@ func (m *MsgMhfLoadDecoMyset) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfLoadDecoMyset) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfLoadDecoMyset) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfLoadFavoriteQuest represents the MSG_MHF_LOAD_FAVORITE_QUEST
|
||||
type MsgMhfLoadFavoriteQuest struct{}
|
||||
type MsgMhfLoadFavoriteQuest struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfLoadFavoriteQuest) Opcode() network.PacketID {
|
||||
@@ -15,10 +17,11 @@ func (m *MsgMhfLoadFavoriteQuest) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfLoadFavoriteQuest) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfLoadFavoriteQuest) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfLoadHunterNavi represents the MSG_MHF_LOAD_HUNTER_NAVI
|
||||
type MsgMhfLoadHunterNavi struct{}
|
||||
type MsgMhfLoadHunterNavi struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfLoadHunterNavi) Opcode() network.PacketID {
|
||||
@@ -15,10 +17,11 @@ func (m *MsgMhfLoadHunterNavi) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfLoadHunterNavi) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfLoadHunterNavi) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfLoadMezfesData represents the MSG_MHF_LOAD_MEZFES_DATA
|
||||
type MsgMhfLoadMezfesData struct{}
|
||||
type MsgMhfLoadMezfesData struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfLoadMezfesData) Opcode() network.PacketID {
|
||||
@@ -15,10 +17,11 @@ func (m *MsgMhfLoadMezfesData) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfLoadMezfesData) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfLoadMezfesData) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfLoadOtomoAirou represents the MSG_MHF_LOAD_OTOMO_AIROU
|
||||
type MsgMhfLoadOtomoAirou struct{}
|
||||
type MsgMhfLoadOtomoAirou struct{
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfLoadOtomoAirou) Opcode() network.PacketID {
|
||||
@@ -15,7 +17,8 @@ func (m *MsgMhfLoadOtomoAirou) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfLoadOtomoAirou) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfLoadPartner represents the MSG_MHF_LOAD_PARTNER
|
||||
type MsgMhfLoadPartner struct{}
|
||||
type MsgMhfLoadPartner struct{
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfLoadPartner) Opcode() network.PacketID {
|
||||
@@ -15,7 +17,8 @@ func (m *MsgMhfLoadPartner) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfLoadPartner) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfLoadPlateBox represents the MSG_MHF_LOAD_PLATE_BOX
|
||||
type MsgMhfLoadPlateBox struct{}
|
||||
type MsgMhfLoadPlateBox struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfLoadPlateBox) Opcode() network.PacketID {
|
||||
@@ -15,10 +17,11 @@ func (m *MsgMhfLoadPlateBox) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfLoadPlateBox) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfLoadPlateBox) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfLoadPlateData represents the MSG_MHF_LOAD_PLATE_DATA
|
||||
type MsgMhfLoadPlateData struct{}
|
||||
type MsgMhfLoadPlateData struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfLoadPlateData) Opcode() network.PacketID {
|
||||
@@ -15,10 +17,11 @@ func (m *MsgMhfLoadPlateData) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfLoadPlateData) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfLoadPlateData) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfLoadPlateMyset represents the MSG_MHF_LOAD_PLATE_MYSET
|
||||
type MsgMhfLoadPlateMyset struct{}
|
||||
type MsgMhfLoadPlateMyset struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfLoadPlateMyset) Opcode() network.PacketID {
|
||||
@@ -15,10 +17,11 @@ func (m *MsgMhfLoadPlateMyset) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfLoadPlateMyset) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfLoadPlateMyset) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfLoadRengokuData represents the MSG_MHF_LOAD_RENGOKU_DATA
|
||||
type MsgMhfLoadRengokuData struct{}
|
||||
type MsgMhfLoadRengokuData struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfLoadRengokuData) Opcode() network.PacketID {
|
||||
@@ -15,10 +17,11 @@ func (m *MsgMhfLoadRengokuData) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfLoadRengokuData) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfLoadRengokuData) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfLoadScenarioData represents the MSG_MHF_LOAD_SCENARIO_DATA
|
||||
type MsgMhfLoadScenarioData struct{}
|
||||
type MsgMhfLoadScenarioData struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfLoadScenarioData) Opcode() network.PacketID {
|
||||
@@ -15,10 +17,11 @@ func (m *MsgMhfLoadScenarioData) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfLoadScenarioData) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfLoadScenarioData) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,12 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfReadBeatLevel represents the MSG_MHF_READ_BEAT_LEVEL
|
||||
type MsgMhfReadBeatLevel struct{}
|
||||
type MsgMhfReadBeatLevel struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint32
|
||||
ValidIDCount uint32 // Valid entries in the array
|
||||
IDs [16]uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfReadBeatLevel) Opcode() network.PacketID {
|
||||
@@ -15,10 +20,19 @@ func (m *MsgMhfReadBeatLevel) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfReadBeatLevel) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
// I assume this used to be dynamic, but as of the last JP client version, all of this data is hard-coded literals.
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint32() // Always 1
|
||||
m.ValidIDCount = bf.ReadUint32() // Always 4
|
||||
|
||||
// Always 0x74, 0x6B, 0x02, 0x24 followed by 12 zero values.
|
||||
for i := 0; i < len(m.IDs); i++ {
|
||||
m.IDs[i] = bf.ReadUint32()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfReadBeatLevel) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ type MsgMhfReadMercenaryW struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint8
|
||||
Unk1 uint8
|
||||
Unk2 uint16
|
||||
Unk2 uint16 // Hardcoded 0 in the binary
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
|
||||
@@ -6,7 +6,12 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfSaveHunterNavi represents the MSG_MHF_SAVE_HUNTER_NAVI
|
||||
type MsgMhfSaveHunterNavi struct{}
|
||||
type MsgMhfSaveHunterNavi struct {
|
||||
AckHandle uint32
|
||||
DataSize uint32
|
||||
Unk0 bool
|
||||
RawDataPayload []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfSaveHunterNavi) Opcode() network.PacketID {
|
||||
@@ -15,10 +20,14 @@ func (m *MsgMhfSaveHunterNavi) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfSaveHunterNavi) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.DataSize = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadBool()
|
||||
m.RawDataPayload = bf.ReadBytes(uint(m.DataSize))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfSaveHunterNavi) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,11 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfSaveMezfesData represents the MSG_MHF_SAVE_MEZFES_DATA
|
||||
type MsgMhfSaveMezfesData struct{}
|
||||
type MsgMhfSaveMezfesData struct {
|
||||
AckHandle uint32
|
||||
DataSize uint32
|
||||
RawDataPayload []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfSaveMezfesData) Opcode() network.PacketID {
|
||||
@@ -15,10 +19,13 @@ func (m *MsgMhfSaveMezfesData) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfSaveMezfesData) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.DataSize = bf.ReadUint32()
|
||||
m.RawDataPayload = bf.ReadBytes(uint(m.DataSize))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfSaveMezfesData) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,11 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfSavePartner represents the MSG_MHF_SAVE_PARTNER
|
||||
type MsgMhfSavePartner struct{}
|
||||
type MsgMhfSavePartner struct {
|
||||
AckHandle uint32
|
||||
DataSize uint16
|
||||
RawDataPayload []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfSavePartner) Opcode() network.PacketID {
|
||||
@@ -15,10 +19,13 @@ func (m *MsgMhfSavePartner) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfSavePartner) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.DataSize = bf.ReadUint16()
|
||||
m.RawDataPayload = bf.ReadBytes(uint(m.DataSize))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfSavePartner) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,11 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfSaveScenarioData represents the MSG_MHF_SAVE_SCENARIO_DATA
|
||||
type MsgMhfSaveScenarioData struct{}
|
||||
type MsgMhfSaveScenarioData struct {
|
||||
AckHandle uint32
|
||||
DataSize uint32
|
||||
RawDataPayload []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfSaveScenarioData) Opcode() network.PacketID {
|
||||
@@ -15,10 +19,13 @@ func (m *MsgMhfSaveScenarioData) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfSaveScenarioData) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.DataSize = bf.ReadUint32()
|
||||
m.RawDataPayload = bf.ReadBytes(uint(m.DataSize))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfSaveScenarioData) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,14 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfSavedata represents the MSG_MHF_SAVEDATA
|
||||
type MsgMhfSavedata struct{}
|
||||
type MsgMhfSavedata struct {
|
||||
AckHandle uint32
|
||||
AllocMemSize uint32
|
||||
Unk0 uint8 // Either 1 or 2, representing a true or false value for some reason.
|
||||
Unk1 uint32
|
||||
DataSize uint32
|
||||
RawDataPayload []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfSavedata) Opcode() network.PacketID {
|
||||
@@ -15,10 +22,16 @@ func (m *MsgMhfSavedata) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfSavedata) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.AllocMemSize = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
m.Unk1 = bf.ReadUint32()
|
||||
m.DataSize = bf.ReadUint32()
|
||||
m.RawDataPayload = bf.ReadBytes(uint(m.DataSize))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfSavedata) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,11 @@ import (
|
||||
)
|
||||
|
||||
// MsgMhfSetEnhancedMinidata represents the MSG_MHF_SET_ENHANCED_MINIDATA
|
||||
type MsgMhfSetEnhancedMinidata struct{}
|
||||
type MsgMhfSetEnhancedMinidata struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16 // Hardcoded 4 in the binary.
|
||||
RawDataPayload []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfSetEnhancedMinidata) Opcode() network.PacketID {
|
||||
@@ -15,10 +19,13 @@ func (m *MsgMhfSetEnhancedMinidata) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfSetEnhancedMinidata) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.RawDataPayload = bf.ReadBytes(0x400)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfSetEnhancedMinidata) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,7 @@ import (
|
||||
// MsgSysAck represents the MSG_SYS_ACK
|
||||
type MsgSysAck struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint32
|
||||
Unk1 uint32
|
||||
AckData []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -20,16 +19,12 @@ func (m *MsgSysAck) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysAck) Parse(bf *byteframe.ByteFrame) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint32()
|
||||
m.Unk1 = bf.ReadUint32()
|
||||
|
||||
return nil
|
||||
panic("No way to parse without prior context as the packet doesn't include it's own length.")
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgSysAck) Build(bf *byteframe.ByteFrame) error {
|
||||
bf.WriteUint32(m.AckHandle)
|
||||
bf.WriteUint32(m.Unk0)
|
||||
bf.WriteUint32(m.Unk1)
|
||||
bf.WriteBytes(m.AckData)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -6,7 +6,13 @@ import (
|
||||
)
|
||||
|
||||
// MsgSysCastBinary represents the MSG_SYS_CAST_BINARY
|
||||
type MsgSysCastBinary struct{}
|
||||
type MsgSysCastBinary struct {
|
||||
Unk0 uint16
|
||||
Unk1 uint16
|
||||
Type0 uint8
|
||||
Type1 uint8
|
||||
RawDataPayload []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgSysCastBinary) Opcode() network.PacketID {
|
||||
@@ -15,10 +21,16 @@ func (m *MsgSysCastBinary) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysCastBinary) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
m.Type0 = bf.ReadUint8()
|
||||
m.Type1 = bf.ReadUint8()
|
||||
dataSize := bf.ReadUint16()
|
||||
m.RawDataPayload = bf.ReadBytes(uint(dataSize))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgSysCastBinary) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,12 @@ import (
|
||||
)
|
||||
|
||||
// MsgSysCastedBinary represents the MSG_SYS_CASTED_BINARY
|
||||
type MsgSysCastedBinary struct{}
|
||||
type MsgSysCastedBinary struct {
|
||||
CharID uint32
|
||||
Type0 uint8
|
||||
Type1 uint8
|
||||
RawDataPayload []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgSysCastedBinary) Opcode() network.PacketID {
|
||||
@@ -20,5 +25,10 @@ func (m *MsgSysCastedBinary) Parse(bf *byteframe.ByteFrame) error {
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgSysCastedBinary) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
bf.WriteUint32(m.CharID)
|
||||
bf.WriteUint8(m.Type0)
|
||||
bf.WriteUint8(m.Type0)
|
||||
bf.WriteUint16(uint16(len(m.RawDataPayload)))
|
||||
bf.WriteBytes(m.RawDataPayload)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -6,7 +6,11 @@ import (
|
||||
)
|
||||
|
||||
// MsgSysCreateObject represents the MSG_SYS_CREATE_OBJECT
|
||||
type MsgSysCreateObject struct{}
|
||||
type MsgSysCreateObject struct {
|
||||
AckHandle uint32
|
||||
X, Y, Z float32
|
||||
Unk0 uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgSysCreateObject) Opcode() network.PacketID {
|
||||
@@ -15,10 +19,15 @@ func (m *MsgSysCreateObject) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysCreateObject) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.X = bf.ReadFloat32()
|
||||
m.Y = bf.ReadFloat32()
|
||||
m.Z = bf.ReadFloat32()
|
||||
m.Unk0 = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgSysCreateObject) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,10 +15,12 @@ func (m *MsgSysEnd) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysEnd) Parse(bf *byteframe.ByteFrame) error {
|
||||
// No data aside from opcode.
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgSysEnd) Build(bf *byteframe.ByteFrame) error {
|
||||
// No data aside from opcode.
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -6,7 +6,12 @@ import (
|
||||
)
|
||||
|
||||
// MsgSysEnterStage represents the MSG_SYS_ENTER_STAGE
|
||||
type MsgSysEnterStage struct{}
|
||||
type MsgSysEnterStage struct {
|
||||
AckHandle uint32
|
||||
UnkBool uint8
|
||||
StageIDLength uint8
|
||||
StageID []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgSysEnterStage) Opcode() network.PacketID {
|
||||
@@ -15,10 +20,14 @@ func (m *MsgSysEnterStage) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysEnterStage) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.UnkBool = bf.ReadUint8()
|
||||
m.StageIDLength = bf.ReadUint8()
|
||||
m.StageID = bf.ReadBytes(uint(m.StageIDLength))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgSysEnterStage) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,10 +15,12 @@ func (m *MsgSysExtendThreshold) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysExtendThreshold) Parse(bf *byteframe.ByteFrame) error {
|
||||
// No data aside from opcode.
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgSysExtendThreshold) Build(bf *byteframe.ByteFrame) error {
|
||||
// No data aside from opcode.
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -6,7 +6,11 @@ import (
|
||||
)
|
||||
|
||||
// MsgSysHideClient represents the MSG_SYS_HIDE_CLIENT
|
||||
type MsgSysHideClient struct{}
|
||||
type MsgSysHideClient struct{
|
||||
Hide bool
|
||||
Unk0 uint16 // Hardcoded 0 in binary
|
||||
Unk1 uint8 // Hardcoded 0 in binary
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgSysHideClient) Opcode() network.PacketID {
|
||||
@@ -15,7 +19,10 @@ func (m *MsgSysHideClient) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysHideClient) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.Hide = bf.ReadBool()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint8()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
|
||||
@@ -15,10 +15,12 @@ func (m *MsgSysNop) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysNop) Parse(bf *byteframe.ByteFrame) error {
|
||||
// No data aside from opcode.
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgSysNop) Build(bf *byteframe.ByteFrame) error {
|
||||
// No data aside from opcode.
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
// MsgSysPing represents the MSG_SYS_PING
|
||||
type MsgSysPing struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -19,13 +18,11 @@ func (m *MsgSysPing) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysPing) Parse(bf *byteframe.ByteFrame) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgSysPing) Build(bf *byteframe.ByteFrame) error {
|
||||
bf.WriteUint32(m.AckHandle)
|
||||
bf.WriteUint16(m.Unk0)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -6,7 +6,10 @@ import (
|
||||
)
|
||||
|
||||
// MsgSysPositionObject represents the MSG_SYS_POSITION_OBJECT
|
||||
type MsgSysPositionObject struct{}
|
||||
type MsgSysPositionObject struct{
|
||||
ObjID uint32
|
||||
X, Y, Z float32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgSysPositionObject) Opcode() network.PacketID {
|
||||
@@ -15,7 +18,11 @@ func (m *MsgSysPositionObject) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysPositionObject) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.ObjID = bf.ReadUint32()
|
||||
m.X = bf.ReadFloat32()
|
||||
m.Y = bf.ReadFloat32()
|
||||
m.Z = bf.ReadFloat32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgSysReserve188 represents the MSG_SYS_reserve188
|
||||
type MsgSysReserve188 struct{}
|
||||
type MsgSysReserve188 struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgSysReserve188) Opcode() network.PacketID {
|
||||
@@ -15,10 +17,11 @@ func (m *MsgSysReserve188) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysReserve188) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgSysReserve188) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
)
|
||||
|
||||
// MsgSysReserve18B represents the MSG_SYS_reserve18B
|
||||
type MsgSysReserve18B struct{}
|
||||
type MsgSysReserve18B struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgSysReserve18B) Opcode() network.PacketID {
|
||||
@@ -15,10 +17,11 @@ func (m *MsgSysReserve18B) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysReserve18B) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgSysReserve18B) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,11 @@ import (
|
||||
)
|
||||
|
||||
// MsgSysSetObjectBinary represents the MSG_SYS_SET_OBJECT_BINARY
|
||||
type MsgSysSetObjectBinary struct{}
|
||||
type MsgSysSetObjectBinary struct {
|
||||
ObjID uint32
|
||||
DataSize uint16
|
||||
RawDataPayload []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgSysSetObjectBinary) Opcode() network.PacketID {
|
||||
@@ -15,10 +19,13 @@ func (m *MsgSysSetObjectBinary) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysSetObjectBinary) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.ObjID = bf.ReadUint32()
|
||||
m.DataSize = bf.ReadUint16()
|
||||
m.RawDataPayload = bf.ReadBytes(uint(m.DataSize))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgSysSetObjectBinary) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,11 @@ import (
|
||||
)
|
||||
|
||||
// MsgSysSetUserBinary represents the MSG_SYS_SET_USER_BINARY
|
||||
type MsgSysSetUserBinary struct{}
|
||||
type MsgSysSetUserBinary struct {
|
||||
BinaryType uint8
|
||||
DataSize uint16
|
||||
RawDataPayload []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgSysSetUserBinary) Opcode() network.PacketID {
|
||||
@@ -15,10 +19,13 @@ func (m *MsgSysSetUserBinary) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysSetUserBinary) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.BinaryType = bf.ReadUint8()
|
||||
m.DataSize = bf.ReadUint16()
|
||||
m.RawDataPayload = bf.ReadBytes(uint(m.DataSize))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgSysSetUserBinary) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,20 @@ import (
|
||||
"github.com/Andoryuuta/byteframe"
|
||||
)
|
||||
|
||||
// TerminalLogEntry represents an entry in the MSG_SYS_TERMINAL_LOG packet.
|
||||
type TerminalLogEntry struct {
|
||||
// Unknown fields
|
||||
U0, U1, U2, U3, U4, U5, U6, U7, U8 uint32
|
||||
}
|
||||
|
||||
// MsgSysTerminalLog represents the MSG_SYS_TERMINAL_LOG
|
||||
type MsgSysTerminalLog struct{}
|
||||
type MsgSysTerminalLog struct {
|
||||
AckHandle uint32
|
||||
LogID uint32 // 0 on the first packet, and the server sends back a value to use for subsequent requests.
|
||||
EntryCount uint16
|
||||
Unk0 uint16 // Hardcoded 0 in the binary
|
||||
Entries []*TerminalLogEntry
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgSysTerminalLog) Opcode() network.PacketID {
|
||||
@@ -15,10 +27,29 @@ func (m *MsgSysTerminalLog) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysTerminalLog) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.LogID = bf.ReadUint32()
|
||||
m.EntryCount = bf.ReadUint16()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
|
||||
for i := 0; i < int(m.EntryCount); i++ {
|
||||
e := &TerminalLogEntry{}
|
||||
e.U0 = bf.ReadUint32()
|
||||
e.U1 = bf.ReadUint32()
|
||||
e.U2 = bf.ReadUint32()
|
||||
e.U3 = bf.ReadUint32()
|
||||
e.U4 = bf.ReadUint32()
|
||||
e.U5 = bf.ReadUint32()
|
||||
e.U6 = bf.ReadUint32()
|
||||
e.U7 = bf.ReadUint32()
|
||||
e.U8 = bf.ReadUint32()
|
||||
m.Entries = append(m.Entries, e)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgSysTerminalLog) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
|
||||
// MsgSysTime represents the MSG_SYS_TIME
|
||||
type MsgSysTime struct {
|
||||
Unk0 uint8
|
||||
Timestamp uint32 // unix timestamp, e.g. 1577105879
|
||||
GetRemoteTime bool // Ask the other end to send it's time as well.
|
||||
Timestamp uint32 // Unix timestamp, e.g. 1577105879
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -18,14 +18,14 @@ func (m *MsgSysTime) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysTime) Parse(bf *byteframe.ByteFrame) error {
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
m.GetRemoteTime = bf.ReadBool()
|
||||
m.Timestamp = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgSysTime) Build(bf *byteframe.ByteFrame) error {
|
||||
bf.WriteUint8(m.Unk0)
|
||||
bf.WriteBool(m.GetRemoteTime)
|
||||
bf.WriteUint32(m.Timestamp)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -5,8 +5,41 @@ import (
|
||||
"github.com/Andoryuuta/byteframe"
|
||||
)
|
||||
|
||||
/*
|
||||
00 58 // Opcode
|
||||
|
||||
00 00 00 00
|
||||
00 00 00 4e
|
||||
|
||||
00 04 // Count
|
||||
00 00 // Skipped(padding?)
|
||||
|
||||
00 01 00 00 00 00 00 00
|
||||
00 02 00 00 5d fa 14 c0
|
||||
00 03 00 00 5d fa 14 c0
|
||||
00 06 00 00 5d e7 05 10
|
||||
|
||||
00 00 // Count of some buf up to 0x800 bytes following it.
|
||||
|
||||
00 10 // Trailer
|
||||
*/
|
||||
|
||||
// ClientRight represents a right that the client has.
|
||||
type ClientRight struct {
|
||||
ID uint16
|
||||
Unk0 uint16
|
||||
Timestamp uint32
|
||||
}
|
||||
|
||||
// MsgSysUpdateRight represents the MSG_SYS_UPDATE_RIGHT
|
||||
type MsgSysUpdateRight struct{}
|
||||
type MsgSysUpdateRight struct {
|
||||
Unk0 uint32
|
||||
Unk1 uint32
|
||||
//RightCount uint16
|
||||
//Unk3 uint16 // Likely struct padding
|
||||
Rights []ClientRight
|
||||
UnkSize uint16 // Count of some buf up to 0x800 bytes following it.
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgSysUpdateRight) Opcode() network.PacketID {
|
||||
@@ -20,5 +53,15 @@ func (m *MsgSysUpdateRight) Parse(bf *byteframe.ByteFrame) error {
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgSysUpdateRight) Build(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
}
|
||||
bf.WriteUint32(m.Unk0)
|
||||
bf.WriteUint32(m.Unk1)
|
||||
bf.WriteUint16(uint16(len(m.Rights)))
|
||||
bf.WriteUint16(0) // m.Unk3, struct padding.
|
||||
for _, v := range m.Rights {
|
||||
bf.WriteUint16(v.ID)
|
||||
bf.WriteUint16(v.Unk0)
|
||||
bf.WriteUint32(v.Timestamp)
|
||||
}
|
||||
bf.WriteUint16(m.UnkSize)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user