mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-04-01 05:23:13 +02:00
@@ -7,7 +7,9 @@ import (
|
|||||||
|
|
||||||
// MsgMhfAddAchievement represents the MSG_MHF_ADD_ACHIEVEMENT
|
// MsgMhfAddAchievement represents the MSG_MHF_ADD_ACHIEVEMENT
|
||||||
type MsgMhfAddAchievement struct {
|
type MsgMhfAddAchievement struct {
|
||||||
Unk0 []byte
|
Unk0 uint8
|
||||||
|
Unk1 uint16
|
||||||
|
Unk2 uint16
|
||||||
}
|
}
|
||||||
|
|
||||||
// Opcode returns the ID associated with this packet type.
|
// Opcode returns the ID associated with this packet type.
|
||||||
@@ -17,7 +19,9 @@ func (m *MsgMhfAddAchievement) Opcode() network.PacketID {
|
|||||||
|
|
||||||
// Parse parses the packet from binary
|
// Parse parses the packet from binary
|
||||||
func (m *MsgMhfAddAchievement) Parse(bf *byteframe.ByteFrame) error {
|
func (m *MsgMhfAddAchievement) Parse(bf *byteframe.ByteFrame) error {
|
||||||
m.Unk0 = bf.ReadBytes(5)
|
m.Unk0 = bf.ReadUint8()
|
||||||
|
m.Unk1 = bf.ReadUint16()
|
||||||
|
m.Unk2 = bf.ReadUint16()
|
||||||
// doesn't expect a response
|
// doesn't expect a response
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ func (m *MsgMhfAddKouryouPoint) Opcode() network.PacketID {
|
|||||||
func (m *MsgMhfAddKouryouPoint) Parse(bf *byteframe.ByteFrame) error {
|
func (m *MsgMhfAddKouryouPoint) Parse(bf *byteframe.ByteFrame) error {
|
||||||
m.AckHandle = bf.ReadUint32()
|
m.AckHandle = bf.ReadUint32()
|
||||||
m.KouryouPoints = bf.ReadUint32()
|
m.KouryouPoints = bf.ReadUint32()
|
||||||
return nil;
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build builds a binary packet from the current data.
|
// Build builds a binary packet from the current data.
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ import (
|
|||||||
// MsgMhfEnumerateGuacot represents the MSG_MHF_ENUMERATE_GUACOT
|
// MsgMhfEnumerateGuacot represents the MSG_MHF_ENUMERATE_GUACOT
|
||||||
type MsgMhfEnumerateGuacot struct {
|
type MsgMhfEnumerateGuacot struct {
|
||||||
AckHandle uint32
|
AckHandle uint32
|
||||||
|
Unk0 uint16 // Hardcoded 0 in binary
|
||||||
|
Unk1 uint16 // Hardcoded 0 in binary
|
||||||
|
Unk2 uint16 // Hardcoded 0 in binary
|
||||||
}
|
}
|
||||||
|
|
||||||
// Opcode returns the ID associated with this packet type.
|
// Opcode returns the ID associated with this packet type.
|
||||||
@@ -18,6 +21,9 @@ func (m *MsgMhfEnumerateGuacot) Opcode() network.PacketID {
|
|||||||
// Parse parses the packet from binary
|
// Parse parses the packet from binary
|
||||||
func (m *MsgMhfEnumerateGuacot) Parse(bf *byteframe.ByteFrame) error {
|
func (m *MsgMhfEnumerateGuacot) Parse(bf *byteframe.ByteFrame) error {
|
||||||
m.AckHandle = bf.ReadUint32()
|
m.AckHandle = bf.ReadUint32()
|
||||||
|
m.Unk0 = bf.ReadUint16()
|
||||||
|
m.Unk1 = bf.ReadUint16()
|
||||||
|
m.Unk2 = bf.ReadUint16()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ import (
|
|||||||
// MsgMhfEnumerateRengokuRanking represents the MSG_MHF_ENUMERATE_RENGOKU_RANKING
|
// MsgMhfEnumerateRengokuRanking represents the MSG_MHF_ENUMERATE_RENGOKU_RANKING
|
||||||
type MsgMhfEnumerateRengokuRanking struct {
|
type MsgMhfEnumerateRengokuRanking struct {
|
||||||
AckHandle uint32
|
AckHandle uint32
|
||||||
|
Unk0 uint32
|
||||||
|
Unk1 uint16 // Hardcoded 0 in the binary
|
||||||
|
Unk2 uint16 // Hardcoded 00 01 in the binary
|
||||||
}
|
}
|
||||||
|
|
||||||
// Opcode returns the ID associated with this packet type.
|
// Opcode returns the ID associated with this packet type.
|
||||||
@@ -18,7 +21,10 @@ func (m *MsgMhfEnumerateRengokuRanking) Opcode() network.PacketID {
|
|||||||
// Parse parses the packet from binary
|
// Parse parses the packet from binary
|
||||||
func (m *MsgMhfEnumerateRengokuRanking) Parse(bf *byteframe.ByteFrame) error {
|
func (m *MsgMhfEnumerateRengokuRanking) Parse(bf *byteframe.ByteFrame) error {
|
||||||
m.AckHandle = bf.ReadUint32()
|
m.AckHandle = bf.ReadUint32()
|
||||||
return nil;
|
m.Unk0 = bf.ReadUint32()
|
||||||
|
m.Unk1 = bf.ReadUint16()
|
||||||
|
m.Unk2 = bf.ReadUint16()
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build builds a binary packet from the current data.
|
// Build builds a binary packet from the current data.
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import (
|
|||||||
|
|
||||||
// MsgMhfGetAdditionalBeatReward represents the MSG_MHF_GET_ADDITIONAL_BEAT_REWARD
|
// MsgMhfGetAdditionalBeatReward represents the MSG_MHF_GET_ADDITIONAL_BEAT_REWARD
|
||||||
type MsgMhfGetAdditionalBeatReward struct {
|
type MsgMhfGetAdditionalBeatReward struct {
|
||||||
|
// Communicator type, multi-format. This might be valid for only one type.
|
||||||
AckHandle uint32
|
AckHandle uint32
|
||||||
Unk0 uint32
|
Unk0 uint32
|
||||||
Unk1 uint32
|
Unk1 uint32
|
||||||
|
|||||||
@@ -9,7 +9,10 @@ import (
|
|||||||
type MsgMhfGetMyhouseInfo struct {
|
type MsgMhfGetMyhouseInfo struct {
|
||||||
AckHandle uint32
|
AckHandle uint32
|
||||||
Unk0 uint32
|
Unk0 uint32
|
||||||
Unk1 uint16
|
|
||||||
|
// No idea why it would send a buffer of data on a _GET_, but w/e.
|
||||||
|
DataSize uint8
|
||||||
|
RawDataPayload []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
// Opcode returns the ID associated with this packet type.
|
// Opcode returns the ID associated with this packet type.
|
||||||
@@ -21,7 +24,8 @@ func (m *MsgMhfGetMyhouseInfo) Opcode() network.PacketID {
|
|||||||
func (m *MsgMhfGetMyhouseInfo) Parse(bf *byteframe.ByteFrame) error {
|
func (m *MsgMhfGetMyhouseInfo) Parse(bf *byteframe.ByteFrame) error {
|
||||||
m.AckHandle = bf.ReadUint32()
|
m.AckHandle = bf.ReadUint32()
|
||||||
m.Unk0 = bf.ReadUint32()
|
m.Unk0 = bf.ReadUint32()
|
||||||
m.Unk1 = bf.ReadUint16()
|
m.DataSize = bf.ReadUint8()
|
||||||
|
m.RawDataPayload = bf.ReadBytes(uint(m.DataSize))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import (
|
|||||||
|
|
||||||
// MsgMhfGetPaperData represents the MSG_MHF_GET_PAPER_DATA
|
// MsgMhfGetPaperData represents the MSG_MHF_GET_PAPER_DATA
|
||||||
type MsgMhfGetPaperData struct {
|
type MsgMhfGetPaperData struct {
|
||||||
|
// Communicator type, multi-format. This might be valid for only one type.
|
||||||
AckHandle uint32
|
AckHandle uint32
|
||||||
Unk0 uint32
|
Unk0 uint32
|
||||||
Unk1 uint32
|
Unk1 uint32
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
// MsgMhfGetRengokuBinary represents the MSG_MHF_GET_RENGOKU_BINARY
|
// MsgMhfGetRengokuBinary represents the MSG_MHF_GET_RENGOKU_BINARY
|
||||||
type MsgMhfGetRengokuBinary struct {
|
type MsgMhfGetRengokuBinary struct {
|
||||||
AckHandle uint32
|
AckHandle uint32
|
||||||
Unk0 uint8
|
Unk0 uint8 // Hardcoded 0 in binary
|
||||||
}
|
}
|
||||||
|
|
||||||
// Opcode returns the ID associated with this packet type.
|
// Opcode returns the ID associated with this packet type.
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import (
|
|||||||
|
|
||||||
// MsgMhfGetSeibattle represents the MSG_MHF_GET_SEIBATTLE
|
// MsgMhfGetSeibattle represents the MSG_MHF_GET_SEIBATTLE
|
||||||
type MsgMhfGetSeibattle struct {
|
type MsgMhfGetSeibattle struct {
|
||||||
|
// Communicator type, multi-format. This might be valid for only one type.
|
||||||
AckHandle uint32
|
AckHandle uint32
|
||||||
Unk0 uint8
|
Unk0 uint8
|
||||||
Unk1 uint8
|
Unk1 uint8
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ import (
|
|||||||
|
|
||||||
// MsgMhfGetTenrouirai represents the MSG_MHF_GET_TENROUIRAI
|
// MsgMhfGetTenrouirai represents the MSG_MHF_GET_TENROUIRAI
|
||||||
type MsgMhfGetTenrouirai struct {
|
type MsgMhfGetTenrouirai struct {
|
||||||
|
// Communicator type, multi-format. This might be valid for only one type.
|
||||||
AckHandle uint32
|
AckHandle uint32
|
||||||
Unk0 uint16
|
Unk0 uint16
|
||||||
Unk1 uint32
|
Unk1 uint32
|
||||||
Unk2 uint16
|
Unk2 uint16
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Opcode returns the ID associated with this packet type.
|
// Opcode returns the ID associated with this packet type.
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import (
|
|||||||
|
|
||||||
// MsgMhfGetTinyBin represents the MSG_MHF_GET_TINY_BIN
|
// MsgMhfGetTinyBin represents the MSG_MHF_GET_TINY_BIN
|
||||||
type MsgMhfGetTinyBin struct {
|
type MsgMhfGetTinyBin struct {
|
||||||
|
// Communicator type, multi-format. This might be valid for only one type.
|
||||||
AckHandle uint32
|
AckHandle uint32
|
||||||
Unk0 uint16
|
Unk0 uint16
|
||||||
Unk1 uint8
|
Unk1 uint8
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ const (
|
|||||||
|
|
||||||
// MsgMhfGetTowerInfo represents the MSG_MHF_GET_TOWER_INFO
|
// MsgMhfGetTowerInfo represents the MSG_MHF_GET_TOWER_INFO
|
||||||
type MsgMhfGetTowerInfo struct {
|
type MsgMhfGetTowerInfo struct {
|
||||||
|
// Communicator type, multi-format. This might be valid for only one type.
|
||||||
AckHandle uint32
|
AckHandle uint32
|
||||||
InfoType uint32 // Requested response type
|
InfoType uint32 // Requested response type
|
||||||
Unk0 uint32
|
Unk0 uint32
|
||||||
|
|||||||
@@ -8,10 +8,12 @@ import (
|
|||||||
// MsgMhfLoadHouse represents the MSG_MHF_LOAD_HOUSE
|
// MsgMhfLoadHouse represents the MSG_MHF_LOAD_HOUSE
|
||||||
type MsgMhfLoadHouse struct {
|
type MsgMhfLoadHouse struct {
|
||||||
AckHandle uint32
|
AckHandle uint32
|
||||||
Unk0 uint8
|
Unk0 uint32
|
||||||
Unk1 uint32
|
Unk1 uint8
|
||||||
Unk2 uint8
|
Unk2 uint8
|
||||||
Unk3 uint32
|
Unk3 uint16 // Hardcoded 0 in binary
|
||||||
|
DataSize uint8
|
||||||
|
RawDataPayload []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
// Opcode returns the ID associated with this packet type.
|
// Opcode returns the ID associated with this packet type.
|
||||||
@@ -22,10 +24,12 @@ func (m *MsgMhfLoadHouse) Opcode() network.PacketID {
|
|||||||
// Parse parses the packet from binary
|
// Parse parses the packet from binary
|
||||||
func (m *MsgMhfLoadHouse) Parse(bf *byteframe.ByteFrame) error {
|
func (m *MsgMhfLoadHouse) Parse(bf *byteframe.ByteFrame) error {
|
||||||
m.AckHandle = bf.ReadUint32()
|
m.AckHandle = bf.ReadUint32()
|
||||||
m.Unk0 = bf.ReadUint8()
|
m.Unk0 = bf.ReadUint32()
|
||||||
m.Unk1 = bf.ReadUint32()
|
m.Unk1 = bf.ReadUint8()
|
||||||
m.Unk2 = bf.ReadUint8()
|
m.Unk2 = bf.ReadUint8()
|
||||||
m.Unk3 = bf.ReadUint32()
|
m.Unk3 = bf.ReadUint16()
|
||||||
|
m.DataSize = bf.ReadUint8()
|
||||||
|
m.RawDataPayload = bf.ReadBytes(uint(m.DataSize))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import (
|
|||||||
|
|
||||||
// MsgMhfPostTowerInfo represents the MSG_MHF_POST_TOWER_INFO
|
// MsgMhfPostTowerInfo represents the MSG_MHF_POST_TOWER_INFO
|
||||||
type MsgMhfPostTowerInfo struct {
|
type MsgMhfPostTowerInfo struct {
|
||||||
|
// Communicator type, multi-format. This might be valid for only one type.
|
||||||
AckHandle uint32
|
AckHandle uint32
|
||||||
Unk0 uint32
|
Unk0 uint32
|
||||||
Unk1 uint32
|
Unk1 uint32
|
||||||
|
|||||||
@@ -7,16 +7,18 @@ import (
|
|||||||
|
|
||||||
// MsgMhfStampcardStamp represents the MSG_MHF_STAMPCARD_STAMP
|
// MsgMhfStampcardStamp represents the MSG_MHF_STAMPCARD_STAMP
|
||||||
type MsgMhfStampcardStamp struct {
|
type MsgMhfStampcardStamp struct {
|
||||||
// probably not actual format, just lined up neatly to an example packet
|
// Field-size accurate.
|
||||||
AckHandle uint32
|
AckHandle uint32
|
||||||
Unk0 uint32
|
Unk0 uint16
|
||||||
Unk1 uint32
|
Unk1 uint16
|
||||||
Unk2 uint32
|
Unk2 uint16
|
||||||
Unk3 uint32
|
Unk3 uint16 // Hardcoded 0 in binary
|
||||||
Unk4 uint32
|
Unk4 uint32
|
||||||
Unk5 uint32
|
Unk5 uint32
|
||||||
Unk6 uint32
|
Unk6 uint32
|
||||||
Unk7 uint32
|
Unk7 uint32
|
||||||
|
Unk8 uint32
|
||||||
|
Unk9 uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
// Opcode returns the ID associated with this packet type.
|
// Opcode returns the ID associated with this packet type.
|
||||||
@@ -27,14 +29,16 @@ func (m *MsgMhfStampcardStamp) Opcode() network.PacketID {
|
|||||||
// Parse parses the packet from binary
|
// Parse parses the packet from binary
|
||||||
func (m *MsgMhfStampcardStamp) Parse(bf *byteframe.ByteFrame) error {
|
func (m *MsgMhfStampcardStamp) Parse(bf *byteframe.ByteFrame) error {
|
||||||
m.AckHandle = bf.ReadUint32()
|
m.AckHandle = bf.ReadUint32()
|
||||||
m.Unk0 = bf.ReadUint32()
|
m.Unk0 = bf.ReadUint16()
|
||||||
m.Unk1 = bf.ReadUint32()
|
m.Unk1 = bf.ReadUint16()
|
||||||
m.Unk2 = bf.ReadUint32()
|
m.Unk2 = bf.ReadUint16()
|
||||||
m.Unk3 = bf.ReadUint32()
|
m.Unk3 = bf.ReadUint16()
|
||||||
m.Unk4 = bf.ReadUint32()
|
m.Unk4 = bf.ReadUint32()
|
||||||
m.Unk5 = bf.ReadUint32()
|
m.Unk5 = bf.ReadUint32()
|
||||||
m.Unk6 = bf.ReadUint32()
|
m.Unk6 = bf.ReadUint32()
|
||||||
m.Unk7 = bf.ReadUint32()
|
m.Unk7 = bf.ReadUint32()
|
||||||
|
m.Unk8 = bf.ReadUint32()
|
||||||
|
m.Unk9 = bf.ReadUint32()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ type MsgMhfTransferItem struct{
|
|||||||
// correlate with any item IDs that would make sense to get after quests so
|
// correlate with any item IDs that would make sense to get after quests so
|
||||||
// I have no idea what this actually does
|
// I have no idea what this actually does
|
||||||
Unk0 uint32
|
Unk0 uint32
|
||||||
Unk1 uint32
|
Unk1 uint16 // Hardcoded
|
||||||
|
Unk2 uint16 // Hardcoded
|
||||||
}
|
}
|
||||||
|
|
||||||
// Opcode returns the ID associated with this packet type.
|
// Opcode returns the ID associated with this packet type.
|
||||||
@@ -24,7 +25,8 @@ func (m *MsgMhfTransferItem) Opcode() network.PacketID {
|
|||||||
func (m *MsgMhfTransferItem) Parse(bf *byteframe.ByteFrame) error {
|
func (m *MsgMhfTransferItem) Parse(bf *byteframe.ByteFrame) error {
|
||||||
m.AckHandle = bf.ReadUint32()
|
m.AckHandle = bf.ReadUint32()
|
||||||
m.Unk0 = bf.ReadUint32()
|
m.Unk0 = bf.ReadUint32()
|
||||||
m.Unk1 = bf.ReadUint32()
|
m.Unk1 = bf.ReadUint16()
|
||||||
|
m.Unk2 = bf.ReadUint16()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ import (
|
|||||||
// MsgMhfUpdateCafepoint represents the MSG_MHF_UPDATE_CAFEPOINT
|
// MsgMhfUpdateCafepoint represents the MSG_MHF_UPDATE_CAFEPOINT
|
||||||
type MsgMhfUpdateCafepoint struct {
|
type MsgMhfUpdateCafepoint struct {
|
||||||
AckHandle uint32
|
AckHandle uint32
|
||||||
Unk0 uint32
|
Unk0 uint16 // Hardcoded 0 in binary
|
||||||
|
Unk1 uint16 // Hardcoded 0 in binary
|
||||||
}
|
}
|
||||||
|
|
||||||
// Opcode returns the ID associated with this packet type.
|
// Opcode returns the ID associated with this packet type.
|
||||||
@@ -19,7 +20,8 @@ func (m *MsgMhfUpdateCafepoint) Opcode() network.PacketID {
|
|||||||
// Parse parses the packet from binary
|
// Parse parses the packet from binary
|
||||||
func (m *MsgMhfUpdateCafepoint) Parse(bf *byteframe.ByteFrame) error {
|
func (m *MsgMhfUpdateCafepoint) Parse(bf *byteframe.ByteFrame) error {
|
||||||
m.AckHandle = bf.ReadUint32()
|
m.AckHandle = bf.ReadUint32()
|
||||||
m.Unk0 = bf.ReadUint32()
|
m.Unk0 = bf.ReadUint16()
|
||||||
|
m.Unk1 = bf.ReadUint16()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import (
|
|||||||
// MsgMhfUpdateEquipSkinHist represents the MSG_MHF_UPDATE_EQUIP_SKIN_HIST
|
// MsgMhfUpdateEquipSkinHist represents the MSG_MHF_UPDATE_EQUIP_SKIN_HIST
|
||||||
type MsgMhfUpdateEquipSkinHist struct {
|
type MsgMhfUpdateEquipSkinHist struct {
|
||||||
AckHandle uint32
|
AckHandle uint32
|
||||||
|
Unk0 uint8
|
||||||
|
Unk1 uint16
|
||||||
}
|
}
|
||||||
|
|
||||||
// Opcode returns the ID associated with this packet type.
|
// Opcode returns the ID associated with this packet type.
|
||||||
@@ -18,6 +20,8 @@ func (m *MsgMhfUpdateEquipSkinHist) Opcode() network.PacketID {
|
|||||||
// Parse parses the packet from binary
|
// Parse parses the packet from binary
|
||||||
func (m *MsgMhfUpdateEquipSkinHist) Parse(bf *byteframe.ByteFrame) error {
|
func (m *MsgMhfUpdateEquipSkinHist) Parse(bf *byteframe.ByteFrame) error {
|
||||||
m.AckHandle = bf.ReadUint32()
|
m.AckHandle = bf.ReadUint32()
|
||||||
|
m.Unk0 = bf.ReadUint8()
|
||||||
|
m.Unk1 = bf.ReadUint16()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,43 @@ import (
|
|||||||
"github.com/Andoryuuta/byteframe"
|
"github.com/Andoryuuta/byteframe"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// GuacotUpdateEntry represents an entry inside the MsgMhfUpdateGuacot packet.
|
||||||
|
type GuacotUpdateEntry struct {
|
||||||
|
Unk0 uint32
|
||||||
|
Unk1 uint16
|
||||||
|
Unk2 uint16
|
||||||
|
Unk3 uint16
|
||||||
|
Unk4 uint16
|
||||||
|
Unk5 uint16
|
||||||
|
Unk6 uint16
|
||||||
|
Unk7 uint16
|
||||||
|
Unk8 uint16
|
||||||
|
Unk9 uint16
|
||||||
|
Unk10 uint16
|
||||||
|
Unk11 uint16
|
||||||
|
Unk12 uint16
|
||||||
|
Unk13 uint16
|
||||||
|
Unk14 uint16
|
||||||
|
Unk15 uint16
|
||||||
|
Unk16 uint16
|
||||||
|
Unk17 uint16
|
||||||
|
Unk18 uint16
|
||||||
|
Unk19 uint16
|
||||||
|
Unk20 uint16
|
||||||
|
Unk21 uint16
|
||||||
|
Unk22 uint16
|
||||||
|
Unk23 uint32
|
||||||
|
Unk24 uint32
|
||||||
|
DataSize uint8
|
||||||
|
RawDataPayload []byte
|
||||||
|
}
|
||||||
|
|
||||||
// MsgMhfUpdateGuacot represents the MSG_MHF_UPDATE_GUACOT
|
// MsgMhfUpdateGuacot represents the MSG_MHF_UPDATE_GUACOT
|
||||||
type MsgMhfUpdateGuacot struct {
|
type MsgMhfUpdateGuacot struct {
|
||||||
AckHandle uint32
|
AckHandle uint32
|
||||||
|
EntryCount uint16
|
||||||
|
Unk0 uint16 // Hardcoded 0 in binary
|
||||||
|
Entries []*GuacotUpdateEntry
|
||||||
}
|
}
|
||||||
|
|
||||||
// Opcode returns the ID associated with this packet type.
|
// Opcode returns the ID associated with this packet type.
|
||||||
@@ -18,6 +52,42 @@ func (m *MsgMhfUpdateGuacot) Opcode() network.PacketID {
|
|||||||
// Parse parses the packet from binary
|
// Parse parses the packet from binary
|
||||||
func (m *MsgMhfUpdateGuacot) Parse(bf *byteframe.ByteFrame) error {
|
func (m *MsgMhfUpdateGuacot) Parse(bf *byteframe.ByteFrame) error {
|
||||||
m.AckHandle = bf.ReadUint32()
|
m.AckHandle = bf.ReadUint32()
|
||||||
|
m.EntryCount = bf.ReadUint16()
|
||||||
|
m.Unk0 = bf.ReadUint16()
|
||||||
|
for i := 0; i < int(m.EntryCount); i++ {
|
||||||
|
// Yikes.
|
||||||
|
e := &GuacotUpdateEntry{}
|
||||||
|
|
||||||
|
e.Unk0 = bf.ReadUint32()
|
||||||
|
e.Unk1 = bf.ReadUint16()
|
||||||
|
e.Unk2 = bf.ReadUint16()
|
||||||
|
e.Unk3 = bf.ReadUint16()
|
||||||
|
e.Unk4 = bf.ReadUint16()
|
||||||
|
e.Unk5 = bf.ReadUint16()
|
||||||
|
e.Unk6 = bf.ReadUint16()
|
||||||
|
e.Unk7 = bf.ReadUint16()
|
||||||
|
e.Unk8 = bf.ReadUint16()
|
||||||
|
e.Unk9 = bf.ReadUint16()
|
||||||
|
e.Unk10 = bf.ReadUint16()
|
||||||
|
e.Unk11 = bf.ReadUint16()
|
||||||
|
e.Unk12 = bf.ReadUint16()
|
||||||
|
e.Unk13 = bf.ReadUint16()
|
||||||
|
e.Unk14 = bf.ReadUint16()
|
||||||
|
e.Unk15 = bf.ReadUint16()
|
||||||
|
e.Unk16 = bf.ReadUint16()
|
||||||
|
e.Unk17 = bf.ReadUint16()
|
||||||
|
e.Unk18 = bf.ReadUint16()
|
||||||
|
e.Unk19 = bf.ReadUint16()
|
||||||
|
e.Unk20 = bf.ReadUint16()
|
||||||
|
e.Unk21 = bf.ReadUint16()
|
||||||
|
e.Unk22 = bf.ReadUint16()
|
||||||
|
e.Unk23 = bf.ReadUint32()
|
||||||
|
e.Unk24 = bf.ReadUint32()
|
||||||
|
e.DataSize = bf.ReadUint8()
|
||||||
|
e.RawDataPayload = bf.ReadBytes(uint(e.DataSize))
|
||||||
|
|
||||||
|
m.Entries = append(m.Entries, e)
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
// MsgSysLogout represents the MSG_SYS_LOGOUT
|
// MsgSysLogout represents the MSG_SYS_LOGOUT
|
||||||
type MsgSysLogout struct {
|
type MsgSysLogout struct {
|
||||||
Unk0 uint8
|
Unk0 uint8 // Hardcoded 1 in binary
|
||||||
}
|
}
|
||||||
|
|
||||||
// Opcode returns the ID associated with this packet type.
|
// Opcode returns the ID associated with this packet type.
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"io"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@@ -60,7 +60,7 @@ func saveDataDiff(b []byte, save []byte) []byte {
|
|||||||
var seekBytes []byte
|
var seekBytes []byte
|
||||||
seekOperation := 0
|
seekOperation := 0
|
||||||
write := byte(0)
|
write := byte(0)
|
||||||
for(len(b) > 2){
|
for len(b) > 2 {
|
||||||
if bytes.IndexRune(b, 2) != 0 {
|
if bytes.IndexRune(b, 2) != 0 {
|
||||||
seekBytes = b[:bytes.IndexRune(b, 2)+1]
|
seekBytes = b[:bytes.IndexRune(b, 2)+1]
|
||||||
} else {
|
} else {
|
||||||
@@ -161,7 +161,7 @@ func saveCompress(rawData []byte) ([]byte, error) {
|
|||||||
}
|
}
|
||||||
nullCount++
|
nullCount++
|
||||||
|
|
||||||
if(nullCount == 255){
|
if nullCount == 255 {
|
||||||
output = append(output, []byte{0xFF, 0x00}...)
|
output = append(output, []byte{0xFF, 0x00}...)
|
||||||
nullCount = 0
|
nullCount = 0
|
||||||
}
|
}
|
||||||
@@ -174,7 +174,6 @@ func saveCompress(rawData []byte) ([]byte, error) {
|
|||||||
return output, nil
|
return output, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func updateRights(s *Session) {
|
func updateRights(s *Session) {
|
||||||
update := &mhfpacket.MsgSysUpdateRight{
|
update := &mhfpacket.MsgSysUpdateRight{
|
||||||
Unk0: 0,
|
Unk0: 0,
|
||||||
@@ -1891,7 +1890,7 @@ func handleMsgMhfLoadDecoMyset(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
} else {
|
} else {
|
||||||
// set first byte to 1 to avoid pop up every time without save
|
// set first byte to 1 to avoid pop up every time without save
|
||||||
body := make([]byte, 0x226)
|
body := make([]byte, 0x226)
|
||||||
body[0] = 1;
|
body[0] = 1
|
||||||
doSizedAckResp(s, pkt.AckHandle, body)
|
doSizedAckResp(s, pkt.AckHandle, body)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1907,11 +1906,15 @@ func handleMsgMhfSaveDecoMyset(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
} else {
|
} else {
|
||||||
numSets := bf.ReadUint8() // sets being written
|
numSets := bf.ReadUint8() // sets being written
|
||||||
// empty save
|
// empty save
|
||||||
if len(loadData) == 0{ loadData = []byte{0x01, 0x00} }
|
if len(loadData) == 0 {
|
||||||
|
loadData = []byte{0x01, 0x00}
|
||||||
|
}
|
||||||
|
|
||||||
savedSets := loadData[1] // existing saved sets
|
savedSets := loadData[1] // existing saved sets
|
||||||
// no sets, new slice with just first 2 bytes for appends later
|
// no sets, new slice with just first 2 bytes for appends later
|
||||||
if savedSets == 0{ loadData = []byte{0x01, 0x00} }
|
if savedSets == 0 {
|
||||||
|
loadData = []byte{0x01, 0x00}
|
||||||
|
}
|
||||||
for i := 0; i < int(numSets); i++ {
|
for i := 0; i < int(numSets); i++ {
|
||||||
writeSet := bf.ReadUint16()
|
writeSet := bf.ReadUint16()
|
||||||
dataChunk := bf.ReadBytes(76)
|
dataChunk := bf.ReadBytes(76)
|
||||||
@@ -1981,7 +1984,7 @@ func handleMsgMhfLoadHunterNavi(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
} else {
|
} else {
|
||||||
// set first byte to 1 to avoid pop up every time without save
|
// set first byte to 1 to avoid pop up every time without save
|
||||||
body := make([]byte, 0x226)
|
body := make([]byte, 0x226)
|
||||||
body[0] = 1;
|
body[0] = 1
|
||||||
doSizedAckResp(s, pkt.AckHandle, body)
|
doSizedAckResp(s, pkt.AckHandle, body)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2143,7 +2146,6 @@ func handleMsgMhfGetPaperData(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
doSizedAckResp(s, pkt.AckHandle, data)
|
doSizedAckResp(s, pkt.AckHandle, data)
|
||||||
// s.QueueAck(pkt.AckHandle, data)
|
// s.QueueAck(pkt.AckHandle, data)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleMsgMhfGetNotice(s *Session, p mhfpacket.MHFPacket) {}
|
func handleMsgMhfGetNotice(s *Session, p mhfpacket.MHFPacket) {}
|
||||||
|
|||||||
Reference in New Issue
Block a user