mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-22 15:43:49 +01:00
chore: apply gofmt formatting
This commit is contained in:
@@ -9,7 +9,8 @@
|
||||
// Packet Structure:
|
||||
//
|
||||
// MHF packets follow this wire format:
|
||||
// [2 bytes: Opcode][N bytes: Packet-specific data][2 bytes: Footer 0x00 0x10]
|
||||
//
|
||||
// [2 bytes: Opcode][N bytes: Packet-specific data][2 bytes: Footer 0x00 0x10]
|
||||
//
|
||||
// Each packet type defines its own structure matching the binary format expected
|
||||
// by the Monster Hunter Frontier client.
|
||||
|
||||
@@ -514,9 +514,9 @@ func TestMsgMhfUpdateEtcPointOpcode(t *testing.T) {
|
||||
// TestAchievementPacketParse tests simple achievement packet parsing
|
||||
func TestAchievementPacketParse(t *testing.T) {
|
||||
bf := byteframe.NewByteFrame()
|
||||
bf.WriteUint8(5) // AchievementID
|
||||
bf.WriteUint16(100) // Unk1
|
||||
bf.WriteUint16(200) // Unk2
|
||||
bf.WriteUint8(5) // AchievementID
|
||||
bf.WriteUint16(100) // Unk1
|
||||
bf.WriteUint16(200) // Unk2
|
||||
bf.Seek(0, io.SeekStart)
|
||||
|
||||
pkt := &MsgMhfAddAchievement{}
|
||||
|
||||
@@ -36,9 +36,9 @@ func TestMsgMhfGetAchievementDetailedParse(t *testing.T) {
|
||||
// TestMsgMhfAddAchievementDetailedParse tests MsgMhfAddAchievement parsing
|
||||
func TestMsgMhfAddAchievementDetailedParse(t *testing.T) {
|
||||
bf := byteframe.NewByteFrame()
|
||||
bf.WriteUint8(42) // AchievementID
|
||||
bf.WriteUint16(12345) // Unk1
|
||||
bf.WriteUint16(0xFFFF) // Unk2 - max value
|
||||
bf.WriteUint8(42) // AchievementID
|
||||
bf.WriteUint16(12345) // Unk1
|
||||
bf.WriteUint16(0xFFFF) // Unk2 - max value
|
||||
bf.Seek(0, io.SeekStart)
|
||||
|
||||
pkt := &MsgMhfAddAchievement{}
|
||||
@@ -61,12 +61,12 @@ func TestMsgMhfAddAchievementDetailedParse(t *testing.T) {
|
||||
// TestMsgSysCastBinaryDetailedParse tests MsgSysCastBinary parsing with various payloads
|
||||
func TestMsgSysCastBinaryDetailedParse(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
unk0 uint16
|
||||
unk1 uint16
|
||||
name string
|
||||
unk0 uint16
|
||||
unk1 uint16
|
||||
broadcastType uint8
|
||||
messageType uint8
|
||||
payload []byte
|
||||
payload []byte
|
||||
}{
|
||||
{"empty payload", 0, 0, 1, 2, []byte{}},
|
||||
{"typical payload", 100, 200, 0x10, 0x20, []byte{0x01, 0x02, 0x03}},
|
||||
|
||||
Reference in New Issue
Block a user