diff --git a/cmd/protbot/conn/crypt_conn_test.go b/cmd/protbot/conn/crypt_conn_test.go index 3c598e919..2baaacff2 100644 --- a/cmd/protbot/conn/crypt_conn_test.go +++ b/cmd/protbot/conn/crypt_conn_test.go @@ -58,9 +58,9 @@ func TestCryptPacketHeaderRoundTrip(t *testing.T) { PacketNum: 42, DataSize: 100, PrevPacketCombinedCheck: 0x1234, - Check0: 0xAAAA, - Check1: 0xBBBB, - Check2: 0xCCCC, + Check0: 0xAAAA, + Check1: 0xBBBB, + Check2: 0xCCCC, } encoded, err := original.Encode() diff --git a/cmd/protbot/protocol/entrance.go b/cmd/protbot/protocol/entrance.go index 1931a790e..8fbae99ec 100644 --- a/cmd/protbot/protocol/entrance.go +++ b/cmd/protbot/protocol/entrance.go @@ -12,9 +12,9 @@ import ( // ServerEntry represents a channel server from the entrance server response. type ServerEntry struct { - IP string - Port uint16 - Name string + IP string + Port uint16 + Name string } // DoEntrance connects to the entrance server and retrieves the server list. @@ -93,8 +93,8 @@ func parseServerEntries(data []byte, entryCount uint16) ([]ServerEntry, error) { _ = bf.ReadUint16() // serverIdx | 16 _ = bf.ReadUint16() // 0 channelCount := bf.ReadUint16() - _ = bf.ReadUint8() // Type - _ = bf.ReadUint8() // Season/rotation + _ = bf.ReadUint8() // Type + _ = bf.ReadUint8() // Season/rotation // G1+ recommended flag _ = bf.ReadUint8() @@ -118,11 +118,11 @@ func parseServerEntries(data []byte, entryCount uint16) ([]ServerEntry, error) { // Read channel entries (14 x uint16 = 28 bytes each) for j := uint16(0); j < channelCount; j++ { port := bf.ReadUint16() - _ = bf.ReadUint16() // channelIdx | 16 - _ = bf.ReadUint16() // maxPlayers - _ = bf.ReadUint16() // currentPlayers + _ = bf.ReadUint16() // channelIdx | 16 + _ = bf.ReadUint16() // maxPlayers + _ = bf.ReadUint16() // currentPlayers _ = bf.ReadBytes(18) // remaining channel fields (9 x uint16: 6 zeros + unk319 + unk254 + unk255) - _ = bf.ReadUint16() // 12345 + _ = bf.ReadUint16() // 12345 serverIP := ip.String() // Convert 127.0.0.1 representation diff --git a/cmd/protbot/protocol/packets.go b/cmd/protbot/protocol/packets.go index 7c65f7804..58d378f07 100644 --- a/cmd/protbot/protocol/packets.go +++ b/cmd/protbot/protocol/packets.go @@ -48,8 +48,8 @@ func BuildEnumerateStagePacket(ackHandle uint32, prefix string) []byte { bf := byteframe.NewByteFrame() bf.WriteUint16(MSG_SYS_ENUMERATE_STAGE) bf.WriteUint32(ackHandle) - bf.WriteUint8(1) // Always 1 - bf.WriteUint8(uint8(len(prefix) + 1)) // Length including null terminator + bf.WriteUint8(1) // Always 1 + bf.WriteUint8(uint8(len(prefix) + 1)) // Length including null terminator bf.WriteNullTerminatedBytes([]byte(prefix)) bf.WriteBytes([]byte{0x00, 0x10}) return bf.Data() @@ -68,8 +68,8 @@ func BuildEnterStagePacket(ackHandle uint32, stageID string) []byte { bf := byteframe.NewByteFrame() bf.WriteUint16(MSG_SYS_ENTER_STAGE) bf.WriteUint32(ackHandle) - bf.WriteUint8(0) // IsQuest = false - bf.WriteUint8(uint8(len(stageID) + 1)) // Length including null terminator + bf.WriteUint8(0) // IsQuest = false + bf.WriteUint8(uint8(len(stageID) + 1)) // Length including null terminator bf.WriteNullTerminatedBytes([]byte(stageID)) bf.WriteBytes([]byte{0x00, 0x10}) return bf.Data() @@ -182,13 +182,13 @@ func BuildChatPayload(chatType uint8, message, senderName string) []byte { sjisMsg := stringsupport.UTF8ToSJIS(message) sjisName := stringsupport.UTF8ToSJIS(senderName) bf := byteframe.NewByteFrame() - bf.WriteUint8(0) // Unk0 - bf.WriteUint8(chatType) // Type - bf.WriteUint16(0) // Flags - bf.WriteUint16(uint16(len(sjisName) + 1)) // SenderName length (+ null term) - bf.WriteUint16(uint16(len(sjisMsg) + 1)) // Message length (+ null term) - bf.WriteNullTerminatedBytes(sjisMsg) // Message - bf.WriteNullTerminatedBytes(sjisName) // SenderName + bf.WriteUint8(0) // Unk0 + bf.WriteUint8(chatType) // Type + bf.WriteUint16(0) // Flags + bf.WriteUint16(uint16(len(sjisName) + 1)) // SenderName length (+ null term) + bf.WriteUint16(uint16(len(sjisMsg) + 1)) // Message length (+ null term) + bf.WriteNullTerminatedBytes(sjisMsg) // Message + bf.WriteNullTerminatedBytes(sjisName) // SenderName return bf.Data() } diff --git a/cmd/protbot/protocol/sign.go b/cmd/protbot/protocol/sign.go index 5ebd99b88..0e3e4f2b6 100644 --- a/cmd/protbot/protocol/sign.go +++ b/cmd/protbot/protocol/sign.go @@ -11,11 +11,11 @@ import ( // SignResult holds the parsed response from a successful DSGN sign-in. type SignResult struct { - TokenID uint32 - TokenString string // 16 raw bytes as string - Timestamp uint32 + TokenID uint32 + TokenString string // 16 raw bytes as string + Timestamp uint32 EntranceAddr string - CharIDs []uint32 + CharIDs []uint32 } // DoSign connects to the sign server and performs a DSGN login. @@ -62,9 +62,9 @@ func parseSignResponse(data []byte) (*SignResult, error) { return nil, fmt.Errorf("sign failed with code %d", resultCode) } - patchCount := rbf.ReadUint8() // patch server count (usually 2) - _ = rbf.ReadUint8() // entrance server count (usually 1) - charCount := rbf.ReadUint8() // character count + patchCount := rbf.ReadUint8() // patch server count (usually 2) + _ = rbf.ReadUint8() // entrance server count (usually 1) + charCount := rbf.ReadUint8() // character count result := &SignResult{} result.TokenID = rbf.ReadUint32() @@ -87,13 +87,13 @@ func parseSignResponse(data []byte) (*SignResult, error) { charID := rbf.ReadUint32() result.CharIDs = append(result.CharIDs, charID) - _ = rbf.ReadUint16() // HR - _ = rbf.ReadUint16() // WeaponType - _ = rbf.ReadUint32() // LastLogin - _ = rbf.ReadUint8() // IsFemale - _ = rbf.ReadUint8() // IsNewCharacter - _ = rbf.ReadUint8() // Old GR - _ = rbf.ReadUint8() // Use uint16 GR flag + _ = rbf.ReadUint16() // HR + _ = rbf.ReadUint16() // WeaponType + _ = rbf.ReadUint32() // LastLogin + _ = rbf.ReadUint8() // IsFemale + _ = rbf.ReadUint8() // IsNewCharacter + _ = rbf.ReadUint8() // Old GR + _ = rbf.ReadUint8() // Use uint16 GR flag _ = rbf.ReadBytes(16) // Character name (padded) _ = rbf.ReadBytes(32) // Unk desc string (padded) // ZZ mode: additional fields diff --git a/cmd/protbot/scenario/chat.go b/cmd/protbot/scenario/chat.go index 76dc3dae1..272cdef4b 100644 --- a/cmd/protbot/scenario/chat.go +++ b/cmd/protbot/scenario/chat.go @@ -57,7 +57,7 @@ func ListenChat(ch *protocol.ChannelConn, cb ChatCallback) { // Parse MsgBinChat inner payload. pbf := byteframe.NewByteFrameFromBytes(payload) - _ = pbf.ReadUint8() // unk0 + _ = pbf.ReadUint8() // unk0 chatType := pbf.ReadUint8() _ = pbf.ReadUint16() // flags _ = pbf.ReadUint16() // senderNameLen diff --git a/common/byteframe/byteframe_test.go b/common/byteframe/byteframe_test.go index 52c1449c1..bf6852bec 100644 --- a/common/byteframe/byteframe_test.go +++ b/common/byteframe/byteframe_test.go @@ -468,9 +468,9 @@ func TestByteFrame_SequentialWrites(t *testing.T) { bf.WriteUint64(0x08090A0B0C0D0E0F) expected := []byte{ - 0x01, // uint8 - 0x02, 0x03, // uint16 - 0x04, 0x05, 0x06, 0x07, // uint32 + 0x01, // uint8 + 0x02, 0x03, // uint16 + 0x04, 0x05, 0x06, 0x07, // uint32 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, // uint64 } diff --git a/common/stringsupport/string_convert_test.go b/common/stringsupport/string_convert_test.go index 33e281a5f..f186f1652 100644 --- a/common/stringsupport/string_convert_test.go +++ b/common/stringsupport/string_convert_test.go @@ -54,10 +54,10 @@ func TestUTF8ToSJIS_RoundTrip(t *testing.T) { func TestToNGWord(t *testing.T) { tests := []struct { - name string - input string - minLen int - checkFn func(t *testing.T, result []uint16) + name string + input string + minLen int + checkFn func(t *testing.T, result []uint16) }{ { name: "ascii characters", @@ -328,11 +328,11 @@ func TestCSVGetIndex(t *testing.T) { func TestCSVSetIndex(t *testing.T) { tests := []struct { - name string - csv string - index int - value int - check func(t *testing.T, result string) + name string + csv string + index int + value int + check func(t *testing.T, result string) }{ { name: "set first", diff --git a/common/token/token_test.go b/common/token/token_test.go index 463f4b9a2..aeca8cf83 100644 --- a/common/token/token_test.go +++ b/common/token/token_test.go @@ -118,7 +118,7 @@ func TestGenerate_Distribution(t *testing.T) { // With 62 valid characters and 6200 samples, average should be 100 per char // We'll accept a range to account for randomness - minExpected := 50 // Allow some variance + minExpected := 50 // Allow some variance maxExpected := 150 for c, count := range charCount { diff --git a/config/config_mode_test.go b/config/config_mode_test.go index 2b7f4132c..631aee832 100644 --- a/config/config_mode_test.go +++ b/config/config_mode_test.go @@ -14,11 +14,11 @@ func TestModeStringMethod(t *testing.T) { mode Mode want string }{ - {S1, "S1.5"}, // versionStrings[1] - {S15, "S2.0"}, // versionStrings[2] - {G1, "G2"}, // versionStrings[21] - {Z1, "Z2"}, // versionStrings[39] - {Z2, "ZZ"}, // versionStrings[40] + {S1, "S1.5"}, // versionStrings[1] + {S15, "S2.0"}, // versionStrings[2] + {G1, "G2"}, // versionStrings[21] + {Z1, "Z2"}, // versionStrings[39] + {Z2, "ZZ"}, // versionStrings[40] } for _, tt := range tests { diff --git a/network/binpacket/msg_bin_targeted_test.go b/network/binpacket/msg_bin_targeted_test.go index ca2943a08..61482c247 100644 --- a/network/binpacket/msg_bin_targeted_test.go +++ b/network/binpacket/msg_bin_targeted_test.go @@ -308,7 +308,7 @@ func TestMsgBinTargeted_TargetCountMismatch(t *testing.T) { // Test that TargetCount and actual array length don't have to match // The Build function uses the TargetCount field msg := &MsgBinTargeted{ - TargetCount: 2, // Says 2 + TargetCount: 2, // Says 2 TargetCharIDs: []uint32{100, 200, 300}, // But has 3 RawDataPayload: []byte{0x01}, } diff --git a/network/mhfpacket/mhfpacket_test.go b/network/mhfpacket/mhfpacket_test.go index 5591f1e7c..fbe5213c8 100644 --- a/network/mhfpacket/mhfpacket_test.go +++ b/network/mhfpacket/mhfpacket_test.go @@ -462,36 +462,36 @@ func TestMHFSaveLoad(t *testing.T) { func TestMsgSysCreateStageParse(t *testing.T) { tests := []struct { - name string - data []byte - wantHandle uint32 + name string + data []byte + wantHandle uint32 wantCreateType uint8 wantPlayers uint8 wantStageID string }{ { - name: "simple stage", - data: append([]byte{0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x05}, append([]byte("test"), 0x00)...), - wantHandle: 1, - wantCreateType: 2, - wantPlayers: 4, - wantStageID: "test", + name: "simple stage", + data: append([]byte{0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x05}, append([]byte("test"), 0x00)...), + wantHandle: 1, + wantCreateType: 2, + wantPlayers: 4, + wantStageID: "test", }, { - name: "empty stage ID", - data: []byte{0x12, 0x34, 0x56, 0x78, 0x01, 0x02, 0x00}, - wantHandle: 0x12345678, - wantCreateType: 1, - wantPlayers: 2, - wantStageID: "", + name: "empty stage ID", + data: []byte{0x12, 0x34, 0x56, 0x78, 0x01, 0x02, 0x00}, + wantHandle: 0x12345678, + wantCreateType: 1, + wantPlayers: 2, + wantStageID: "", }, { - name: "with null terminator", - data: append([]byte{0x00, 0x00, 0x00, 0x0A, 0x01, 0x01, 0x08}, append([]byte("stage01"), 0x00)...), - wantHandle: 10, - wantCreateType: 1, - wantPlayers: 1, - wantStageID: "stage01", + name: "with null terminator", + data: append([]byte{0x00, 0x00, 0x00, 0x0A, 0x01, 0x01, 0x08}, append([]byte("stage01"), 0x00)...), + wantHandle: 10, + wantCreateType: 1, + wantPlayers: 1, + wantStageID: "stage01", }, } diff --git a/network/mhfpacket/msg_batch_parse_test.go b/network/mhfpacket/msg_batch_parse_test.go index 52d272a37..c7715fa23 100644 --- a/network/mhfpacket/msg_batch_parse_test.go +++ b/network/mhfpacket/msg_batch_parse_test.go @@ -196,12 +196,12 @@ func TestBatchParseMultiField(t *testing.T) { t.Run("MsgMhfRegisterEvent", func(t *testing.T) { bf := byteframe.NewByteFrame() - bf.WriteUint32(1) // AckHandle - bf.WriteUint16(2) // Unk0 - bf.WriteUint16(3) // WorldID - bf.WriteUint16(4) // LandID + bf.WriteUint32(1) // AckHandle + bf.WriteUint16(2) // Unk0 + bf.WriteUint16(3) // WorldID + bf.WriteUint16(4) // LandID bf.WriteBool(true) // Unk1 - bf.WriteUint8(0) // Zeroed (discarded) + bf.WriteUint8(0) // Zeroed (discarded) _, _ = bf.Seek(0, io.SeekStart) pkt := &MsgMhfRegisterEvent{} if err := pkt.Parse(bf, ctx); err != nil { @@ -339,15 +339,15 @@ func TestBatchParseMultiField(t *testing.T) { t.Run("MsgMhfPresentBox", func(t *testing.T) { bf := byteframe.NewByteFrame() - bf.WriteUint32(1) // AckHandle - bf.WriteUint32(2) // Unk0 - bf.WriteUint32(3) // Unk1 - bf.WriteUint32(2) // Unk2 (controls Unk7 slice length) - bf.WriteUint32(5) // Unk3 - bf.WriteUint32(6) // Unk4 - bf.WriteUint32(7) // Unk5 - bf.WriteUint32(8) // Unk6 - bf.WriteUint32(9) // Unk7[0] + bf.WriteUint32(1) // AckHandle + bf.WriteUint32(2) // Unk0 + bf.WriteUint32(3) // Unk1 + bf.WriteUint32(2) // Unk2 (controls Unk7 slice length) + bf.WriteUint32(5) // Unk3 + bf.WriteUint32(6) // Unk4 + bf.WriteUint32(7) // Unk5 + bf.WriteUint32(8) // Unk6 + bf.WriteUint32(9) // Unk7[0] bf.WriteUint32(10) // Unk7[1] _, _ = bf.Seek(0, io.SeekStart) pkt := &MsgMhfPresentBox{} @@ -1963,9 +1963,9 @@ func TestBatchParseAdditionalMultiField(t *testing.T) { t.Run("MsgMhfApplyCampaign", func(t *testing.T) { bf := byteframe.NewByteFrame() - bf.WriteUint32(1) // AckHandle - bf.WriteUint32(1) // Unk0 - bf.WriteUint16(2) // Unk1 + bf.WriteUint32(1) // AckHandle + bf.WriteUint32(1) // Unk0 + bf.WriteUint16(2) // Unk1 bf.WriteBytes(make([]byte, 16)) // Unk2 (16 bytes) _, _ = bf.Seek(0, io.SeekStart) pkt := &MsgMhfApplyCampaign{} diff --git a/network/mhfpacket/msg_build_test.go b/network/mhfpacket/msg_build_test.go index 8667cd744..d6c81c04f 100644 --- a/network/mhfpacket/msg_build_test.go +++ b/network/mhfpacket/msg_build_test.go @@ -361,7 +361,7 @@ func TestBuildParseUpdateObjectBinary(t *testing.T) { t.Run(tt.name, func(t *testing.T) { original := &MsgSysUpdateObjectBinary{ ObjectHandleID: tt.unk0, - Unk1: tt.unk1, + Unk1: tt.unk1, } bf := byteframe.NewByteFrame() @@ -768,7 +768,7 @@ func TestBuildParseEnumerateDistItem(t *testing.T) { AckHandle: tt.ackHandle, DistType: tt.distType, Unk1: tt.unk1, - MaxCount: tt.unk2, + MaxCount: tt.unk2, } bf := byteframe.NewByteFrame() diff --git a/network/mhfpacket/msg_head.go b/network/mhfpacket/msg_head.go index 032088537..e3d5fa518 100644 --- a/network/mhfpacket/msg_head.go +++ b/network/mhfpacket/msg_head.go @@ -5,8 +5,8 @@ import ( "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" ) // MsgHead represents the MSG_HEAD diff --git a/network/mhfpacket/msg_mhf_accept_read_reward.go b/network/mhfpacket/msg_mhf_accept_read_reward.go index 7c3b7919a..35cb97e22 100644 --- a/network/mhfpacket/msg_mhf_accept_read_reward.go +++ b/network/mhfpacket/msg_mhf_accept_read_reward.go @@ -5,8 +5,8 @@ import ( "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" ) // MsgMhfAcceptReadReward represents the MSG_MHF_ACCEPT_READ_REWARD diff --git a/network/mhfpacket/msg_mhf_acquire_dist_item.go b/network/mhfpacket/msg_mhf_acquire_dist_item.go index a11bf3ba4..37f29a6aa 100644 --- a/network/mhfpacket/msg_mhf_acquire_dist_item.go +++ b/network/mhfpacket/msg_mhf_acquire_dist_item.go @@ -3,16 +3,16 @@ package mhfpacket import ( "errors" + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgMhfAcquireDistItem represents the MSG_MHF_ACQUIRE_DIST_ITEM type MsgMhfAcquireDistItem struct { - AckHandle uint32 + AckHandle uint32 DistributionType uint8 - DistributionID uint32 + DistributionID uint32 } // Opcode returns the ID associated with this packet type. diff --git a/network/mhfpacket/msg_mhf_acquire_exchange_shop.go b/network/mhfpacket/msg_mhf_acquire_exchange_shop.go index 3131cc2bb..fd9fef735 100644 --- a/network/mhfpacket/msg_mhf_acquire_exchange_shop.go +++ b/network/mhfpacket/msg_mhf_acquire_exchange_shop.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgMhfAcquireExchangeShop represents the MSG_MHF_ACQUIRE_EXCHANGE_SHOP diff --git a/network/mhfpacket/msg_mhf_acquire_festa_intermediate_prize.go b/network/mhfpacket/msg_mhf_acquire_festa_intermediate_prize.go index a5a07e662..46ec43ef7 100644 --- a/network/mhfpacket/msg_mhf_acquire_festa_intermediate_prize.go +++ b/network/mhfpacket/msg_mhf_acquire_festa_intermediate_prize.go @@ -3,15 +3,15 @@ package mhfpacket import ( "errors" + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgMhfAcquireFestaIntermediatePrize represents the MSG_MHF_ACQUIRE_FESTA_INTERMEDIATE_PRIZE type MsgMhfAcquireFestaIntermediatePrize struct { AckHandle uint32 - PrizeID uint32 + PrizeID uint32 } // Opcode returns the ID associated with this packet type. @@ -22,7 +22,7 @@ func (m *MsgMhfAcquireFestaIntermediatePrize) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfAcquireFestaIntermediatePrize) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { m.AckHandle = bf.ReadUint32() - m.PrizeID = bf.ReadUint32() + m.PrizeID = bf.ReadUint32() return nil } diff --git a/network/mhfpacket/msg_mhf_acquire_festa_personal_prize.go b/network/mhfpacket/msg_mhf_acquire_festa_personal_prize.go index 61abeec1b..2cd04c39b 100644 --- a/network/mhfpacket/msg_mhf_acquire_festa_personal_prize.go +++ b/network/mhfpacket/msg_mhf_acquire_festa_personal_prize.go @@ -1,17 +1,17 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfAcquireFestaPersonalPrize represents the MSG_MHF_ACQUIRE_FESTA_PERSONAL_PRIZE type MsgMhfAcquireFestaPersonalPrize struct { - AckHandle uint32 - PrizeID uint32 + AckHandle uint32 + PrizeID uint32 } // Opcode returns the ID associated with this packet type. @@ -21,9 +21,9 @@ func (m *MsgMhfAcquireFestaPersonalPrize) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfAcquireFestaPersonalPrize) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - m.AckHandle = bf.ReadUint32() - m.PrizeID = bf.ReadUint32() - return nil + m.AckHandle = bf.ReadUint32() + m.PrizeID = bf.ReadUint32() + return nil } // Build builds a binary packet from the current data. diff --git a/network/mhfpacket/msg_mhf_acquire_guild_adventure.go b/network/mhfpacket/msg_mhf_acquire_guild_adventure.go index 301783691..262aeac02 100644 --- a/network/mhfpacket/msg_mhf_acquire_guild_adventure.go +++ b/network/mhfpacket/msg_mhf_acquire_guild_adventure.go @@ -1,17 +1,17 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfAcquireGuildAdventure represents the MSG_MHF_ACQUIRE_GUILD_ADVENTURE type MsgMhfAcquireGuildAdventure struct { - AckHandle uint32 - ID uint32 + AckHandle uint32 + ID uint32 } // Opcode returns the ID associated with this packet type. @@ -21,9 +21,9 @@ func (m *MsgMhfAcquireGuildAdventure) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfAcquireGuildAdventure) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - m.AckHandle = bf.ReadUint32() - m.ID = bf.ReadUint32() - return nil + m.AckHandle = bf.ReadUint32() + m.ID = bf.ReadUint32() + return nil } // Build builds a binary packet from the current data. diff --git a/network/mhfpacket/msg_mhf_acquire_guild_tresure_souvenir.go b/network/mhfpacket/msg_mhf_acquire_guild_tresure_souvenir.go index be061add3..ab938d12d 100644 --- a/network/mhfpacket/msg_mhf_acquire_guild_tresure_souvenir.go +++ b/network/mhfpacket/msg_mhf_acquire_guild_tresure_souvenir.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfAcquireGuildTresureSouvenir represents the MSG_MHF_ACQUIRE_GUILD_TRESURE_SOUVENIR diff --git a/network/mhfpacket/msg_mhf_acquire_monthly_reward.go b/network/mhfpacket/msg_mhf_acquire_monthly_reward.go index d3c0f6820..5a3d4ee42 100644 --- a/network/mhfpacket/msg_mhf_acquire_monthly_reward.go +++ b/network/mhfpacket/msg_mhf_acquire_monthly_reward.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfAcquireMonthlyReward represents the MSG_MHF_ACQUIRE_MONTHLY_REWARD diff --git a/network/mhfpacket/msg_mhf_acquire_test.go b/network/mhfpacket/msg_mhf_acquire_test.go index bea56c2bc..dd8e7f2cb 100644 --- a/network/mhfpacket/msg_mhf_acquire_test.go +++ b/network/mhfpacket/msg_mhf_acquire_test.go @@ -86,7 +86,7 @@ func TestMsgMhfAcquireTitleParse(t *testing.T) { bf := byteframe.NewByteFrame() bf.WriteUint32(tt.ackHandle) bf.WriteUint16(uint16(len(tt.titleIDs))) // count - bf.WriteUint16(0) // zeroed + bf.WriteUint16(0) // zeroed for _, id := range tt.titleIDs { bf.WriteUint16(id) } diff --git a/network/mhfpacket/msg_mhf_acquire_ud_item.go b/network/mhfpacket/msg_mhf_acquire_ud_item.go index dfeedac58..9fed7ed40 100644 --- a/network/mhfpacket/msg_mhf_acquire_ud_item.go +++ b/network/mhfpacket/msg_mhf_acquire_ud_item.go @@ -1,29 +1,29 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfAcquireUdItem represents the MSG_MHF_ACQUIRE_UD_ITEM type MsgMhfAcquireUdItem struct { - AckHandle uint32 - Unk0 uint8 - // from gal - // daily = 0 - // personal = 1 - // personal rank = 2 - // guild rank = 3 - // gcp = 4 - // from cat - // treasure achievement = 5 - // personal achievement = 6 - // guild achievement = 7 - RewardType uint8 - ItemIDCount uint8 + AckHandle uint32 + Unk0 uint8 + // from gal + // daily = 0 + // personal = 1 + // personal rank = 2 + // guild rank = 3 + // gcp = 4 + // from cat + // treasure achievement = 5 + // personal achievement = 6 + // guild achievement = 7 + RewardType uint8 + ItemIDCount uint8 Unk3 []byte } @@ -34,13 +34,13 @@ func (m *MsgMhfAcquireUdItem) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfAcquireUdItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - m.AckHandle = bf.ReadUint32() + m.AckHandle = bf.ReadUint32() m.Unk0 = bf.ReadUint8() m.RewardType = bf.ReadUint8() - m.ItemIDCount = bf.ReadUint8() - for i := uint8(0); i < m.ItemIDCount; i++ { - bf.ReadUint32() - } + m.ItemIDCount = bf.ReadUint8() + for i := uint8(0); i < m.ItemIDCount; i++ { + bf.ReadUint32() + } return nil } diff --git a/network/mhfpacket/msg_mhf_add_guild_mission_count.go b/network/mhfpacket/msg_mhf_add_guild_mission_count.go index 86ea70b86..221348996 100644 --- a/network/mhfpacket/msg_mhf_add_guild_mission_count.go +++ b/network/mhfpacket/msg_mhf_add_guild_mission_count.go @@ -1,18 +1,18 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfAddGuildMissionCount represents the MSG_MHF_ADD_GUILD_MISSION_COUNT type MsgMhfAddGuildMissionCount struct { - AckHandle uint32 - MissionID uint32 - Count uint32 + AckHandle uint32 + MissionID uint32 + Count uint32 } // Opcode returns the ID associated with this packet type. @@ -22,10 +22,10 @@ func (m *MsgMhfAddGuildMissionCount) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfAddGuildMissionCount) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - m.AckHandle = bf.ReadUint32() - m.MissionID = bf.ReadUint32() - m.Count = bf.ReadUint32() - return nil + m.AckHandle = bf.ReadUint32() + m.MissionID = bf.ReadUint32() + m.Count = bf.ReadUint32() + return nil } // Build builds a binary packet from the current data. diff --git a/network/mhfpacket/msg_mhf_add_guild_weekly_bonus_exceptional_user.go b/network/mhfpacket/msg_mhf_add_guild_weekly_bonus_exceptional_user.go index ec6b72f39..330c9cc6e 100644 --- a/network/mhfpacket/msg_mhf_add_guild_weekly_bonus_exceptional_user.go +++ b/network/mhfpacket/msg_mhf_add_guild_weekly_bonus_exceptional_user.go @@ -1,17 +1,17 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfAddGuildWeeklyBonusExceptionalUser represents the MSG_MHF_ADD_GUILD_WEEKLY_BONUS_EXCEPTIONAL_USER type MsgMhfAddGuildWeeklyBonusExceptionalUser struct { - AckHandle uint32 - NumUsers uint8 + AckHandle uint32 + NumUsers uint8 } // Opcode returns the ID associated with this packet type. @@ -21,9 +21,9 @@ func (m *MsgMhfAddGuildWeeklyBonusExceptionalUser) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfAddGuildWeeklyBonusExceptionalUser) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - m.AckHandle = bf.ReadUint32() - m.NumUsers = bf.ReadUint8() - return nil + m.AckHandle = bf.ReadUint32() + m.NumUsers = bf.ReadUint8() + return nil } // Build builds a binary packet from the current data. diff --git a/network/mhfpacket/msg_mhf_add_kouryou_point.go b/network/mhfpacket/msg_mhf_add_kouryou_point.go index 8fb96319a..b8d71e543 100644 --- a/network/mhfpacket/msg_mhf_add_kouryou_point.go +++ b/network/mhfpacket/msg_mhf_add_kouryou_point.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgMhfAddKouryouPoint represents the MSG_MHF_ADD_KOURYOU_POINT diff --git a/network/mhfpacket/msg_mhf_add_reward_song_count.go b/network/mhfpacket/msg_mhf_add_reward_song_count.go index 4a0192845..fa6afc236 100644 --- a/network/mhfpacket/msg_mhf_add_reward_song_count.go +++ b/network/mhfpacket/msg_mhf_add_reward_song_count.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfAddRewardSongCount represents the MSG_MHF_ADD_REWARD_SONG_COUNT diff --git a/network/mhfpacket/msg_mhf_add_ud_point.go b/network/mhfpacket/msg_mhf_add_ud_point.go index d07b796a1..a2be14d7f 100644 --- a/network/mhfpacket/msg_mhf_add_ud_point.go +++ b/network/mhfpacket/msg_mhf_add_ud_point.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfAddUdPoint represents the MSG_MHF_ADD_UD_POINT diff --git a/network/mhfpacket/msg_mhf_add_ud_tactics_point.go b/network/mhfpacket/msg_mhf_add_ud_tactics_point.go index d9f818366..809ff0e84 100644 --- a/network/mhfpacket/msg_mhf_add_ud_tactics_point.go +++ b/network/mhfpacket/msg_mhf_add_ud_tactics_point.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgMhfAddUdTacticsPoint represents the MSG_MHF_ADD_UD_TACTICS_POINT diff --git a/network/mhfpacket/msg_mhf_answer_guild_scout.go b/network/mhfpacket/msg_mhf_answer_guild_scout.go index f80894f97..9ddd05540 100644 --- a/network/mhfpacket/msg_mhf_answer_guild_scout.go +++ b/network/mhfpacket/msg_mhf_answer_guild_scout.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfAnswerGuildScout represents the MSG_MHF_ANSWER_GUILD_SCOUT diff --git a/network/mhfpacket/msg_mhf_cancel_guild_mission_target.go b/network/mhfpacket/msg_mhf_cancel_guild_mission_target.go index c6eaf00c6..527fdf199 100644 --- a/network/mhfpacket/msg_mhf_cancel_guild_mission_target.go +++ b/network/mhfpacket/msg_mhf_cancel_guild_mission_target.go @@ -1,17 +1,17 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfCancelGuildMissionTarget represents the MSG_MHF_CANCEL_GUILD_MISSION_TARGET type MsgMhfCancelGuildMissionTarget struct { - AckHandle uint32 - MissionID uint32 + AckHandle uint32 + MissionID uint32 } // Opcode returns the ID associated with this packet type. @@ -21,9 +21,9 @@ func (m *MsgMhfCancelGuildMissionTarget) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfCancelGuildMissionTarget) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - m.AckHandle = bf.ReadUint32() - m.MissionID = bf.ReadUint32() - return nil + m.AckHandle = bf.ReadUint32() + m.MissionID = bf.ReadUint32() + return nil } // Build builds a binary packet from the current data. diff --git a/network/mhfpacket/msg_mhf_cancel_guild_scout.go b/network/mhfpacket/msg_mhf_cancel_guild_scout.go index fa3eabd16..578be1cf4 100644 --- a/network/mhfpacket/msg_mhf_cancel_guild_scout.go +++ b/network/mhfpacket/msg_mhf_cancel_guild_scout.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfCancelGuildScout represents the MSG_MHF_CANCEL_GUILD_SCOUT diff --git a/network/mhfpacket/msg_mhf_charge_guild_adventure.go b/network/mhfpacket/msg_mhf_charge_guild_adventure.go index faa86b570..de8d95625 100644 --- a/network/mhfpacket/msg_mhf_charge_guild_adventure.go +++ b/network/mhfpacket/msg_mhf_charge_guild_adventure.go @@ -1,18 +1,18 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfChargeGuildAdventure represents the MSG_MHF_CHARGE_GUILD_ADVENTURE type MsgMhfChargeGuildAdventure struct { - AckHandle uint32 - ID uint32 - Amount uint32 + AckHandle uint32 + ID uint32 + Amount uint32 } // Opcode returns the ID associated with this packet type. @@ -22,10 +22,10 @@ func (m *MsgMhfChargeGuildAdventure) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfChargeGuildAdventure) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - m.AckHandle = bf.ReadUint32() - m.ID = bf.ReadUint32() - m.Amount = bf.ReadUint32() - return nil + m.AckHandle = bf.ReadUint32() + m.ID = bf.ReadUint32() + m.Amount = bf.ReadUint32() + return nil } // Build builds a binary packet from the current data. diff --git a/network/mhfpacket/msg_mhf_create_mercenary.go b/network/mhfpacket/msg_mhf_create_mercenary.go index ed0077886..50e80bbe2 100644 --- a/network/mhfpacket/msg_mhf_create_mercenary.go +++ b/network/mhfpacket/msg_mhf_create_mercenary.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfCreateMercenary represents the MSG_MHF_CREATE_MERCENARY diff --git a/network/mhfpacket/msg_mhf_debug_post_value.go b/network/mhfpacket/msg_mhf_debug_post_value.go index d982bcec9..24e8de7ab 100644 --- a/network/mhfpacket/msg_mhf_debug_post_value.go +++ b/network/mhfpacket/msg_mhf_debug_post_value.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfDebugPostValue represents the MSG_MHF_DEBUG_POST_VALUE diff --git a/network/mhfpacket/msg_mhf_enter_tournament_quest.go b/network/mhfpacket/msg_mhf_enter_tournament_quest.go index 686de4afb..84b3f99f2 100644 --- a/network/mhfpacket/msg_mhf_enter_tournament_quest.go +++ b/network/mhfpacket/msg_mhf_enter_tournament_quest.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfEnterTournamentQuest represents the MSG_MHF_ENTER_TOURNAMENT_QUEST diff --git a/network/mhfpacket/msg_mhf_enumerate_festa_intermediate_prize.go b/network/mhfpacket/msg_mhf_enumerate_festa_intermediate_prize.go index 0c31688ca..99a858cc7 100644 --- a/network/mhfpacket/msg_mhf_enumerate_festa_intermediate_prize.go +++ b/network/mhfpacket/msg_mhf_enumerate_festa_intermediate_prize.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfEnumerateFestaIntermediatePrize represents the MSG_MHF_ENUMERATE_FESTA_INTERMEDIATE_PRIZE diff --git a/network/mhfpacket/msg_mhf_enumerate_festa_personal_prize.go b/network/mhfpacket/msg_mhf_enumerate_festa_personal_prize.go index 2922256b4..b7c89f1ed 100644 --- a/network/mhfpacket/msg_mhf_enumerate_festa_personal_prize.go +++ b/network/mhfpacket/msg_mhf_enumerate_festa_personal_prize.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfEnumerateFestaPersonalPrize represents the MSG_MHF_ENUMERATE_FESTA_PERSONAL_PRIZE diff --git a/network/mhfpacket/msg_mhf_enumerate_guild_message_board.go b/network/mhfpacket/msg_mhf_enumerate_guild_message_board.go index 6e965340d..55c696ef1 100644 --- a/network/mhfpacket/msg_mhf_enumerate_guild_message_board.go +++ b/network/mhfpacket/msg_mhf_enumerate_guild_message_board.go @@ -1,20 +1,20 @@ package mhfpacket import ( - "errors" - - "erupe-ce/network/clientctx" - "erupe-ce/network" + "errors" + "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfEnumerateGuildMessageBoard represents the MSG_MHF_ENUMERATE_GUILD_MESSAGE_BOARD -type MsgMhfEnumerateGuildMessageBoard struct{ - AckHandle uint32 - Unk0 uint32 - MaxPosts uint32 // always 100, even on news (00000064) - // returning more than 4 news posts WILL softlock - BoardType uint32 // 0 => message, 1 => news +type MsgMhfEnumerateGuildMessageBoard struct { + AckHandle uint32 + Unk0 uint32 + MaxPosts uint32 // always 100, even on news (00000064) + // returning more than 4 news posts WILL softlock + BoardType uint32 // 0 => message, 1 => news } // Opcode returns the ID associated with this packet type. @@ -24,10 +24,10 @@ func (m *MsgMhfEnumerateGuildMessageBoard) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfEnumerateGuildMessageBoard) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - m.AckHandle = bf.ReadUint32() - m.Unk0 = bf.ReadUint32() - m.MaxPosts = bf.ReadUint32() - m.BoardType = bf.ReadUint32() + m.AckHandle = bf.ReadUint32() + m.Unk0 = bf.ReadUint32() + m.MaxPosts = bf.ReadUint32() + m.BoardType = bf.ReadUint32() return nil } diff --git a/network/mhfpacket/msg_mhf_enumerate_mercenary_log.go b/network/mhfpacket/msg_mhf_enumerate_mercenary_log.go index 89bb419c3..444b269f1 100644 --- a/network/mhfpacket/msg_mhf_enumerate_mercenary_log.go +++ b/network/mhfpacket/msg_mhf_enumerate_mercenary_log.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfEnumerateMercenaryLog represents the MSG_MHF_ENUMERATE_MERCENARY_LOG diff --git a/network/mhfpacket/msg_mhf_enumerate_order.go b/network/mhfpacket/msg_mhf_enumerate_order.go index 84474106c..bf4fa7abf 100644 --- a/network/mhfpacket/msg_mhf_enumerate_order.go +++ b/network/mhfpacket/msg_mhf_enumerate_order.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfEnumerateOrder represents the MSG_MHF_ENUMERATE_ORDER diff --git a/network/mhfpacket/msg_mhf_exchange_kouryou_point.go b/network/mhfpacket/msg_mhf_exchange_kouryou_point.go index 2a78435cc..9af4d4d17 100644 --- a/network/mhfpacket/msg_mhf_exchange_kouryou_point.go +++ b/network/mhfpacket/msg_mhf_exchange_kouryou_point.go @@ -1,15 +1,15 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfExchangeKouryouPoint represents the MSG_MHF_EXCHANGE_KOURYOU_POINT -type MsgMhfExchangeKouryouPoint struct{ +type MsgMhfExchangeKouryouPoint struct { AckHandle uint32 KouryouPoints uint32 } diff --git a/network/mhfpacket/msg_mhf_exchange_weekly_stamp.go b/network/mhfpacket/msg_mhf_exchange_weekly_stamp.go index ada01eccf..1fd40a830 100644 --- a/network/mhfpacket/msg_mhf_exchange_weekly_stamp.go +++ b/network/mhfpacket/msg_mhf_exchange_weekly_stamp.go @@ -10,8 +10,8 @@ import ( // MsgMhfExchangeWeeklyStamp represents the MSG_MHF_EXCHANGE_WEEKLY_STAMP type MsgMhfExchangeWeeklyStamp struct { - AckHandle uint32 - StampType string + AckHandle uint32 + StampType string ExchangeType uint8 } diff --git a/network/mhfpacket/msg_mhf_generate_ud_guild_map.go b/network/mhfpacket/msg_mhf_generate_ud_guild_map.go index f6d37beb2..38c7a2e3d 100644 --- a/network/mhfpacket/msg_mhf_generate_ud_guild_map.go +++ b/network/mhfpacket/msg_mhf_generate_ud_guild_map.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGenerateUdGuildMap represents the MSG_MHF_GENERATE_UD_GUILD_MAP diff --git a/network/mhfpacket/msg_mhf_get_additional_beat_reward.go b/network/mhfpacket/msg_mhf_get_additional_beat_reward.go index 76e9cacfd..4680b5fa3 100644 --- a/network/mhfpacket/msg_mhf_get_additional_beat_reward.go +++ b/network/mhfpacket/msg_mhf_get_additional_beat_reward.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetAdditionalBeatReward represents the MSG_MHF_GET_ADDITIONAL_BEAT_REWARD diff --git a/network/mhfpacket/msg_mhf_get_boost_right.go b/network/mhfpacket/msg_mhf_get_boost_right.go index 88020bd1f..09731de72 100644 --- a/network/mhfpacket/msg_mhf_get_boost_right.go +++ b/network/mhfpacket/msg_mhf_get_boost_right.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetBoostRight represents the MSG_MHF_GET_BOOST_RIGHT diff --git a/network/mhfpacket/msg_mhf_get_boost_time.go b/network/mhfpacket/msg_mhf_get_boost_time.go index ce563d14d..c37ff90b0 100644 --- a/network/mhfpacket/msg_mhf_get_boost_time.go +++ b/network/mhfpacket/msg_mhf_get_boost_time.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetBoostTime represents the MSG_MHF_GET_BOOST_TIME diff --git a/network/mhfpacket/msg_mhf_get_boost_time_limit.go b/network/mhfpacket/msg_mhf_get_boost_time_limit.go index d42918162..17c55f1b4 100644 --- a/network/mhfpacket/msg_mhf_get_boost_time_limit.go +++ b/network/mhfpacket/msg_mhf_get_boost_time_limit.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetBoostTimeLimit represents the MSG_MHF_GET_BOOST_TIME_LIMIT diff --git a/network/mhfpacket/msg_mhf_get_ca_achievement_hist.go b/network/mhfpacket/msg_mhf_get_ca_achievement_hist.go index b48f49d24..67aec8965 100644 --- a/network/mhfpacket/msg_mhf_get_ca_achievement_hist.go +++ b/network/mhfpacket/msg_mhf_get_ca_achievement_hist.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetCaAchievementHist represents the MSG_MHF_GET_CA_ACHIEVEMENT_HIST diff --git a/network/mhfpacket/msg_mhf_get_ca_unique_id.go b/network/mhfpacket/msg_mhf_get_ca_unique_id.go index 193d5cc1d..d39cf44ee 100644 --- a/network/mhfpacket/msg_mhf_get_ca_unique_id.go +++ b/network/mhfpacket/msg_mhf_get_ca_unique_id.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetCaUniqueID represents the MSG_MHF_GET_CA_UNIQUE_ID diff --git a/network/mhfpacket/msg_mhf_get_cafe_duration.go b/network/mhfpacket/msg_mhf_get_cafe_duration.go index 8204b708c..f599db8b6 100644 --- a/network/mhfpacket/msg_mhf_get_cafe_duration.go +++ b/network/mhfpacket/msg_mhf_get_cafe_duration.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetCafeDuration represents the MSG_MHF_GET_CAFE_DURATION diff --git a/network/mhfpacket/msg_mhf_get_cafe_duration_bonus_info.go b/network/mhfpacket/msg_mhf_get_cafe_duration_bonus_info.go index 7d357bc95..8c3d1c712 100644 --- a/network/mhfpacket/msg_mhf_get_cafe_duration_bonus_info.go +++ b/network/mhfpacket/msg_mhf_get_cafe_duration_bonus_info.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetCafeDurationBonusInfo represents the MSG_MHF_GET_CAFE_DURATION_BONUS_INFO diff --git a/network/mhfpacket/msg_mhf_get_cog_info.go b/network/mhfpacket/msg_mhf_get_cog_info.go index a843a15b0..ad5703542 100644 --- a/network/mhfpacket/msg_mhf_get_cog_info.go +++ b/network/mhfpacket/msg_mhf_get_cog_info.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetCogInfo represents the MSG_MHF_GET_COG_INFO diff --git a/network/mhfpacket/msg_mhf_get_daily_mission_master.go b/network/mhfpacket/msg_mhf_get_daily_mission_master.go index 0690592eb..f844ce171 100644 --- a/network/mhfpacket/msg_mhf_get_daily_mission_master.go +++ b/network/mhfpacket/msg_mhf_get_daily_mission_master.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetDailyMissionMaster represents the MSG_MHF_GET_DAILY_MISSION_MASTER diff --git a/network/mhfpacket/msg_mhf_get_daily_mission_personal.go b/network/mhfpacket/msg_mhf_get_daily_mission_personal.go index d6467ce55..58088f7b5 100644 --- a/network/mhfpacket/msg_mhf_get_daily_mission_personal.go +++ b/network/mhfpacket/msg_mhf_get_daily_mission_personal.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetDailyMissionPersonal represents the MSG_MHF_GET_DAILY_MISSION_PERSONAL diff --git a/network/mhfpacket/msg_mhf_get_dist_description.go b/network/mhfpacket/msg_mhf_get_dist_description.go index 94439c2e9..bc9039ccb 100644 --- a/network/mhfpacket/msg_mhf_get_dist_description.go +++ b/network/mhfpacket/msg_mhf_get_dist_description.go @@ -1,17 +1,17 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetDistDescription represents the MSG_MHF_GET_DIST_DESCRIPTION -type MsgMhfGetDistDescription struct{ - AckHandle uint32 - Unk0 uint8 +type MsgMhfGetDistDescription struct { + AckHandle uint32 + Unk0 uint8 DistributionID uint32 } @@ -27,7 +27,8 @@ func (m *MsgMhfGetDistDescription) Parse(bf *byteframe.ByteFrame, ctx *clientctx m.DistributionID = bf.ReadUint32() return nil } + // Build builds a binary packet from the current data. func (m *MsgMhfGetDistDescription) Build(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { return errors.New("NOT IMPLEMENTED") -} \ No newline at end of file +} diff --git a/network/mhfpacket/msg_mhf_get_earth_status.go b/network/mhfpacket/msg_mhf_get_earth_status.go index e89855ec2..c527c50b6 100644 --- a/network/mhfpacket/msg_mhf_get_earth_status.go +++ b/network/mhfpacket/msg_mhf_get_earth_status.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetEarthStatus represents the MSG_MHF_GET_EARTH_STATUS diff --git a/network/mhfpacket/msg_mhf_get_earth_value.go b/network/mhfpacket/msg_mhf_get_earth_value.go index 8fca9ae72..0165beed6 100644 --- a/network/mhfpacket/msg_mhf_get_earth_value.go +++ b/network/mhfpacket/msg_mhf_get_earth_value.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetEarthValue represents the MSG_MHF_GET_EARTH_VALUE @@ -13,7 +13,7 @@ type MsgMhfGetEarthValue struct { AckHandle uint32 Unk0 uint32 Unk1 uint32 - ReqType uint32 + ReqType uint32 Unk3 uint32 Unk4 uint32 Unk5 uint32 diff --git a/network/mhfpacket/msg_mhf_get_enhanced_minidata.go b/network/mhfpacket/msg_mhf_get_enhanced_minidata.go index e60e7fbb1..a98db5ebe 100644 --- a/network/mhfpacket/msg_mhf_get_enhanced_minidata.go +++ b/network/mhfpacket/msg_mhf_get_enhanced_minidata.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetEnhancedMinidata represents the MSG_MHF_GET_ENHANCED_MINIDATA diff --git a/network/mhfpacket/msg_mhf_get_equip_skin_hist.go b/network/mhfpacket/msg_mhf_get_equip_skin_hist.go index e3072a29f..14e8a9e47 100644 --- a/network/mhfpacket/msg_mhf_get_equip_skin_hist.go +++ b/network/mhfpacket/msg_mhf_get_equip_skin_hist.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetEquipSkinHist represents the MSG_MHF_GET_EQUIP_SKIN_HIST diff --git a/network/mhfpacket/msg_mhf_get_etc_points.go b/network/mhfpacket/msg_mhf_get_etc_points.go index 009650bc7..547a8a70f 100644 --- a/network/mhfpacket/msg_mhf_get_etc_points.go +++ b/network/mhfpacket/msg_mhf_get_etc_points.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgMhfGetEtcPoints represents the MSG_MHF_GET_ETC_POINTS diff --git a/network/mhfpacket/msg_mhf_get_extra_info.go b/network/mhfpacket/msg_mhf_get_extra_info.go index cfea10761..a8c05776a 100644 --- a/network/mhfpacket/msg_mhf_get_extra_info.go +++ b/network/mhfpacket/msg_mhf_get_extra_info.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetExtraInfo represents the MSG_MHF_GET_EXTRA_INFO diff --git a/network/mhfpacket/msg_mhf_get_fpoint_exchange_list.go b/network/mhfpacket/msg_mhf_get_fpoint_exchange_list.go index a2fdcaa43..0005db111 100644 --- a/network/mhfpacket/msg_mhf_get_fpoint_exchange_list.go +++ b/network/mhfpacket/msg_mhf_get_fpoint_exchange_list.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetFpointExchangeList represents the MSG_MHF_GET_FPOINT_EXCHANGE_LIST diff --git a/network/mhfpacket/msg_mhf_get_gacha_point.go b/network/mhfpacket/msg_mhf_get_gacha_point.go index c6b6bc0ce..ed2072215 100644 --- a/network/mhfpacket/msg_mhf_get_gacha_point.go +++ b/network/mhfpacket/msg_mhf_get_gacha_point.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetGachaPoint represents the MSG_MHF_GET_GACHA_POINT diff --git a/network/mhfpacket/msg_mhf_get_guild_manage_right.go b/network/mhfpacket/msg_mhf_get_guild_manage_right.go index 8fae57750..ea7e086bb 100644 --- a/network/mhfpacket/msg_mhf_get_guild_manage_right.go +++ b/network/mhfpacket/msg_mhf_get_guild_manage_right.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetGuildManageRight represents the MSG_MHF_GET_GUILD_MANAGE_RIGHT diff --git a/network/mhfpacket/msg_mhf_get_guild_mission_list.go b/network/mhfpacket/msg_mhf_get_guild_mission_list.go index 5d37bf40a..90186b31d 100644 --- a/network/mhfpacket/msg_mhf_get_guild_mission_list.go +++ b/network/mhfpacket/msg_mhf_get_guild_mission_list.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetGuildMissionList represents the MSG_MHF_GET_GUILD_MISSION_LIST diff --git a/network/mhfpacket/msg_mhf_get_guild_mission_record.go b/network/mhfpacket/msg_mhf_get_guild_mission_record.go index d41da2f61..6e8684708 100644 --- a/network/mhfpacket/msg_mhf_get_guild_mission_record.go +++ b/network/mhfpacket/msg_mhf_get_guild_mission_record.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetGuildMissionRecord represents the MSG_MHF_GET_GUILD_MISSION_RECORD diff --git a/network/mhfpacket/msg_mhf_get_guild_scout_list.go b/network/mhfpacket/msg_mhf_get_guild_scout_list.go index 20ac5965e..6e835293e 100644 --- a/network/mhfpacket/msg_mhf_get_guild_scout_list.go +++ b/network/mhfpacket/msg_mhf_get_guild_scout_list.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetGuildScoutList represents the MSG_MHF_GET_GUILD_SCOUT_LIST diff --git a/network/mhfpacket/msg_mhf_get_guild_target_member_num.go b/network/mhfpacket/msg_mhf_get_guild_target_member_num.go index 4633a1820..515c2933c 100644 --- a/network/mhfpacket/msg_mhf_get_guild_target_member_num.go +++ b/network/mhfpacket/msg_mhf_get_guild_target_member_num.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetGuildTargetMemberNum represents the MSG_MHF_GET_GUILD_TARGET_MEMBER_NUM diff --git a/network/mhfpacket/msg_mhf_get_guild_tresure_souvenir.go b/network/mhfpacket/msg_mhf_get_guild_tresure_souvenir.go index ecbe48c3a..eb5ba47e2 100644 --- a/network/mhfpacket/msg_mhf_get_guild_tresure_souvenir.go +++ b/network/mhfpacket/msg_mhf_get_guild_tresure_souvenir.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetGuildTresureSouvenir represents the MSG_MHF_GET_GUILD_TRESURE_SOUVENIR diff --git a/network/mhfpacket/msg_mhf_get_guild_weekly_bonus_active_count.go b/network/mhfpacket/msg_mhf_get_guild_weekly_bonus_active_count.go index 74140c34a..3647b4891 100644 --- a/network/mhfpacket/msg_mhf_get_guild_weekly_bonus_active_count.go +++ b/network/mhfpacket/msg_mhf_get_guild_weekly_bonus_active_count.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetGuildWeeklyBonusActiveCount represents the MSG_MHF_GET_GUILD_WEEKLY_BONUS_ACTIVE_COUNT diff --git a/network/mhfpacket/msg_mhf_get_guild_weekly_bonus_master.go b/network/mhfpacket/msg_mhf_get_guild_weekly_bonus_master.go index 0a562c5bb..2270a0913 100644 --- a/network/mhfpacket/msg_mhf_get_guild_weekly_bonus_master.go +++ b/network/mhfpacket/msg_mhf_get_guild_weekly_bonus_master.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetGuildWeeklyBonusMaster represents the MSG_MHF_GET_GUILD_WEEKLY_BONUS_MASTER diff --git a/network/mhfpacket/msg_mhf_get_keep_login_boost_status.go b/network/mhfpacket/msg_mhf_get_keep_login_boost_status.go index 1fb84d550..ccf209763 100644 --- a/network/mhfpacket/msg_mhf_get_keep_login_boost_status.go +++ b/network/mhfpacket/msg_mhf_get_keep_login_boost_status.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetKeepLoginBoostStatus represents the MSG_MHF_GET_KEEP_LOGIN_BOOST_STATUS diff --git a/network/mhfpacket/msg_mhf_get_kiju_info.go b/network/mhfpacket/msg_mhf_get_kiju_info.go index de548ce98..5d6a87ada 100644 --- a/network/mhfpacket/msg_mhf_get_kiju_info.go +++ b/network/mhfpacket/msg_mhf_get_kiju_info.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetKijuInfo represents the MSG_MHF_GET_KIJU_INFO diff --git a/network/mhfpacket/msg_mhf_get_kouryou_point.go b/network/mhfpacket/msg_mhf_get_kouryou_point.go index 2eebda798..5ec0e4f20 100644 --- a/network/mhfpacket/msg_mhf_get_kouryou_point.go +++ b/network/mhfpacket/msg_mhf_get_kouryou_point.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetKouryouPoint represents the MSG_MHF_GET_KOURYOU_POINT diff --git a/network/mhfpacket/msg_mhf_get_lobby_crowd.go b/network/mhfpacket/msg_mhf_get_lobby_crowd.go index 388f310fe..e5e02470d 100644 --- a/network/mhfpacket/msg_mhf_get_lobby_crowd.go +++ b/network/mhfpacket/msg_mhf_get_lobby_crowd.go @@ -1,15 +1,15 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetLobbyCrowd represents the MSG_MHF_GET_LOBBY_CROWD -type MsgMhfGetLobbyCrowd struct{ +type MsgMhfGetLobbyCrowd struct { AckHandle uint32 Server uint32 Room uint32 diff --git a/network/mhfpacket/msg_mhf_get_myhouse_info.go b/network/mhfpacket/msg_mhf_get_myhouse_info.go index 8c71173ca..8ee21907f 100644 --- a/network/mhfpacket/msg_mhf_get_myhouse_info.go +++ b/network/mhfpacket/msg_mhf_get_myhouse_info.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetMyhouseInfo represents the MSG_MHF_GET_MYHOUSE_INFO diff --git a/network/mhfpacket/msg_mhf_get_paper_data.go b/network/mhfpacket/msg_mhf_get_paper_data.go index 9dff20083..925c1d524 100644 --- a/network/mhfpacket/msg_mhf_get_paper_data.go +++ b/network/mhfpacket/msg_mhf_get_paper_data.go @@ -1,20 +1,20 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetPaperData represents the MSG_MHF_GET_PAPER_DATA type MsgMhfGetPaperData struct { // Communicator type, multi-format. This might be valid for only one type. AckHandle uint32 - Unk0 uint32 - Unk1 uint32 - DataType uint32 + Unk0 uint32 + Unk1 uint32 + DataType uint32 } // Opcode returns the ID associated with this packet type. diff --git a/network/mhfpacket/msg_mhf_get_reject_guild_scout.go b/network/mhfpacket/msg_mhf_get_reject_guild_scout.go index ac7cb607c..1e50da646 100644 --- a/network/mhfpacket/msg_mhf_get_reject_guild_scout.go +++ b/network/mhfpacket/msg_mhf_get_reject_guild_scout.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetRejectGuildScout represents the MSG_MHF_GET_REJECT_GUILD_SCOUT diff --git a/network/mhfpacket/msg_mhf_get_rengoku_ranking_rank.go b/network/mhfpacket/msg_mhf_get_rengoku_ranking_rank.go index 0e6da4b83..6be22081b 100644 --- a/network/mhfpacket/msg_mhf_get_rengoku_ranking_rank.go +++ b/network/mhfpacket/msg_mhf_get_rengoku_ranking_rank.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetRengokuRankingRank represents the MSG_MHF_GET_RENGOKU_RANKING_RANK diff --git a/network/mhfpacket/msg_mhf_get_restriction_event.go b/network/mhfpacket/msg_mhf_get_restriction_event.go index 58ff86375..33846ea78 100644 --- a/network/mhfpacket/msg_mhf_get_restriction_event.go +++ b/network/mhfpacket/msg_mhf_get_restriction_event.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetRestrictionEvent represents the MSG_MHF_GET_RESTRICTION_EVENT diff --git a/network/mhfpacket/msg_mhf_get_reward_song.go b/network/mhfpacket/msg_mhf_get_reward_song.go index a861740d2..7221b38e5 100644 --- a/network/mhfpacket/msg_mhf_get_reward_song.go +++ b/network/mhfpacket/msg_mhf_get_reward_song.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetRewardSong represents the MSG_MHF_GET_REWARD_SONG diff --git a/network/mhfpacket/msg_mhf_get_tenrouirai.go b/network/mhfpacket/msg_mhf_get_tenrouirai.go index f3de7c9c4..37aa393b4 100644 --- a/network/mhfpacket/msg_mhf_get_tenrouirai.go +++ b/network/mhfpacket/msg_mhf_get_tenrouirai.go @@ -10,7 +10,7 @@ import ( // MsgMhfGetTenrouirai represents the MSG_MHF_GET_TENROUIRAI type MsgMhfGetTenrouirai struct { - AckHandle uint32 + AckHandle uint32 Unk0 uint8 DataType uint8 GuildID uint32 diff --git a/network/mhfpacket/msg_mhf_get_trend_weapon.go b/network/mhfpacket/msg_mhf_get_trend_weapon.go index e869ae732..6024b87eb 100644 --- a/network/mhfpacket/msg_mhf_get_trend_weapon.go +++ b/network/mhfpacket/msg_mhf_get_trend_weapon.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetTrendWeapon represents the MSG_MHF_GET_TREND_WEAPON diff --git a/network/mhfpacket/msg_mhf_get_ud_bonus_quest_info.go b/network/mhfpacket/msg_mhf_get_ud_bonus_quest_info.go index 0d5f22405..187dc9e6a 100644 --- a/network/mhfpacket/msg_mhf_get_ud_bonus_quest_info.go +++ b/network/mhfpacket/msg_mhf_get_ud_bonus_quest_info.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdBonusQuestInfo represents the MSG_MHF_GET_UD_BONUS_QUEST_INFO diff --git a/network/mhfpacket/msg_mhf_get_ud_daily_present_list.go b/network/mhfpacket/msg_mhf_get_ud_daily_present_list.go index 7850af681..bf6a763ee 100644 --- a/network/mhfpacket/msg_mhf_get_ud_daily_present_list.go +++ b/network/mhfpacket/msg_mhf_get_ud_daily_present_list.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdDailyPresentList represents the MSG_MHF_GET_UD_DAILY_PRESENT_LIST diff --git a/network/mhfpacket/msg_mhf_get_ud_guild_map_info.go b/network/mhfpacket/msg_mhf_get_ud_guild_map_info.go index c302a427b..eae01783e 100644 --- a/network/mhfpacket/msg_mhf_get_ud_guild_map_info.go +++ b/network/mhfpacket/msg_mhf_get_ud_guild_map_info.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdGuildMapInfo represents the MSG_MHF_GET_UD_GUILD_MAP_INFO diff --git a/network/mhfpacket/msg_mhf_get_ud_info.go b/network/mhfpacket/msg_mhf_get_ud_info.go index 4186e01a0..2b5d3f6ea 100644 --- a/network/mhfpacket/msg_mhf_get_ud_info.go +++ b/network/mhfpacket/msg_mhf_get_ud_info.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdInfo represents the MSG_MHF_GET_UD_INFO diff --git a/network/mhfpacket/msg_mhf_get_ud_monster_point.go b/network/mhfpacket/msg_mhf_get_ud_monster_point.go index 66383ef73..8d56be3f1 100644 --- a/network/mhfpacket/msg_mhf_get_ud_monster_point.go +++ b/network/mhfpacket/msg_mhf_get_ud_monster_point.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdMonsterPoint represents the MSG_MHF_GET_UD_MONSTER_POINT diff --git a/network/mhfpacket/msg_mhf_get_ud_my_point.go b/network/mhfpacket/msg_mhf_get_ud_my_point.go index d74a86a4c..4284161fc 100644 --- a/network/mhfpacket/msg_mhf_get_ud_my_point.go +++ b/network/mhfpacket/msg_mhf_get_ud_my_point.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdMyPoint represents the MSG_MHF_GET_UD_MY_POINT diff --git a/network/mhfpacket/msg_mhf_get_ud_my_ranking.go b/network/mhfpacket/msg_mhf_get_ud_my_ranking.go index 75efe0f00..f63630b64 100644 --- a/network/mhfpacket/msg_mhf_get_ud_my_ranking.go +++ b/network/mhfpacket/msg_mhf_get_ud_my_ranking.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdMyRanking represents the MSG_MHF_GET_UD_MY_RANKING diff --git a/network/mhfpacket/msg_mhf_get_ud_norma_present_list.go b/network/mhfpacket/msg_mhf_get_ud_norma_present_list.go index f6bf838f6..bdd15eee9 100644 --- a/network/mhfpacket/msg_mhf_get_ud_norma_present_list.go +++ b/network/mhfpacket/msg_mhf_get_ud_norma_present_list.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdNormaPresentList represents the MSG_MHF_GET_UD_NORMA_PRESENT_LIST diff --git a/network/mhfpacket/msg_mhf_get_ud_ranking.go b/network/mhfpacket/msg_mhf_get_ud_ranking.go index b6ccc968e..807b32c46 100644 --- a/network/mhfpacket/msg_mhf_get_ud_ranking.go +++ b/network/mhfpacket/msg_mhf_get_ud_ranking.go @@ -1,17 +1,17 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdRanking represents the MSG_MHF_GET_UD_RANKING -type MsgMhfGetUdRanking struct{ +type MsgMhfGetUdRanking struct { AckHandle uint32 - Unk0 uint8 + Unk0 uint8 } // Opcode returns the ID associated with this packet type. @@ -22,7 +22,7 @@ func (m *MsgMhfGetUdRanking) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfGetUdRanking) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { m.AckHandle = bf.ReadUint32() - m.Unk0 = bf.ReadUint8() + m.Unk0 = bf.ReadUint8() return nil } diff --git a/network/mhfpacket/msg_mhf_get_ud_ranking_reward_list.go b/network/mhfpacket/msg_mhf_get_ud_ranking_reward_list.go index b354c382a..380d9c81e 100644 --- a/network/mhfpacket/msg_mhf_get_ud_ranking_reward_list.go +++ b/network/mhfpacket/msg_mhf_get_ud_ranking_reward_list.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdRankingRewardList represents the MSG_MHF_GET_UD_RANKING_REWARD_LIST diff --git a/network/mhfpacket/msg_mhf_get_ud_schedule.go b/network/mhfpacket/msg_mhf_get_ud_schedule.go index c94939126..510a1371a 100644 --- a/network/mhfpacket/msg_mhf_get_ud_schedule.go +++ b/network/mhfpacket/msg_mhf_get_ud_schedule.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdSchedule represents the MSG_MHF_GET_UD_SCHEDULE diff --git a/network/mhfpacket/msg_mhf_get_ud_selected_color_info.go b/network/mhfpacket/msg_mhf_get_ud_selected_color_info.go index ccbe3bbb2..9c602a06d 100644 --- a/network/mhfpacket/msg_mhf_get_ud_selected_color_info.go +++ b/network/mhfpacket/msg_mhf_get_ud_selected_color_info.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdSelectedColorInfo represents the MSG_MHF_GET_UD_SELECTED_COLOR_INFO diff --git a/network/mhfpacket/msg_mhf_get_ud_shop_coin.go b/network/mhfpacket/msg_mhf_get_ud_shop_coin.go index fd06d27ba..3367bab35 100644 --- a/network/mhfpacket/msg_mhf_get_ud_shop_coin.go +++ b/network/mhfpacket/msg_mhf_get_ud_shop_coin.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdShopCoin represents the MSG_MHF_GET_UD_SHOP_COIN diff --git a/network/mhfpacket/msg_mhf_get_ud_tactics_bonus_quest.go b/network/mhfpacket/msg_mhf_get_ud_tactics_bonus_quest.go index e51a58cb3..81b49b612 100644 --- a/network/mhfpacket/msg_mhf_get_ud_tactics_bonus_quest.go +++ b/network/mhfpacket/msg_mhf_get_ud_tactics_bonus_quest.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdTacticsBonusQuest represents the MSG_MHF_GET_UD_TACTICS_BONUS_QUEST diff --git a/network/mhfpacket/msg_mhf_get_ud_tactics_first_quest_bonus.go b/network/mhfpacket/msg_mhf_get_ud_tactics_first_quest_bonus.go index d7f5c4ba0..0dd0c721a 100644 --- a/network/mhfpacket/msg_mhf_get_ud_tactics_first_quest_bonus.go +++ b/network/mhfpacket/msg_mhf_get_ud_tactics_first_quest_bonus.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdTacticsFirstQuestBonus represents the MSG_MHF_GET_UD_TACTICS_FIRST_QUEST_BONUS diff --git a/network/mhfpacket/msg_mhf_get_ud_tactics_follower.go b/network/mhfpacket/msg_mhf_get_ud_tactics_follower.go index 81407e954..0fc07e316 100644 --- a/network/mhfpacket/msg_mhf_get_ud_tactics_follower.go +++ b/network/mhfpacket/msg_mhf_get_ud_tactics_follower.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdTacticsFollower represents the MSG_MHF_GET_UD_TACTICS_FOLLOWER diff --git a/network/mhfpacket/msg_mhf_get_ud_tactics_log.go b/network/mhfpacket/msg_mhf_get_ud_tactics_log.go index 673a68183..6b64ab5d5 100644 --- a/network/mhfpacket/msg_mhf_get_ud_tactics_log.go +++ b/network/mhfpacket/msg_mhf_get_ud_tactics_log.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdTacticsLog represents the MSG_MHF_GET_UD_TACTICS_LOG diff --git a/network/mhfpacket/msg_mhf_get_ud_tactics_point.go b/network/mhfpacket/msg_mhf_get_ud_tactics_point.go index 0af79fac2..6bcd159a1 100644 --- a/network/mhfpacket/msg_mhf_get_ud_tactics_point.go +++ b/network/mhfpacket/msg_mhf_get_ud_tactics_point.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdTacticsPoint represents the MSG_MHF_GET_UD_TACTICS_POINT diff --git a/network/mhfpacket/msg_mhf_get_ud_tactics_ranking.go b/network/mhfpacket/msg_mhf_get_ud_tactics_ranking.go index fb392e95c..8358202a5 100644 --- a/network/mhfpacket/msg_mhf_get_ud_tactics_ranking.go +++ b/network/mhfpacket/msg_mhf_get_ud_tactics_ranking.go @@ -1,17 +1,17 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdTacticsRanking represents the MSG_MHF_GET_UD_TACTICS_RANKING type MsgMhfGetUdTacticsRanking struct { - AckHandle uint32 - GuildID uint32 + AckHandle uint32 + GuildID uint32 } // Opcode returns the ID associated with this packet type. @@ -21,9 +21,9 @@ func (m *MsgMhfGetUdTacticsRanking) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfGetUdTacticsRanking) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - m.AckHandle = bf.ReadUint32() - m.GuildID = bf.ReadUint32() - return nil + m.AckHandle = bf.ReadUint32() + m.GuildID = bf.ReadUint32() + return nil } // Build builds a binary packet from the current data. diff --git a/network/mhfpacket/msg_mhf_get_ud_tactics_reward_list.go b/network/mhfpacket/msg_mhf_get_ud_tactics_reward_list.go index d1a314ef3..bdf977832 100644 --- a/network/mhfpacket/msg_mhf_get_ud_tactics_reward_list.go +++ b/network/mhfpacket/msg_mhf_get_ud_tactics_reward_list.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdTacticsRewardList represents the MSG_MHF_GET_UD_TACTICS_REWARD_LIST diff --git a/network/mhfpacket/msg_mhf_get_ud_total_point_info.go b/network/mhfpacket/msg_mhf_get_ud_total_point_info.go index f3cd2bddc..a65899250 100644 --- a/network/mhfpacket/msg_mhf_get_ud_total_point_info.go +++ b/network/mhfpacket/msg_mhf_get_ud_total_point_info.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetUdTotalPointInfo represents the MSG_MHF_GET_UD_TOTAL_POINT_INFO diff --git a/network/mhfpacket/msg_mhf_get_weekly_schedule.go b/network/mhfpacket/msg_mhf_get_weekly_schedule.go index 3fa239ca4..e7fbbc9ea 100644 --- a/network/mhfpacket/msg_mhf_get_weekly_schedule.go +++ b/network/mhfpacket/msg_mhf_get_weekly_schedule.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetWeeklySchedule represents the MSG_MHF_GET_WEEKLY_SCHEDULE diff --git a/network/mhfpacket/msg_mhf_guacot_test.go b/network/mhfpacket/msg_mhf_guacot_test.go index 6ea06cf95..d3ebfb454 100644 --- a/network/mhfpacket/msg_mhf_guacot_test.go +++ b/network/mhfpacket/msg_mhf_guacot_test.go @@ -84,9 +84,9 @@ func TestMsgMhfUpdateGuacotParse_SingleEntry(t *testing.T) { func TestMsgMhfUpdateGuacotParse_MultipleEntries(t *testing.T) { bf := byteframe.NewByteFrame() - bf.WriteUint32(1) // AckHandle - bf.WriteUint16(3) // EntryCount - bf.WriteUint16(0) // Zeroed + bf.WriteUint32(1) // AckHandle + bf.WriteUint16(3) // EntryCount + bf.WriteUint16(0) // Zeroed for idx := uint32(0); idx < 3; idx++ { bf.WriteUint32(idx) // Index diff --git a/network/mhfpacket/msg_mhf_info_guild.go b/network/mhfpacket/msg_mhf_info_guild.go index b4a6f39c3..f6bc5f1aa 100644 --- a/network/mhfpacket/msg_mhf_info_guild.go +++ b/network/mhfpacket/msg_mhf_info_guild.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfInfoGuild represents the MSG_MHF_INFO_GUILD diff --git a/network/mhfpacket/msg_mhf_info_scenario_counter.go b/network/mhfpacket/msg_mhf_info_scenario_counter.go index 50a57ec5a..8dbeb967d 100644 --- a/network/mhfpacket/msg_mhf_info_scenario_counter.go +++ b/network/mhfpacket/msg_mhf_info_scenario_counter.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfInfoScenarioCounter represents the MSG_MHF_INFO_SCENARIO_COUNTER diff --git a/network/mhfpacket/msg_mhf_info_tournament.go b/network/mhfpacket/msg_mhf_info_tournament.go index bd8e727bf..ceb1e19d4 100644 --- a/network/mhfpacket/msg_mhf_info_tournament.go +++ b/network/mhfpacket/msg_mhf_info_tournament.go @@ -10,7 +10,7 @@ import ( // MsgMhfInfoTournament represents the MSG_MHF_INFO_TOURNAMENT type MsgMhfInfoTournament struct { - AckHandle uint32 + AckHandle uint32 QueryType uint8 TournamentID uint32 } diff --git a/network/mhfpacket/msg_mhf_kick_export_force.go b/network/mhfpacket/msg_mhf_kick_export_force.go index 902e8b02b..2dffcc5de 100644 --- a/network/mhfpacket/msg_mhf_kick_export_force.go +++ b/network/mhfpacket/msg_mhf_kick_export_force.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfKickExportForce represents the MSG_MHF_KICK_EXPORT_FORCE diff --git a/network/mhfpacket/msg_mhf_load_deco_myset.go b/network/mhfpacket/msg_mhf_load_deco_myset.go index c8c0fdba4..03d16a0ac 100644 --- a/network/mhfpacket/msg_mhf_load_deco_myset.go +++ b/network/mhfpacket/msg_mhf_load_deco_myset.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfLoadDecoMyset represents the MSG_MHF_LOAD_DECO_MYSET diff --git a/network/mhfpacket/msg_mhf_load_favorite_quest.go b/network/mhfpacket/msg_mhf_load_favorite_quest.go index 6490cc9a7..b7f2465a2 100644 --- a/network/mhfpacket/msg_mhf_load_favorite_quest.go +++ b/network/mhfpacket/msg_mhf_load_favorite_quest.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfLoadFavoriteQuest represents the MSG_MHF_LOAD_FAVORITE_QUEST diff --git a/network/mhfpacket/msg_mhf_load_guild_adventure.go b/network/mhfpacket/msg_mhf_load_guild_adventure.go index 53955a7e1..3b330f80b 100644 --- a/network/mhfpacket/msg_mhf_load_guild_adventure.go +++ b/network/mhfpacket/msg_mhf_load_guild_adventure.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfLoadGuildAdventure represents the MSG_MHF_LOAD_GUILD_ADVENTURE diff --git a/network/mhfpacket/msg_mhf_load_hunter_navi.go b/network/mhfpacket/msg_mhf_load_hunter_navi.go index 5c02131b9..26898dfe8 100644 --- a/network/mhfpacket/msg_mhf_load_hunter_navi.go +++ b/network/mhfpacket/msg_mhf_load_hunter_navi.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfLoadHunterNavi represents the MSG_MHF_LOAD_HUNTER_NAVI diff --git a/network/mhfpacket/msg_mhf_load_legend_dispatch.go b/network/mhfpacket/msg_mhf_load_legend_dispatch.go index 5d22265f9..d3acd5f1b 100644 --- a/network/mhfpacket/msg_mhf_load_legend_dispatch.go +++ b/network/mhfpacket/msg_mhf_load_legend_dispatch.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfLoadLegendDispatch represents the MSG_MHF_LOAD_LEGEND_DISPATCH diff --git a/network/mhfpacket/msg_mhf_load_mezfes_data.go b/network/mhfpacket/msg_mhf_load_mezfes_data.go index 194cbdc14..ee736aeb1 100644 --- a/network/mhfpacket/msg_mhf_load_mezfes_data.go +++ b/network/mhfpacket/msg_mhf_load_mezfes_data.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfLoadMezfesData represents the MSG_MHF_LOAD_MEZFES_DATA diff --git a/network/mhfpacket/msg_mhf_load_otomo_airou.go b/network/mhfpacket/msg_mhf_load_otomo_airou.go index e227ca08b..6b88c9c2e 100644 --- a/network/mhfpacket/msg_mhf_load_otomo_airou.go +++ b/network/mhfpacket/msg_mhf_load_otomo_airou.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfLoadOtomoAirou represents the MSG_MHF_LOAD_OTOMO_AIROU diff --git a/network/mhfpacket/msg_mhf_load_partner.go b/network/mhfpacket/msg_mhf_load_partner.go index 0921a3137..b09b2da3e 100644 --- a/network/mhfpacket/msg_mhf_load_partner.go +++ b/network/mhfpacket/msg_mhf_load_partner.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfLoadPartner represents the MSG_MHF_LOAD_PARTNER diff --git a/network/mhfpacket/msg_mhf_load_plate_box.go b/network/mhfpacket/msg_mhf_load_plate_box.go index 90cba90fe..57d1805ed 100644 --- a/network/mhfpacket/msg_mhf_load_plate_box.go +++ b/network/mhfpacket/msg_mhf_load_plate_box.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfLoadPlateBox represents the MSG_MHF_LOAD_PLATE_BOX diff --git a/network/mhfpacket/msg_mhf_load_plate_data.go b/network/mhfpacket/msg_mhf_load_plate_data.go index c942515d0..910456b18 100644 --- a/network/mhfpacket/msg_mhf_load_plate_data.go +++ b/network/mhfpacket/msg_mhf_load_plate_data.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfLoadPlateData represents the MSG_MHF_LOAD_PLATE_DATA diff --git a/network/mhfpacket/msg_mhf_load_plate_myset.go b/network/mhfpacket/msg_mhf_load_plate_myset.go index 2bcf99806..414101388 100644 --- a/network/mhfpacket/msg_mhf_load_plate_myset.go +++ b/network/mhfpacket/msg_mhf_load_plate_myset.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfLoadPlateMyset represents the MSG_MHF_LOAD_PLATE_MYSET diff --git a/network/mhfpacket/msg_mhf_load_rengoku_data.go b/network/mhfpacket/msg_mhf_load_rengoku_data.go index 3bf855d3f..9fdd58d4d 100644 --- a/network/mhfpacket/msg_mhf_load_rengoku_data.go +++ b/network/mhfpacket/msg_mhf_load_rengoku_data.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfLoadRengokuData represents the MSG_MHF_LOAD_RENGOKU_DATA diff --git a/network/mhfpacket/msg_mhf_load_scenario_data.go b/network/mhfpacket/msg_mhf_load_scenario_data.go index 387381877..f68f99a23 100644 --- a/network/mhfpacket/msg_mhf_load_scenario_data.go +++ b/network/mhfpacket/msg_mhf_load_scenario_data.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfLoadScenarioData represents the MSG_MHF_LOAD_SCENARIO_DATA diff --git a/network/mhfpacket/msg_mhf_loaddata.go b/network/mhfpacket/msg_mhf_loaddata.go index 548bf65ed..d246fc50f 100644 --- a/network/mhfpacket/msg_mhf_loaddata.go +++ b/network/mhfpacket/msg_mhf_loaddata.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfLoaddata represents the MSG_MHF_LOADDATA diff --git a/network/mhfpacket/msg_mhf_mercenary_huntdata.go b/network/mhfpacket/msg_mhf_mercenary_huntdata.go index f3e00915f..4fa5f2353 100644 --- a/network/mhfpacket/msg_mhf_mercenary_huntdata.go +++ b/network/mhfpacket/msg_mhf_mercenary_huntdata.go @@ -10,7 +10,7 @@ import ( // MsgMhfMercenaryHuntdata represents the MSG_MHF_MERCENARY_HUNTDATA type MsgMhfMercenaryHuntdata struct { - AckHandle uint32 + AckHandle uint32 RequestType uint8 } diff --git a/network/mhfpacket/msg_mhf_payment_achievement.go b/network/mhfpacket/msg_mhf_payment_achievement.go index 79ac7de14..5fe41314c 100644 --- a/network/mhfpacket/msg_mhf_payment_achievement.go +++ b/network/mhfpacket/msg_mhf_payment_achievement.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfPaymentAchievement represents the MSG_MHF_PAYMENT_ACHIEVEMENT diff --git a/network/mhfpacket/msg_mhf_post_boost_time.go b/network/mhfpacket/msg_mhf_post_boost_time.go index a345267fd..d90a3546b 100644 --- a/network/mhfpacket/msg_mhf_post_boost_time.go +++ b/network/mhfpacket/msg_mhf_post_boost_time.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfPostBoostTime represents the MSG_MHF_POST_BOOST_TIME diff --git a/network/mhfpacket/msg_mhf_post_boost_time_quest_return.go b/network/mhfpacket/msg_mhf_post_boost_time_quest_return.go index 34c1af357..04491f3df 100644 --- a/network/mhfpacket/msg_mhf_post_boost_time_quest_return.go +++ b/network/mhfpacket/msg_mhf_post_boost_time_quest_return.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfPostBoostTimeQuestReturn represents the MSG_MHF_POST_BOOST_TIME_QUEST_RETURN diff --git a/network/mhfpacket/msg_mhf_post_guild_scout.go b/network/mhfpacket/msg_mhf_post_guild_scout.go index 69b7ab6e9..a22aec96b 100644 --- a/network/mhfpacket/msg_mhf_post_guild_scout.go +++ b/network/mhfpacket/msg_mhf_post_guild_scout.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfPostGuildScout represents the MSG_MHF_POST_GUILD_SCOUT diff --git a/network/mhfpacket/msg_mhf_post_ryoudama.go b/network/mhfpacket/msg_mhf_post_ryoudama.go index 51fe57eb0..4a5f3a8da 100644 --- a/network/mhfpacket/msg_mhf_post_ryoudama.go +++ b/network/mhfpacket/msg_mhf_post_ryoudama.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfPostRyoudama represents the MSG_MHF_POST_RYOUDAMA diff --git a/network/mhfpacket/msg_mhf_read_beat_level.go b/network/mhfpacket/msg_mhf_read_beat_level.go index 858a265bc..30e18b266 100644 --- a/network/mhfpacket/msg_mhf_read_beat_level.go +++ b/network/mhfpacket/msg_mhf_read_beat_level.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfReadBeatLevel represents the MSG_MHF_READ_BEAT_LEVEL diff --git a/network/mhfpacket/msg_mhf_read_guildcard.go b/network/mhfpacket/msg_mhf_read_guildcard.go index c844fe3b5..fc69ab1b8 100644 --- a/network/mhfpacket/msg_mhf_read_guildcard.go +++ b/network/mhfpacket/msg_mhf_read_guildcard.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfReadGuildcard represents the MSG_MHF_READ_GUILDCARD diff --git a/network/mhfpacket/msg_mhf_receive_cafe_duration_bonus.go b/network/mhfpacket/msg_mhf_receive_cafe_duration_bonus.go index fab7e1641..eb0848075 100644 --- a/network/mhfpacket/msg_mhf_receive_cafe_duration_bonus.go +++ b/network/mhfpacket/msg_mhf_receive_cafe_duration_bonus.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfReceiveCafeDurationBonus represents the MSG_MHF_RECEIVE_CAFE_DURATION_BONUS diff --git a/network/mhfpacket/msg_mhf_regist_guild_adventure.go b/network/mhfpacket/msg_mhf_regist_guild_adventure.go index 9e4196d89..c4ec6104a 100644 --- a/network/mhfpacket/msg_mhf_regist_guild_adventure.go +++ b/network/mhfpacket/msg_mhf_regist_guild_adventure.go @@ -1,17 +1,17 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfRegistGuildAdventure represents the MSG_MHF_REGIST_GUILD_ADVENTURE type MsgMhfRegistGuildAdventure struct { - AckHandle uint32 - Destination uint32 + AckHandle uint32 + Destination uint32 } // Opcode returns the ID associated with this packet type. @@ -21,10 +21,10 @@ func (m *MsgMhfRegistGuildAdventure) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfRegistGuildAdventure) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - m.AckHandle = bf.ReadUint32() - m.Destination = bf.ReadUint32() - _ = bf.ReadUint32() // CharID - return nil + m.AckHandle = bf.ReadUint32() + m.Destination = bf.ReadUint32() + _ = bf.ReadUint32() // CharID + return nil } // Build builds a binary packet from the current data. diff --git a/network/mhfpacket/msg_mhf_regist_guild_adventure_diva.go b/network/mhfpacket/msg_mhf_regist_guild_adventure_diva.go index 37944d3f8..8895ee08b 100644 --- a/network/mhfpacket/msg_mhf_regist_guild_adventure_diva.go +++ b/network/mhfpacket/msg_mhf_regist_guild_adventure_diva.go @@ -1,18 +1,18 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfRegistGuildAdventureDiva represents the MSG_MHF_REGIST_GUILD_ADVENTURE_DIVA type MsgMhfRegistGuildAdventureDiva struct { - AckHandle uint32 - Destination uint32 - Charge uint32 + AckHandle uint32 + Destination uint32 + Charge uint32 } // Opcode returns the ID associated with this packet type. @@ -22,11 +22,11 @@ func (m *MsgMhfRegistGuildAdventureDiva) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfRegistGuildAdventureDiva) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - m.AckHandle = bf.ReadUint32() - m.Destination = bf.ReadUint32() - m.Charge = bf.ReadUint32() - _ = bf.ReadUint32() // CharID - return nil + m.AckHandle = bf.ReadUint32() + m.Destination = bf.ReadUint32() + m.Charge = bf.ReadUint32() + _ = bf.ReadUint32() // CharID + return nil } // Build builds a binary packet from the current data. diff --git a/network/mhfpacket/msg_mhf_regist_guild_cooking.go b/network/mhfpacket/msg_mhf_regist_guild_cooking.go index c3cbe0523..04343cd9e 100644 --- a/network/mhfpacket/msg_mhf_regist_guild_cooking.go +++ b/network/mhfpacket/msg_mhf_regist_guild_cooking.go @@ -1,19 +1,19 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfRegistGuildCooking represents the MSG_MHF_REGIST_GUILD_COOKING -type MsgMhfRegistGuildCooking struct{ - AckHandle uint32 +type MsgMhfRegistGuildCooking struct { + AckHandle uint32 OverwriteID uint32 - MealID uint16 - Success uint8 + MealID uint16 + Success uint8 } // Opcode returns the ID associated with this packet type. diff --git a/network/mhfpacket/msg_mhf_regist_spabi_time.go b/network/mhfpacket/msg_mhf_regist_spabi_time.go index 0b0830f77..0f598cb36 100644 --- a/network/mhfpacket/msg_mhf_regist_spabi_time.go +++ b/network/mhfpacket/msg_mhf_regist_spabi_time.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfRegistSpabiTime represents the MSG_MHF_REGIST_SPABI_TIME diff --git a/network/mhfpacket/msg_mhf_reserve10f.go b/network/mhfpacket/msg_mhf_reserve10f.go index 5346ba4f7..321e00aeb 100644 --- a/network/mhfpacket/msg_mhf_reserve10f.go +++ b/network/mhfpacket/msg_mhf_reserve10f.go @@ -1,11 +1,11 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfReserve10F represents the MSG_MHF_reserve10F diff --git a/network/mhfpacket/msg_mhf_reset_achievement.go b/network/mhfpacket/msg_mhf_reset_achievement.go index 07a1f4ff9..67ee60d60 100644 --- a/network/mhfpacket/msg_mhf_reset_achievement.go +++ b/network/mhfpacket/msg_mhf_reset_achievement.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfResetAchievement represents the MSG_MHF_RESET_ACHIEVEMENT diff --git a/network/mhfpacket/msg_mhf_reset_title.go b/network/mhfpacket/msg_mhf_reset_title.go index f1771ee07..92d60b14d 100644 --- a/network/mhfpacket/msg_mhf_reset_title.go +++ b/network/mhfpacket/msg_mhf_reset_title.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfResetTitle represents the MSG_MHF_RESET_TITLE diff --git a/network/mhfpacket/msg_mhf_save_deco_myset.go b/network/mhfpacket/msg_mhf_save_deco_myset.go index 08355a9c3..e31ba01d0 100644 --- a/network/mhfpacket/msg_mhf_save_deco_myset.go +++ b/network/mhfpacket/msg_mhf_save_deco_myset.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfSaveDecoMyset represents the MSG_MHF_SAVE_DECO_MYSET diff --git a/network/mhfpacket/msg_mhf_save_favorite_quest.go b/network/mhfpacket/msg_mhf_save_favorite_quest.go index 738d515ad..46d6e0470 100644 --- a/network/mhfpacket/msg_mhf_save_favorite_quest.go +++ b/network/mhfpacket/msg_mhf_save_favorite_quest.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfSaveFavoriteQuest represents the MSG_MHF_SAVE_FAVORITE_QUEST diff --git a/network/mhfpacket/msg_mhf_save_hunter_navi.go b/network/mhfpacket/msg_mhf_save_hunter_navi.go index fdd222bce..497414760 100644 --- a/network/mhfpacket/msg_mhf_save_hunter_navi.go +++ b/network/mhfpacket/msg_mhf_save_hunter_navi.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfSaveHunterNavi represents the MSG_MHF_SAVE_HUNTER_NAVI diff --git a/network/mhfpacket/msg_mhf_save_mezfes_data.go b/network/mhfpacket/msg_mhf_save_mezfes_data.go index e7cf79d17..2a688a048 100644 --- a/network/mhfpacket/msg_mhf_save_mezfes_data.go +++ b/network/mhfpacket/msg_mhf_save_mezfes_data.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfSaveMezfesData represents the MSG_MHF_SAVE_MEZFES_DATA diff --git a/network/mhfpacket/msg_mhf_save_otomo_airou.go b/network/mhfpacket/msg_mhf_save_otomo_airou.go index 4e9bf4996..7768016f6 100644 --- a/network/mhfpacket/msg_mhf_save_otomo_airou.go +++ b/network/mhfpacket/msg_mhf_save_otomo_airou.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfSaveOtomoAirou represents the MSG_MHF_SAVE_OTOMO_AIROU diff --git a/network/mhfpacket/msg_mhf_save_partner.go b/network/mhfpacket/msg_mhf_save_partner.go index 4efab1458..e42792188 100644 --- a/network/mhfpacket/msg_mhf_save_partner.go +++ b/network/mhfpacket/msg_mhf_save_partner.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfSavePartner represents the MSG_MHF_SAVE_PARTNER diff --git a/network/mhfpacket/msg_mhf_save_plate_box.go b/network/mhfpacket/msg_mhf_save_plate_box.go index c63f94ef7..d1f83c855 100644 --- a/network/mhfpacket/msg_mhf_save_plate_box.go +++ b/network/mhfpacket/msg_mhf_save_plate_box.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfSavePlateBox represents the MSG_MHF_SAVE_PLATE_BOX diff --git a/network/mhfpacket/msg_mhf_save_plate_data.go b/network/mhfpacket/msg_mhf_save_plate_data.go index 74edd1189..89c6a8536 100644 --- a/network/mhfpacket/msg_mhf_save_plate_data.go +++ b/network/mhfpacket/msg_mhf_save_plate_data.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfSavePlateData represents the MSG_MHF_SAVE_PLATE_DATA diff --git a/network/mhfpacket/msg_mhf_save_plate_myset.go b/network/mhfpacket/msg_mhf_save_plate_myset.go index 833b46b3e..34d31d1ac 100644 --- a/network/mhfpacket/msg_mhf_save_plate_myset.go +++ b/network/mhfpacket/msg_mhf_save_plate_myset.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfSavePlateMyset represents the MSG_MHF_SAVE_PLATE_MYSET diff --git a/network/mhfpacket/msg_mhf_save_rengoku_data.go b/network/mhfpacket/msg_mhf_save_rengoku_data.go index 2681a98b9..331301711 100644 --- a/network/mhfpacket/msg_mhf_save_rengoku_data.go +++ b/network/mhfpacket/msg_mhf_save_rengoku_data.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfSaveRengokuData represents the MSG_MHF_SAVE_RENGOKU_DATA diff --git a/network/mhfpacket/msg_mhf_save_scenario_data.go b/network/mhfpacket/msg_mhf_save_scenario_data.go index e07f775dc..eed4fd787 100644 --- a/network/mhfpacket/msg_mhf_save_scenario_data.go +++ b/network/mhfpacket/msg_mhf_save_scenario_data.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfSaveScenarioData represents the MSG_MHF_SAVE_SCENARIO_DATA diff --git a/network/mhfpacket/msg_mhf_server_command.go b/network/mhfpacket/msg_mhf_server_command.go index 11c7040a6..5111f4a84 100644 --- a/network/mhfpacket/msg_mhf_server_command.go +++ b/network/mhfpacket/msg_mhf_server_command.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfServerCommand represents the MSG_MHF_SERVER_COMMAND diff --git a/network/mhfpacket/msg_mhf_set_ca_achievement.go b/network/mhfpacket/msg_mhf_set_ca_achievement.go index ec83b5f42..12690cd7c 100644 --- a/network/mhfpacket/msg_mhf_set_ca_achievement.go +++ b/network/mhfpacket/msg_mhf_set_ca_achievement.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfSetCaAchievement represents the MSG_MHF_SET_CA_ACHIEVEMENT diff --git a/network/mhfpacket/msg_mhf_set_daily_mission_personal.go b/network/mhfpacket/msg_mhf_set_daily_mission_personal.go index 6c21fb370..4b5da5c52 100644 --- a/network/mhfpacket/msg_mhf_set_daily_mission_personal.go +++ b/network/mhfpacket/msg_mhf_set_daily_mission_personal.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfSetDailyMissionPersonal represents the MSG_MHF_SET_DAILY_MISSION_PERSONAL diff --git a/network/mhfpacket/msg_mhf_set_enhanced_minidata.go b/network/mhfpacket/msg_mhf_set_enhanced_minidata.go index 279a0f067..d8fab7485 100644 --- a/network/mhfpacket/msg_mhf_set_enhanced_minidata.go +++ b/network/mhfpacket/msg_mhf_set_enhanced_minidata.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfSetEnhancedMinidata represents the MSG_MHF_SET_ENHANCED_MINIDATA diff --git a/network/mhfpacket/msg_mhf_set_guild_mission_target.go b/network/mhfpacket/msg_mhf_set_guild_mission_target.go index 768fb6423..bb30dd07c 100644 --- a/network/mhfpacket/msg_mhf_set_guild_mission_target.go +++ b/network/mhfpacket/msg_mhf_set_guild_mission_target.go @@ -1,17 +1,17 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfSetGuildMissionTarget represents the MSG_MHF_SET_GUILD_MISSION_TARGET type MsgMhfSetGuildMissionTarget struct { - AckHandle uint32 - MissionID uint32 + AckHandle uint32 + MissionID uint32 } // Opcode returns the ID associated with this packet type. @@ -21,9 +21,9 @@ func (m *MsgMhfSetGuildMissionTarget) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfSetGuildMissionTarget) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - m.AckHandle = bf.ReadUint32() - m.MissionID = bf.ReadUint32() - return nil + m.AckHandle = bf.ReadUint32() + m.MissionID = bf.ReadUint32() + return nil } // Build builds a binary packet from the current data. diff --git a/network/mhfpacket/msg_mhf_set_kiju.go b/network/mhfpacket/msg_mhf_set_kiju.go index a8cc70529..071a4e60a 100644 --- a/network/mhfpacket/msg_mhf_set_kiju.go +++ b/network/mhfpacket/msg_mhf_set_kiju.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfSetKiju represents the MSG_MHF_SET_KIJU diff --git a/network/mhfpacket/msg_mhf_set_loginwindow.go b/network/mhfpacket/msg_mhf_set_loginwindow.go index 9b551e8a0..9672fc9ee 100644 --- a/network/mhfpacket/msg_mhf_set_loginwindow.go +++ b/network/mhfpacket/msg_mhf_set_loginwindow.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfSetLoginwindow represents the MSG_MHF_SET_LOGINWINDOW diff --git a/network/mhfpacket/msg_mhf_set_reject_guild_scout.go b/network/mhfpacket/msg_mhf_set_reject_guild_scout.go index f90d432f4..f3847f21c 100644 --- a/network/mhfpacket/msg_mhf_set_reject_guild_scout.go +++ b/network/mhfpacket/msg_mhf_set_reject_guild_scout.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfSetRejectGuildScout represents the MSG_MHF_SET_REJECT_GUILD_SCOUT diff --git a/network/mhfpacket/msg_mhf_set_restriction_event.go b/network/mhfpacket/msg_mhf_set_restriction_event.go index be97c5c2c..b8fd32895 100644 --- a/network/mhfpacket/msg_mhf_set_restriction_event.go +++ b/network/mhfpacket/msg_mhf_set_restriction_event.go @@ -1,20 +1,20 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfSetRestrictionEvent represents the MSG_MHF_SET_RESTRICTION_EVENT type MsgMhfSetRestrictionEvent struct { - AckHandle uint32 - Unk0 uint32 - Unk1 uint32 - Unk2 uint32 - Unk3 uint8 + AckHandle uint32 + Unk0 uint32 + Unk1 uint32 + Unk2 uint32 + Unk3 uint8 } // Opcode returns the ID associated with this packet type. @@ -24,11 +24,11 @@ func (m *MsgMhfSetRestrictionEvent) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfSetRestrictionEvent) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - m.AckHandle = bf.ReadUint32() - m.Unk0 = bf.ReadUint32() - m.Unk1 = bf.ReadUint32() - m.Unk2 = bf.ReadUint32() - m.Unk3 = bf.ReadUint8() + m.AckHandle = bf.ReadUint32() + m.Unk0 = bf.ReadUint32() + m.Unk1 = bf.ReadUint32() + m.Unk2 = bf.ReadUint32() + m.Unk3 = bf.ReadUint8() return nil } diff --git a/network/mhfpacket/msg_mhf_set_ud_tactics_follower.go b/network/mhfpacket/msg_mhf_set_ud_tactics_follower.go index 84f2bafa6..c9fb4d320 100644 --- a/network/mhfpacket/msg_mhf_set_ud_tactics_follower.go +++ b/network/mhfpacket/msg_mhf_set_ud_tactics_follower.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfSetUdTacticsFollower represents the MSG_MHF_SET_UD_TACTICS_FOLLOWER diff --git a/network/mhfpacket/msg_mhf_shut_client.go b/network/mhfpacket/msg_mhf_shut_client.go index c3b58ca4c..4fd70e553 100644 --- a/network/mhfpacket/msg_mhf_shut_client.go +++ b/network/mhfpacket/msg_mhf_shut_client.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfShutClient represents the MSG_MHF_SHUT_CLIENT diff --git a/network/mhfpacket/msg_mhf_stampcard_prize.go b/network/mhfpacket/msg_mhf_stampcard_prize.go index 7ec4491d9..0352e648c 100644 --- a/network/mhfpacket/msg_mhf_stampcard_prize.go +++ b/network/mhfpacket/msg_mhf_stampcard_prize.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfStampcardPrize represents the MSG_MHF_STAMPCARD_PRIZE diff --git a/network/mhfpacket/msg_mhf_update_equip_skin_hist.go b/network/mhfpacket/msg_mhf_update_equip_skin_hist.go index 3117fc8a9..5979c6739 100644 --- a/network/mhfpacket/msg_mhf_update_equip_skin_hist.go +++ b/network/mhfpacket/msg_mhf_update_equip_skin_hist.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfUpdateEquipSkinHist represents the MSG_MHF_UPDATE_EQUIP_SKIN_HIST diff --git a/network/mhfpacket/msg_mhf_update_force_guild_rank.go b/network/mhfpacket/msg_mhf_update_force_guild_rank.go index 4fc18bf9f..bbfd4dc7e 100644 --- a/network/mhfpacket/msg_mhf_update_force_guild_rank.go +++ b/network/mhfpacket/msg_mhf_update_force_guild_rank.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfUpdateForceGuildRank represents the MSG_MHF_UPDATE_FORCE_GUILD_RANK diff --git a/network/mhfpacket/msg_mhf_update_guild.go b/network/mhfpacket/msg_mhf_update_guild.go index 8cd0df4d0..b53daa571 100644 --- a/network/mhfpacket/msg_mhf_update_guild.go +++ b/network/mhfpacket/msg_mhf_update_guild.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfUpdateGuild represents the MSG_MHF_UPDATE_GUILD diff --git a/network/mhfpacket/msg_mhf_update_guildcard.go b/network/mhfpacket/msg_mhf_update_guildcard.go index c1606d4e4..16b2cb1ab 100644 --- a/network/mhfpacket/msg_mhf_update_guildcard.go +++ b/network/mhfpacket/msg_mhf_update_guildcard.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfUpdateGuildcard represents the MSG_MHF_UPDATE_GUILDCARD diff --git a/network/mhfpacket/msg_mhf_update_house.go b/network/mhfpacket/msg_mhf_update_house.go index 872ff3e6c..107d45db1 100644 --- a/network/mhfpacket/msg_mhf_update_house.go +++ b/network/mhfpacket/msg_mhf_update_house.go @@ -11,10 +11,10 @@ import ( // MsgMhfUpdateHouse represents the MSG_MHF_UPDATE_HOUSE type MsgMhfUpdateHouse struct { - AckHandle uint32 - State uint8 + AckHandle uint32 + State uint8 HasPassword uint8 // 0 = no password, 1 = has password - Password string + Password string } // Opcode returns the ID associated with this packet type. diff --git a/network/mhfpacket/msg_mhf_use_keep_login_boost.go b/network/mhfpacket/msg_mhf_use_keep_login_boost.go index 5d88f6c29..faf9375f4 100644 --- a/network/mhfpacket/msg_mhf_use_keep_login_boost.go +++ b/network/mhfpacket/msg_mhf_use_keep_login_boost.go @@ -3,9 +3,9 @@ package mhfpacket import ( "errors" + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgMhfUseKeepLoginBoost represents the MSG_MHF_USE_KEEP_LOGIN_BOOST diff --git a/network/mhfpacket/msg_mhf_use_reward_song.go b/network/mhfpacket/msg_mhf_use_reward_song.go index 0a297e0fd..a2ec909e7 100644 --- a/network/mhfpacket/msg_mhf_use_reward_song.go +++ b/network/mhfpacket/msg_mhf_use_reward_song.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfUseRewardSong represents the MSG_MHF_USE_REWARD_SONG diff --git a/network/mhfpacket/msg_mhf_use_ud_shop_coin.go b/network/mhfpacket/msg_mhf_use_ud_shop_coin.go index 216a6896e..c3ab78bf1 100644 --- a/network/mhfpacket/msg_mhf_use_ud_shop_coin.go +++ b/network/mhfpacket/msg_mhf_use_ud_shop_coin.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfUseUdShopCoin represents the MSG_MHF_USE_UD_SHOP_COIN diff --git a/network/mhfpacket/msg_parse_coverage_test.go b/network/mhfpacket/msg_parse_coverage_test.go index 5ae96d4e2..974089cef 100644 --- a/network/mhfpacket/msg_parse_coverage_test.go +++ b/network/mhfpacket/msg_parse_coverage_test.go @@ -80,9 +80,9 @@ func TestParseCoverage_VariableLength(t *testing.T) { t.Run("MsgMhfAcquireItem_EmptyList", func(t *testing.T) { bf := byteframe.NewByteFrame() - bf.WriteUint32(1) // AckHandle - bf.WriteUint16(0) // Unk0 - bf.WriteUint16(0) // Length = 0 items + bf.WriteUint32(1) // AckHandle + bf.WriteUint16(0) // Unk0 + bf.WriteUint16(0) // Length = 0 items pkt := &MsgMhfAcquireItem{} parsed := byteframe.NewByteFrameFromBytes(bf.Data()) if err := pkt.Parse(parsed, ctx); err != nil { @@ -92,9 +92,9 @@ func TestParseCoverage_VariableLength(t *testing.T) { t.Run("MsgMhfAcquireItem_WithItems", func(t *testing.T) { bf := byteframe.NewByteFrame() - bf.WriteUint32(1) // AckHandle - bf.WriteUint16(0) // Unk0 - bf.WriteUint16(2) // Length = 2 items + bf.WriteUint32(1) // AckHandle + bf.WriteUint16(0) // Unk0 + bf.WriteUint16(2) // Length = 2 items bf.WriteUint32(100) // item 1 bf.WriteUint32(200) // item 2 pkt := &MsgMhfAcquireItem{} @@ -127,8 +127,8 @@ func TestParseCoverage_VariableLength(t *testing.T) { t.Run("MsgSysRightsReload", func(t *testing.T) { bf := byteframe.NewByteFrame() - bf.WriteUint32(1) // AckHandle - bf.WriteUint8(3) // length + bf.WriteUint32(1) // AckHandle + bf.WriteUint8(3) // length bf.WriteBytes([]byte{0x01, 0x02, 0x03}) // Unk0 pkt := &MsgSysRightsReload{} parsed := byteframe.NewByteFrameFromBytes(bf.Data()) @@ -139,9 +139,9 @@ func TestParseCoverage_VariableLength(t *testing.T) { t.Run("MsgMhfCreateGuild", func(t *testing.T) { bf := byteframe.NewByteFrame() - bf.WriteUint32(1) // AckHandle - bf.WriteUint16(0) // zeroed - bf.WriteUint16(4) // name length + bf.WriteUint32(1) // AckHandle + bf.WriteUint16(0) // zeroed + bf.WriteUint16(4) // name length bf.WriteBytes([]byte("Test\x00")) // null-terminated name pkt := &MsgMhfCreateGuild{} parsed := byteframe.NewByteFrameFromBytes(bf.Data()) @@ -152,15 +152,15 @@ func TestParseCoverage_VariableLength(t *testing.T) { t.Run("MsgMhfEnumerateGuild", func(t *testing.T) { bf := byteframe.NewByteFrame() - bf.WriteUint32(1) // AckHandle - bf.WriteUint8(0) // Type - bf.WriteUint8(0) // Page - bf.WriteBool(false) // Sorting - bf.WriteUint8(0) // zero + bf.WriteUint32(1) // AckHandle + bf.WriteUint8(0) // Type + bf.WriteUint8(0) // Page + bf.WriteBool(false) // Sorting + bf.WriteUint8(0) // zero bf.WriteBytes(make([]byte, 4)) // Data1 - bf.WriteUint16(0) // zero - bf.WriteUint8(0) // dataLen = 0 - bf.WriteUint8(0) // zero + bf.WriteUint16(0) // zero + bf.WriteUint8(0) // dataLen = 0 + bf.WriteUint8(0) // zero pkt := &MsgMhfEnumerateGuild{} parsed := byteframe.NewByteFrameFromBytes(bf.Data()) if err := pkt.Parse(parsed, ctx); err != nil { @@ -170,9 +170,9 @@ func TestParseCoverage_VariableLength(t *testing.T) { t.Run("MsgSysCreateSemaphore", func(t *testing.T) { bf := byteframe.NewByteFrame() - bf.WriteUint32(1) // AckHandle - bf.WriteUint16(0) // Unk0 - bf.WriteUint8(5) // semaphore ID length + bf.WriteUint32(1) // AckHandle + bf.WriteUint16(0) // Unk0 + bf.WriteUint8(5) // semaphore ID length bf.WriteNullTerminatedBytes([]byte("test")) pkt := &MsgSysCreateSemaphore{} parsed := byteframe.NewByteFrameFromBytes(bf.Data()) @@ -198,8 +198,8 @@ func TestParseCoverage_VariableLength(t *testing.T) { t.Run("MsgMhfUpdateGuildMessageBoard_Op1", func(t *testing.T) { bf := byteframe.NewByteFrame() - bf.WriteUint32(1) // AckHandle - bf.WriteUint32(1) // MessageOp = 1 + bf.WriteUint32(1) // AckHandle + bf.WriteUint32(1) // MessageOp = 1 bf.WriteUint32(42) // PostID pkt := &MsgMhfUpdateGuildMessageBoard{} parsed := byteframe.NewByteFrameFromBytes(bf.Data()) @@ -210,11 +210,11 @@ func TestParseCoverage_VariableLength(t *testing.T) { t.Run("MsgMhfUpdateGuildMessageBoard_Op3", func(t *testing.T) { bf := byteframe.NewByteFrame() - bf.WriteUint32(1) // AckHandle - bf.WriteUint32(3) // MessageOp = 3 - bf.WriteUint32(42) // PostID + bf.WriteUint32(1) // AckHandle + bf.WriteUint32(3) // MessageOp = 3 + bf.WriteUint32(42) // PostID bf.WriteBytes(make([]byte, 8)) // skip - bf.WriteUint32(0) // StampID + bf.WriteUint32(0) // StampID pkt := &MsgMhfUpdateGuildMessageBoard{} parsed := byteframe.NewByteFrameFromBytes(bf.Data()) if err := pkt.Parse(parsed, ctx); err != nil { @@ -224,11 +224,11 @@ func TestParseCoverage_VariableLength(t *testing.T) { t.Run("MsgMhfUpdateGuildMessageBoard_Op4", func(t *testing.T) { bf := byteframe.NewByteFrame() - bf.WriteUint32(1) // AckHandle - bf.WriteUint32(4) // MessageOp = 4 - bf.WriteUint32(42) // PostID + bf.WriteUint32(1) // AckHandle + bf.WriteUint32(4) // MessageOp = 4 + bf.WriteUint32(42) // PostID bf.WriteBytes(make([]byte, 8)) // skip - bf.WriteBool(true) // LikeState + bf.WriteBool(true) // LikeState pkt := &MsgMhfUpdateGuildMessageBoard{} parsed := byteframe.NewByteFrameFromBytes(bf.Data()) if err := pkt.Parse(parsed, ctx); err != nil { @@ -371,12 +371,12 @@ func TestParseCoverage_UpdateWarehouse(t *testing.T) { t.Run("EmptyChanges", func(t *testing.T) { bf := byteframe.NewByteFrame() - bf.WriteUint32(1) // AckHandle - bf.WriteUint8(0) // BoxType = 0 (items) - bf.WriteUint8(0) // BoxIndex - bf.WriteUint16(0) // changes = 0 - bf.WriteUint8(0) // Zeroed - bf.WriteUint8(0) // Zeroed + bf.WriteUint32(1) // AckHandle + bf.WriteUint8(0) // BoxType = 0 (items) + bf.WriteUint8(0) // BoxIndex + bf.WriteUint16(0) // changes = 0 + bf.WriteUint8(0) // Zeroed + bf.WriteUint8(0) // Zeroed pkt := &MsgMhfUpdateWarehouse{} parsed := byteframe.NewByteFrameFromBytes(bf.Data()) if err := pkt.Parse(parsed, ctx); err != nil { diff --git a/network/mhfpacket/msg_parse_large_test.go b/network/mhfpacket/msg_parse_large_test.go index c509c4885..a1a1595a1 100644 --- a/network/mhfpacket/msg_parse_large_test.go +++ b/network/mhfpacket/msg_parse_large_test.go @@ -17,7 +17,7 @@ func TestParseLargeMsgSysUpdateRightBuild(t *testing.T) { ClientRespAckHandle: 0x12345678, Bitfield: 0xDEADBEEF, Rights: nil, - TokenLength: 0, + TokenLength: 0, } bf := byteframe.NewByteFrame() @@ -82,12 +82,12 @@ func TestParseLargeMsgMhfOperateWarehouse(t *testing.T) { // TestParseLargeMsgMhfOperateWarehouseEquip tests Parse for MsgMhfOperateWarehouse with equip box type. func TestParseLargeMsgMhfOperateWarehouseEquip(t *testing.T) { bf := byteframe.NewByteFrame() - bf.WriteUint32(42) // AckHandle - bf.WriteUint8(2) // Operation - bf.WriteUint8(1) // BoxType = equip - bf.WriteUint8(0) // BoxIndex - bf.WriteUint8(5) // lenName - bf.WriteUint16(0) // Unk + bf.WriteUint32(42) // AckHandle + bf.WriteUint8(2) // Operation + bf.WriteUint8(1) // BoxType = equip + bf.WriteUint8(0) // BoxIndex + bf.WriteUint8(5) // lenName + bf.WriteUint16(0) // Unk bf.WriteBytes([]byte("Arms")) bf.WriteUint8(0) // null terminator _, _ = bf.Seek(0, io.SeekStart) @@ -126,7 +126,7 @@ func TestParseLargeMsgMhfLoadHouse(t *testing.T) { bf.WriteUint32(tt.charID) bf.WriteUint8(tt.destination) bf.WriteBool(tt.checkPass) - bf.WriteUint16(0) // Unk (hardcoded 0) + bf.WriteUint16(0) // Unk (hardcoded 0) bf.WriteUint8(uint8(len(tt.password) + 1)) // Password length bf.WriteBytes([]byte(tt.password)) bf.WriteUint8(0) // null terminator @@ -298,11 +298,11 @@ func TestParseLargeMsgMhfChargeFesta(t *testing.T) { // TestParseLargeMsgMhfChargeFestaZeroSouls tests Parse for MsgMhfChargeFesta with zero soul entries. func TestParseLargeMsgMhfChargeFestaZeroSouls(t *testing.T) { bf := byteframe.NewByteFrame() - bf.WriteUint32(1) // AckHandle - bf.WriteUint32(0) // FestaID - bf.WriteUint32(0) // GuildID - bf.WriteUint16(0) // soul count = 0 - bf.WriteUint8(0) // Unk + bf.WriteUint32(1) // AckHandle + bf.WriteUint32(0) // FestaID + bf.WriteUint32(0) // GuildID + bf.WriteUint16(0) // soul count = 0 + bf.WriteUint8(0) // Unk _, _ = bf.Seek(0, io.SeekStart) pkt := &MsgMhfChargeFesta{} @@ -319,13 +319,13 @@ func TestParseLargeMsgMhfChargeFestaZeroSouls(t *testing.T) { // uint8 dataLen, 4 bytes Data1, dataLen bytes Data2. func TestParseLargeMsgMhfOperateJoint(t *testing.T) { bf := byteframe.NewByteFrame() - bf.WriteUint32(0x12345678) // AckHandle - bf.WriteUint32(100) // AllianceID - bf.WriteUint32(200) // GuildID - bf.WriteUint8(0x01) // Action = OPERATE_JOINT_DISBAND - bf.WriteUint8(3) // dataLen = 3 + bf.WriteUint32(0x12345678) // AckHandle + bf.WriteUint32(100) // AllianceID + bf.WriteUint32(200) // GuildID + bf.WriteUint8(0x01) // Action = OPERATE_JOINT_DISBAND + bf.WriteUint8(3) // dataLen = 3 bf.WriteBytes([]byte{0xAA, 0xBB, 0xCC, 0xDD}) // Data1 (always 4 bytes) - bf.WriteBytes([]byte{0x01, 0x02, 0x03}) // Data2 (dataLen bytes) + bf.WriteBytes([]byte{0x01, 0x02, 0x03}) // Data2 (dataLen bytes) _, _ = bf.Seek(0, io.SeekStart) pkt := &MsgMhfOperateJoint{} @@ -394,12 +394,12 @@ func TestParseLargeMsgMhfSaveMercenary(t *testing.T) { mercData := []byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08} bf := byteframe.NewByteFrame() - bf.WriteUint32(0xCAFEBABE) // AckHandle - bf.WriteUint32(0) // lenData (skipped) - bf.WriteUint32(5000) // GCP - bf.WriteUint32(42) // PactMercID + bf.WriteUint32(0xCAFEBABE) // AckHandle + bf.WriteUint32(0) // lenData (skipped) + bf.WriteUint32(5000) // GCP + bf.WriteUint32(42) // PactMercID bf.WriteUint32(uint32(len(mercData))) // dataSize - bf.WriteUint32(0) // Merc index (skipped) + bf.WriteUint32(0) // Merc index (skipped) bf.WriteBytes(mercData) _, _ = bf.Seek(0, io.SeekStart) @@ -436,10 +436,10 @@ func TestParseLargeMsgMhfUpdateHouse(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { bf := byteframe.NewByteFrame() - bf.WriteUint32(0x12345678) // AckHandle - bf.WriteUint8(tt.state) // State - bf.WriteUint8(1) // Unk1 - bf.WriteUint16(0) // Unk2 + bf.WriteUint32(0x12345678) // AckHandle + bf.WriteUint8(tt.state) // State + bf.WriteUint8(1) // Unk1 + bf.WriteUint16(0) // Unk2 bf.WriteUint8(uint8(len(tt.password) + 1)) // Password length bf.WriteBytes([]byte(tt.password)) bf.WriteUint8(0) // null terminator @@ -473,9 +473,9 @@ func TestParseLargeMsgSysCreateAcquireSemaphore(t *testing.T) { copy(semBytes, semID) bf := byteframe.NewByteFrame() - bf.WriteUint32(0xDEADBEEF) // AckHandle - bf.WriteUint16(100) // Unk0 - bf.WriteUint8(4) // PlayerCount + bf.WriteUint32(0xDEADBEEF) // AckHandle + bf.WriteUint16(100) // Unk0 + bf.WriteUint8(4) // PlayerCount bf.WriteUint8(uint8(len(semBytes))) // SemaphoreIDLength bf.WriteBytes(semBytes) _, _ = bf.Seek(0, io.SeekStart) @@ -504,12 +504,12 @@ func TestParseLargeMsgMhfOperateGuild(t *testing.T) { dataPayload := []byte{0x10, 0x20, 0x30, 0x40, 0x50} bf := byteframe.NewByteFrame() - bf.WriteUint32(0xAABBCCDD) // AckHandle - bf.WriteUint32(999) // GuildID - bf.WriteUint8(0x09) // Action = OperateGuildUpdateComment - bf.WriteUint8(uint8(len(dataPayload))) // dataLen + bf.WriteUint32(0xAABBCCDD) // AckHandle + bf.WriteUint32(999) // GuildID + bf.WriteUint8(0x09) // Action = OperateGuildUpdateComment + bf.WriteUint8(uint8(len(dataPayload))) // dataLen bf.WriteBytes([]byte{0x01, 0x02, 0x03, 0x04}) // Data1 (always 4 bytes) - bf.WriteBytes(dataPayload) // Data2 (dataLen bytes) + bf.WriteBytes(dataPayload) // Data2 (dataLen bytes) _, _ = bf.Seek(0, io.SeekStart) pkt := &MsgMhfOperateGuild{} @@ -657,9 +657,9 @@ func TestParseLargeMsgSysLockGlobalSema(t *testing.T) { // TestParseLargeMsgMhfCreateJoint tests Parse for MsgMhfCreateJoint. func TestParseLargeMsgMhfCreateJoint(t *testing.T) { bf := byteframe.NewByteFrame() - bf.WriteUint32(0xCAFEBABE) // AckHandle - bf.WriteUint32(500) // GuildID - bf.WriteUint32(15) // len (unused) + bf.WriteUint32(0xCAFEBABE) // AckHandle + bf.WriteUint32(500) // GuildID + bf.WriteUint32(15) // len (unused) bf.WriteBytes([]byte("Alliance01")) bf.WriteUint8(0) // null terminator _, _ = bf.Seek(0, io.SeekStart) @@ -858,8 +858,8 @@ func TestParseLargeMsgSysReserveStage(t *testing.T) { copy(stageBytes, stageID) bf := byteframe.NewByteFrame() - bf.WriteUint32(0xAABBCCDD) // AckHandle - bf.WriteUint8(0x11) // Ready + bf.WriteUint32(0xAABBCCDD) // AckHandle + bf.WriteUint8(0x11) // Ready bf.WriteUint8(uint8(len(stageBytes))) // stageIDLength bf.WriteBytes(stageBytes) _, _ = bf.Seek(0, io.SeekStart) diff --git a/network/mhfpacket/msg_parse_medium_test.go b/network/mhfpacket/msg_parse_medium_test.go index ae80f75ef..bd36d7736 100644 --- a/network/mhfpacket/msg_parse_medium_test.go +++ b/network/mhfpacket/msg_parse_medium_test.go @@ -413,7 +413,6 @@ func TestParseMediumUpdateMyhouseInfo(t *testing.T) { }) } - // --- 3-stmt packets (AckHandle-only Parse) --- // TestParseMediumAckHandleOnlyBatch tests Parse for all 3-stmt packets that only diff --git a/network/mhfpacket/msg_sys_ack.go b/network/mhfpacket/msg_sys_ack.go index f5c206f44..838c4aaf1 100644 --- a/network/mhfpacket/msg_sys_ack.go +++ b/network/mhfpacket/msg_sys_ack.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgSysAck represents the MSG_SYS_ACK diff --git a/network/mhfpacket/msg_sys_add_object.go b/network/mhfpacket/msg_sys_add_object.go index a1df28f31..08fdf2a79 100644 --- a/network/mhfpacket/msg_sys_add_object.go +++ b/network/mhfpacket/msg_sys_add_object.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysAddObject represents the MSG_SYS_ADD_OBJECT diff --git a/network/mhfpacket/msg_sys_auth_data.go b/network/mhfpacket/msg_sys_auth_data.go index 6978a3366..5bba12b8e 100644 --- a/network/mhfpacket/msg_sys_auth_data.go +++ b/network/mhfpacket/msg_sys_auth_data.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysAuthData represents the MSG_SYS_AUTH_DATA diff --git a/network/mhfpacket/msg_sys_auth_query.go b/network/mhfpacket/msg_sys_auth_query.go index 93eca3457..4af02321f 100644 --- a/network/mhfpacket/msg_sys_auth_query.go +++ b/network/mhfpacket/msg_sys_auth_query.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysAuthQuery represents the MSG_SYS_AUTH_QUERY diff --git a/network/mhfpacket/msg_sys_auth_terminal.go b/network/mhfpacket/msg_sys_auth_terminal.go index 292922c91..c0ca72bfc 100644 --- a/network/mhfpacket/msg_sys_auth_terminal.go +++ b/network/mhfpacket/msg_sys_auth_terminal.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysAuthTerminal represents the MSG_SYS_AUTH_TERMINAL diff --git a/network/mhfpacket/msg_sys_back_stage.go b/network/mhfpacket/msg_sys_back_stage.go index 12464b5d6..4acc42302 100644 --- a/network/mhfpacket/msg_sys_back_stage.go +++ b/network/mhfpacket/msg_sys_back_stage.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysBackStage represents the MSG_SYS_BACK_STAGE diff --git a/network/mhfpacket/msg_sys_casted_binary.go b/network/mhfpacket/msg_sys_casted_binary.go index 5be8a01ef..433ff50cd 100644 --- a/network/mhfpacket/msg_sys_casted_binary.go +++ b/network/mhfpacket/msg_sys_casted_binary.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgSysCastedBinary represents the MSG_SYS_CASTED_BINARY diff --git a/network/mhfpacket/msg_sys_cleanup_object.go b/network/mhfpacket/msg_sys_cleanup_object.go index 433daf697..f3fa9131f 100644 --- a/network/mhfpacket/msg_sys_cleanup_object.go +++ b/network/mhfpacket/msg_sys_cleanup_object.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgSysCleanupObject represents the MSG_SYS_CLEANUP_OBJECT diff --git a/network/mhfpacket/msg_sys_close_mutex.go b/network/mhfpacket/msg_sys_close_mutex.go index 188a8e33a..7b105a51c 100644 --- a/network/mhfpacket/msg_sys_close_mutex.go +++ b/network/mhfpacket/msg_sys_close_mutex.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysCloseMutex represents the MSG_SYS_CLOSE_MUTEX diff --git a/network/mhfpacket/msg_sys_collect_binary.go b/network/mhfpacket/msg_sys_collect_binary.go index 0479e08cf..4cf6c03b2 100644 --- a/network/mhfpacket/msg_sys_collect_binary.go +++ b/network/mhfpacket/msg_sys_collect_binary.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysCollectBinary represents the MSG_SYS_COLLECT_BINARY diff --git a/network/mhfpacket/msg_sys_create_mutex.go b/network/mhfpacket/msg_sys_create_mutex.go index 111a32da1..b01e272f9 100644 --- a/network/mhfpacket/msg_sys_create_mutex.go +++ b/network/mhfpacket/msg_sys_create_mutex.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysCreateMutex represents the MSG_SYS_CREATE_MUTEX diff --git a/network/mhfpacket/msg_sys_create_object.go b/network/mhfpacket/msg_sys_create_object.go index e6a15d67d..74ac7a17f 100644 --- a/network/mhfpacket/msg_sys_create_object.go +++ b/network/mhfpacket/msg_sys_create_object.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysCreateObject represents the MSG_SYS_CREATE_OBJECT diff --git a/network/mhfpacket/msg_sys_create_open_mutex.go b/network/mhfpacket/msg_sys_create_open_mutex.go index 9c01a57a8..12466e225 100644 --- a/network/mhfpacket/msg_sys_create_open_mutex.go +++ b/network/mhfpacket/msg_sys_create_open_mutex.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysCreateOpenMutex represents the MSG_SYS_CREATE_OPEN_MUTEX diff --git a/network/mhfpacket/msg_sys_del_object.go b/network/mhfpacket/msg_sys_del_object.go index 3a976d71d..a11e156b2 100644 --- a/network/mhfpacket/msg_sys_del_object.go +++ b/network/mhfpacket/msg_sys_del_object.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysDelObject represents the MSG_SYS_DEL_OBJECT diff --git a/network/mhfpacket/msg_sys_delete_mutex.go b/network/mhfpacket/msg_sys_delete_mutex.go index 54237c13c..4fc5147c7 100644 --- a/network/mhfpacket/msg_sys_delete_mutex.go +++ b/network/mhfpacket/msg_sys_delete_mutex.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysDeleteMutex represents the MSG_SYS_DELETE_MUTEX diff --git a/network/mhfpacket/msg_sys_delete_object.go b/network/mhfpacket/msg_sys_delete_object.go index 34697ab5b..c4365895a 100644 --- a/network/mhfpacket/msg_sys_delete_object.go +++ b/network/mhfpacket/msg_sys_delete_object.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgSysDeleteObject represents the MSG_SYS_DELETE_OBJECT diff --git a/network/mhfpacket/msg_sys_delete_user.go b/network/mhfpacket/msg_sys_delete_user.go index 2ae1f99a5..2de63b7d2 100644 --- a/network/mhfpacket/msg_sys_delete_user.go +++ b/network/mhfpacket/msg_sys_delete_user.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysDeleteUser represents the MSG_SYS_DELETE_USER diff --git a/network/mhfpacket/msg_sys_disp_object.go b/network/mhfpacket/msg_sys_disp_object.go index 6360c5316..31b6eebc7 100644 --- a/network/mhfpacket/msg_sys_disp_object.go +++ b/network/mhfpacket/msg_sys_disp_object.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysDispObject represents the MSG_SYS_DISP_OBJECT diff --git a/network/mhfpacket/msg_sys_duplicate_object.go b/network/mhfpacket/msg_sys_duplicate_object.go index 559250876..f05de7948 100644 --- a/network/mhfpacket/msg_sys_duplicate_object.go +++ b/network/mhfpacket/msg_sys_duplicate_object.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgSysDuplicateObject represents the MSG_SYS_DUPLICATE_OBJECT diff --git a/network/mhfpacket/msg_sys_echo.go b/network/mhfpacket/msg_sys_echo.go index 01bb3e840..fcfd1c180 100644 --- a/network/mhfpacket/msg_sys_echo.go +++ b/network/mhfpacket/msg_sys_echo.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysEcho represents the MSG_SYS_ECHO diff --git a/network/mhfpacket/msg_sys_end.go b/network/mhfpacket/msg_sys_end.go index bb89cfdb5..6a76187da 100644 --- a/network/mhfpacket/msg_sys_end.go +++ b/network/mhfpacket/msg_sys_end.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgSysEnd represents the MSG_SYS_END diff --git a/network/mhfpacket/msg_sys_enter_stage.go b/network/mhfpacket/msg_sys_enter_stage.go index 6545c000b..ac8317c65 100644 --- a/network/mhfpacket/msg_sys_enter_stage.go +++ b/network/mhfpacket/msg_sys_enter_stage.go @@ -24,7 +24,7 @@ func (m *MsgSysEnterStage) Opcode() network.PacketID { func (m *MsgSysEnterStage) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { m.AckHandle = bf.ReadUint32() m.IsQuest = bf.ReadBool() - bf.ReadUint8() // Length StageID + bf.ReadUint8() // Length StageID m.StageID = string(bf.ReadNullTerminatedBytes()) return nil } diff --git a/network/mhfpacket/msg_sys_enumlobby.go b/network/mhfpacket/msg_sys_enumlobby.go index 7517b538c..4e9d7890b 100644 --- a/network/mhfpacket/msg_sys_enumlobby.go +++ b/network/mhfpacket/msg_sys_enumlobby.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysEnumlobby represents the MSG_SYS_ENUMLOBBY diff --git a/network/mhfpacket/msg_sys_enumuser.go b/network/mhfpacket/msg_sys_enumuser.go index c4814c4ed..44bc096a5 100644 --- a/network/mhfpacket/msg_sys_enumuser.go +++ b/network/mhfpacket/msg_sys_enumuser.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysEnumuser represents the MSG_SYS_ENUMUSER diff --git a/network/mhfpacket/msg_sys_extend_threshold.go b/network/mhfpacket/msg_sys_extend_threshold.go index fe44d7d55..eea08ec90 100644 --- a/network/mhfpacket/msg_sys_extend_threshold.go +++ b/network/mhfpacket/msg_sys_extend_threshold.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgSysExtendThreshold represents the MSG_SYS_EXTEND_THRESHOLD diff --git a/network/mhfpacket/msg_sys_get_object_binary.go b/network/mhfpacket/msg_sys_get_object_binary.go index 72196c36a..28d820ec9 100644 --- a/network/mhfpacket/msg_sys_get_object_binary.go +++ b/network/mhfpacket/msg_sys_get_object_binary.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysGetObjectBinary represents the MSG_SYS_GET_OBJECT_BINARY diff --git a/network/mhfpacket/msg_sys_get_object_owner.go b/network/mhfpacket/msg_sys_get_object_owner.go index ca91f2171..ade2b974b 100644 --- a/network/mhfpacket/msg_sys_get_object_owner.go +++ b/network/mhfpacket/msg_sys_get_object_owner.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysGetObjectOwner represents the MSG_SYS_GET_OBJECT_OWNER diff --git a/network/mhfpacket/msg_sys_get_state.go b/network/mhfpacket/msg_sys_get_state.go index 75562b285..69ba181e9 100644 --- a/network/mhfpacket/msg_sys_get_state.go +++ b/network/mhfpacket/msg_sys_get_state.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysGetState represents the MSG_SYS_GET_STATE diff --git a/network/mhfpacket/msg_sys_get_user_binary.go b/network/mhfpacket/msg_sys_get_user_binary.go index 4250c9749..07d2d136a 100644 --- a/network/mhfpacket/msg_sys_get_user_binary.go +++ b/network/mhfpacket/msg_sys_get_user_binary.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysGetUserBinary represents the MSG_SYS_GET_USER_BINARY diff --git a/network/mhfpacket/msg_sys_hide_object.go b/network/mhfpacket/msg_sys_hide_object.go index 7a5de7d8f..e00c2ed39 100644 --- a/network/mhfpacket/msg_sys_hide_object.go +++ b/network/mhfpacket/msg_sys_hide_object.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysHideObject represents the MSG_SYS_HIDE_OBJECT diff --git a/network/mhfpacket/msg_sys_infokyserver.go b/network/mhfpacket/msg_sys_infokyserver.go index ecaaf4fea..418c72e3b 100644 --- a/network/mhfpacket/msg_sys_infokyserver.go +++ b/network/mhfpacket/msg_sys_infokyserver.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysInfokyserver represents the MSG_SYS_INFOKYSERVER diff --git a/network/mhfpacket/msg_sys_insert_user.go b/network/mhfpacket/msg_sys_insert_user.go index 59b834ddb..dc390ebad 100644 --- a/network/mhfpacket/msg_sys_insert_user.go +++ b/network/mhfpacket/msg_sys_insert_user.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysInsertUser represents the MSG_SYS_INSERT_USER diff --git a/network/mhfpacket/msg_sys_leave_stage.go b/network/mhfpacket/msg_sys_leave_stage.go index c9a286d49..fdca94008 100644 --- a/network/mhfpacket/msg_sys_leave_stage.go +++ b/network/mhfpacket/msg_sys_leave_stage.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysLeaveStage represents the MSG_SYS_LEAVE_STAGE diff --git a/network/mhfpacket/msg_sys_logout.go b/network/mhfpacket/msg_sys_logout.go index 71b6b42be..ed94092e3 100644 --- a/network/mhfpacket/msg_sys_logout.go +++ b/network/mhfpacket/msg_sys_logout.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgSysLogout represents the MSG_SYS_LOGOUT diff --git a/network/mhfpacket/msg_sys_nop.go b/network/mhfpacket/msg_sys_nop.go index aebc0bab4..25b94bb2f 100644 --- a/network/mhfpacket/msg_sys_nop.go +++ b/network/mhfpacket/msg_sys_nop.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgSysNop represents the MSG_SYS_NOP diff --git a/network/mhfpacket/msg_sys_notify_user_binary.go b/network/mhfpacket/msg_sys_notify_user_binary.go index 4834804db..a07cbfd5f 100644 --- a/network/mhfpacket/msg_sys_notify_user_binary.go +++ b/network/mhfpacket/msg_sys_notify_user_binary.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgSysNotifyUserBinary represents the MSG_SYS_NOTIFY_USER_BINARY diff --git a/network/mhfpacket/msg_sys_open_mutex.go b/network/mhfpacket/msg_sys_open_mutex.go index 04a8267a5..d9efa2e94 100644 --- a/network/mhfpacket/msg_sys_open_mutex.go +++ b/network/mhfpacket/msg_sys_open_mutex.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysOpenMutex represents the MSG_SYS_OPEN_MUTEX diff --git a/network/mhfpacket/msg_sys_ping.go b/network/mhfpacket/msg_sys_ping.go index e285520f7..b4d5bf2ae 100644 --- a/network/mhfpacket/msg_sys_ping.go +++ b/network/mhfpacket/msg_sys_ping.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgSysPing represents the MSG_SYS_PING diff --git a/network/mhfpacket/msg_sys_position_object.go b/network/mhfpacket/msg_sys_position_object.go index b58b01648..c4f8738e2 100644 --- a/network/mhfpacket/msg_sys_position_object.go +++ b/network/mhfpacket/msg_sys_position_object.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgSysPositionObject represents the MSG_SYS_POSITION_OBJECT diff --git a/network/mhfpacket/msg_sys_release_semaphore.go b/network/mhfpacket/msg_sys_release_semaphore.go index ae654cb70..62f82d322 100644 --- a/network/mhfpacket/msg_sys_release_semaphore.go +++ b/network/mhfpacket/msg_sys_release_semaphore.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReleaseSemaphore represents the MSG_SYS_RELEASE_SEMAPHORE diff --git a/network/mhfpacket/msg_sys_reserve01.go b/network/mhfpacket/msg_sys_reserve01.go index 81c392b76..daf8d65ba 100644 --- a/network/mhfpacket/msg_sys_reserve01.go +++ b/network/mhfpacket/msg_sys_reserve01.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve01 represents the MSG_SYS_reserve01 diff --git a/network/mhfpacket/msg_sys_reserve02.go b/network/mhfpacket/msg_sys_reserve02.go index 4140928dc..5a880e59a 100644 --- a/network/mhfpacket/msg_sys_reserve02.go +++ b/network/mhfpacket/msg_sys_reserve02.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve02 represents the MSG_SYS_reserve02 diff --git a/network/mhfpacket/msg_sys_reserve03.go b/network/mhfpacket/msg_sys_reserve03.go index 5b4fb3d18..823d738ea 100644 --- a/network/mhfpacket/msg_sys_reserve03.go +++ b/network/mhfpacket/msg_sys_reserve03.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve03 represents the MSG_SYS_reserve03 diff --git a/network/mhfpacket/msg_sys_reserve04.go b/network/mhfpacket/msg_sys_reserve04.go index b8c05a850..82f65c505 100644 --- a/network/mhfpacket/msg_sys_reserve04.go +++ b/network/mhfpacket/msg_sys_reserve04.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve04 represents the MSG_SYS_reserve04 diff --git a/network/mhfpacket/msg_sys_reserve05.go b/network/mhfpacket/msg_sys_reserve05.go index cab58a1b5..7371e11a6 100644 --- a/network/mhfpacket/msg_sys_reserve05.go +++ b/network/mhfpacket/msg_sys_reserve05.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve05 represents the MSG_SYS_reserve05 diff --git a/network/mhfpacket/msg_sys_reserve06.go b/network/mhfpacket/msg_sys_reserve06.go index 69b3a8ae2..7b17ffffe 100644 --- a/network/mhfpacket/msg_sys_reserve06.go +++ b/network/mhfpacket/msg_sys_reserve06.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve06 represents the MSG_SYS_reserve06 diff --git a/network/mhfpacket/msg_sys_reserve07.go b/network/mhfpacket/msg_sys_reserve07.go index d904e673f..0658eec79 100644 --- a/network/mhfpacket/msg_sys_reserve07.go +++ b/network/mhfpacket/msg_sys_reserve07.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve07 represents the MSG_SYS_reserve07 diff --git a/network/mhfpacket/msg_sys_reserve0c.go b/network/mhfpacket/msg_sys_reserve0c.go index 155bdb43e..6e9b6d44f 100644 --- a/network/mhfpacket/msg_sys_reserve0c.go +++ b/network/mhfpacket/msg_sys_reserve0c.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve0C represents the MSG_SYS_reserve0C diff --git a/network/mhfpacket/msg_sys_reserve0d.go b/network/mhfpacket/msg_sys_reserve0d.go index 26f8d9ad2..af9ff2f15 100644 --- a/network/mhfpacket/msg_sys_reserve0d.go +++ b/network/mhfpacket/msg_sys_reserve0d.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve0D represents the MSG_SYS_reserve0D diff --git a/network/mhfpacket/msg_sys_reserve0e.go b/network/mhfpacket/msg_sys_reserve0e.go index d0485df4f..85526e89d 100644 --- a/network/mhfpacket/msg_sys_reserve0e.go +++ b/network/mhfpacket/msg_sys_reserve0e.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve0E represents the MSG_SYS_reserve0E diff --git a/network/mhfpacket/msg_sys_reserve180.go b/network/mhfpacket/msg_sys_reserve180.go index c8ba5dd25..d85adea35 100644 --- a/network/mhfpacket/msg_sys_reserve180.go +++ b/network/mhfpacket/msg_sys_reserve180.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve180 represents the MSG_SYS_reserve180 diff --git a/network/mhfpacket/msg_sys_reserve188.go b/network/mhfpacket/msg_sys_reserve188.go index fdeebb6c9..1921138ed 100644 --- a/network/mhfpacket/msg_sys_reserve188.go +++ b/network/mhfpacket/msg_sys_reserve188.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve188 represents the MSG_SYS_reserve188 diff --git a/network/mhfpacket/msg_sys_reserve18b.go b/network/mhfpacket/msg_sys_reserve18b.go index 9c92aa0a0..4480f47fa 100644 --- a/network/mhfpacket/msg_sys_reserve18b.go +++ b/network/mhfpacket/msg_sys_reserve18b.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve18B represents the MSG_SYS_reserve18B diff --git a/network/mhfpacket/msg_sys_reserve18e.go b/network/mhfpacket/msg_sys_reserve18e.go index 52b58ec08..b531e027c 100644 --- a/network/mhfpacket/msg_sys_reserve18e.go +++ b/network/mhfpacket/msg_sys_reserve18e.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve18E represents the MSG_SYS_reserve18E diff --git a/network/mhfpacket/msg_sys_reserve18f.go b/network/mhfpacket/msg_sys_reserve18f.go index 031e2b23b..fee9d5610 100644 --- a/network/mhfpacket/msg_sys_reserve18f.go +++ b/network/mhfpacket/msg_sys_reserve18f.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve18F represents the MSG_SYS_reserve18F diff --git a/network/mhfpacket/msg_sys_reserve192.go b/network/mhfpacket/msg_sys_reserve192.go index 5df369b67..a05b95ef0 100644 --- a/network/mhfpacket/msg_sys_reserve192.go +++ b/network/mhfpacket/msg_sys_reserve192.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve192 represents the MSG_SYS_reserve192 diff --git a/network/mhfpacket/msg_sys_reserve193.go b/network/mhfpacket/msg_sys_reserve193.go index 59137ba1b..5c9173cae 100644 --- a/network/mhfpacket/msg_sys_reserve193.go +++ b/network/mhfpacket/msg_sys_reserve193.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve193 represents the MSG_SYS_reserve193 diff --git a/network/mhfpacket/msg_sys_reserve194.go b/network/mhfpacket/msg_sys_reserve194.go index e941cf243..b688d9728 100644 --- a/network/mhfpacket/msg_sys_reserve194.go +++ b/network/mhfpacket/msg_sys_reserve194.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve194 represents the MSG_SYS_reserve194 diff --git a/network/mhfpacket/msg_sys_reserve19b.go b/network/mhfpacket/msg_sys_reserve19b.go index fd8d6a563..e41c57c57 100644 --- a/network/mhfpacket/msg_sys_reserve19b.go +++ b/network/mhfpacket/msg_sys_reserve19b.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve19B represents the MSG_SYS_reserve19B diff --git a/network/mhfpacket/msg_sys_reserve19e.go b/network/mhfpacket/msg_sys_reserve19e.go index 932563d9f..077367fef 100644 --- a/network/mhfpacket/msg_sys_reserve19e.go +++ b/network/mhfpacket/msg_sys_reserve19e.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve19E represents the MSG_SYS_reserve19E diff --git a/network/mhfpacket/msg_sys_reserve19f.go b/network/mhfpacket/msg_sys_reserve19f.go index 5e078ddfb..7e5c657c8 100644 --- a/network/mhfpacket/msg_sys_reserve19f.go +++ b/network/mhfpacket/msg_sys_reserve19f.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve19F represents the MSG_SYS_reserve19F diff --git a/network/mhfpacket/msg_sys_reserve1a4.go b/network/mhfpacket/msg_sys_reserve1a4.go index dd0d1d380..e9e942656 100644 --- a/network/mhfpacket/msg_sys_reserve1a4.go +++ b/network/mhfpacket/msg_sys_reserve1a4.go @@ -1,11 +1,11 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve1A4 represents the MSG_SYS_reserve1A4 diff --git a/network/mhfpacket/msg_sys_reserve1a6.go b/network/mhfpacket/msg_sys_reserve1a6.go index c98bc746b..cccbb44c8 100644 --- a/network/mhfpacket/msg_sys_reserve1a6.go +++ b/network/mhfpacket/msg_sys_reserve1a6.go @@ -1,11 +1,11 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve1A6 represents the MSG_SYS_reserve1A6 diff --git a/network/mhfpacket/msg_sys_reserve1a7.go b/network/mhfpacket/msg_sys_reserve1a7.go index 3bf255cb4..8ae1f7c9a 100644 --- a/network/mhfpacket/msg_sys_reserve1a7.go +++ b/network/mhfpacket/msg_sys_reserve1a7.go @@ -1,11 +1,11 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve1A7 represents the MSG_SYS_reserve1A7 diff --git a/network/mhfpacket/msg_sys_reserve1a8.go b/network/mhfpacket/msg_sys_reserve1a8.go index 4301f81e5..489112f98 100644 --- a/network/mhfpacket/msg_sys_reserve1a8.go +++ b/network/mhfpacket/msg_sys_reserve1a8.go @@ -1,11 +1,11 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve1A8 represents the MSG_SYS_reserve1A8 diff --git a/network/mhfpacket/msg_sys_reserve1a9.go b/network/mhfpacket/msg_sys_reserve1a9.go index df9cb7bc1..f5cbf5b9b 100644 --- a/network/mhfpacket/msg_sys_reserve1a9.go +++ b/network/mhfpacket/msg_sys_reserve1a9.go @@ -1,11 +1,11 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve1A9 represents the MSG_SYS_reserve1A9 diff --git a/network/mhfpacket/msg_sys_reserve1aa.go b/network/mhfpacket/msg_sys_reserve1aa.go index 786b0dc9a..3587b580b 100644 --- a/network/mhfpacket/msg_sys_reserve1aa.go +++ b/network/mhfpacket/msg_sys_reserve1aa.go @@ -1,11 +1,11 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve1AA represents the MSG_SYS_reserve1AA diff --git a/network/mhfpacket/msg_sys_reserve1ab.go b/network/mhfpacket/msg_sys_reserve1ab.go index 2e06039bd..4422f54c2 100644 --- a/network/mhfpacket/msg_sys_reserve1ab.go +++ b/network/mhfpacket/msg_sys_reserve1ab.go @@ -1,11 +1,11 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve1AB represents the MSG_SYS_reserve1AB diff --git a/network/mhfpacket/msg_sys_reserve1ac.go b/network/mhfpacket/msg_sys_reserve1ac.go index 9983f9b77..35a584a3d 100644 --- a/network/mhfpacket/msg_sys_reserve1ac.go +++ b/network/mhfpacket/msg_sys_reserve1ac.go @@ -1,11 +1,11 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve1AC represents the MSG_SYS_reserve1AC diff --git a/network/mhfpacket/msg_sys_reserve1ad.go b/network/mhfpacket/msg_sys_reserve1ad.go index 93b2e3c59..11b8c73bc 100644 --- a/network/mhfpacket/msg_sys_reserve1ad.go +++ b/network/mhfpacket/msg_sys_reserve1ad.go @@ -1,11 +1,11 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve1AD represents the MSG_SYS_reserve1AD diff --git a/network/mhfpacket/msg_sys_reserve1ae.go b/network/mhfpacket/msg_sys_reserve1ae.go index 66a4d2303..6dad4ab68 100644 --- a/network/mhfpacket/msg_sys_reserve1ae.go +++ b/network/mhfpacket/msg_sys_reserve1ae.go @@ -1,11 +1,11 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve1AE represents the MSG_SYS_reserve1AE diff --git a/network/mhfpacket/msg_sys_reserve1af.go b/network/mhfpacket/msg_sys_reserve1af.go index fc57f5a20..b52aa0d7e 100644 --- a/network/mhfpacket/msg_sys_reserve1af.go +++ b/network/mhfpacket/msg_sys_reserve1af.go @@ -1,11 +1,11 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve1AF represents the MSG_SYS_reserve1AF diff --git a/network/mhfpacket/msg_sys_reserve4a.go b/network/mhfpacket/msg_sys_reserve4a.go index 89ccdb46c..6568c43ba 100644 --- a/network/mhfpacket/msg_sys_reserve4a.go +++ b/network/mhfpacket/msg_sys_reserve4a.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve4A represents the MSG_SYS_reserve4A diff --git a/network/mhfpacket/msg_sys_reserve4b.go b/network/mhfpacket/msg_sys_reserve4b.go index 7232b9f82..c8b07f538 100644 --- a/network/mhfpacket/msg_sys_reserve4b.go +++ b/network/mhfpacket/msg_sys_reserve4b.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve4B represents the MSG_SYS_reserve4B diff --git a/network/mhfpacket/msg_sys_reserve4c.go b/network/mhfpacket/msg_sys_reserve4c.go index 3fba7d323..757dfc6a5 100644 --- a/network/mhfpacket/msg_sys_reserve4c.go +++ b/network/mhfpacket/msg_sys_reserve4c.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve4C represents the MSG_SYS_reserve4C diff --git a/network/mhfpacket/msg_sys_reserve4d.go b/network/mhfpacket/msg_sys_reserve4d.go index 6a043803a..47ed6fb46 100644 --- a/network/mhfpacket/msg_sys_reserve4d.go +++ b/network/mhfpacket/msg_sys_reserve4d.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve4D represents the MSG_SYS_reserve4D diff --git a/network/mhfpacket/msg_sys_reserve4e.go b/network/mhfpacket/msg_sys_reserve4e.go index 25c3b9103..1eb2ac466 100644 --- a/network/mhfpacket/msg_sys_reserve4e.go +++ b/network/mhfpacket/msg_sys_reserve4e.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve4E represents the MSG_SYS_reserve4E diff --git a/network/mhfpacket/msg_sys_reserve4f.go b/network/mhfpacket/msg_sys_reserve4f.go index df9df2e8d..cb9f54cbc 100644 --- a/network/mhfpacket/msg_sys_reserve4f.go +++ b/network/mhfpacket/msg_sys_reserve4f.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve4F represents the MSG_SYS_reserve4F diff --git a/network/mhfpacket/msg_sys_reserve55.go b/network/mhfpacket/msg_sys_reserve55.go index 2db117d37..c4c18a9e1 100644 --- a/network/mhfpacket/msg_sys_reserve55.go +++ b/network/mhfpacket/msg_sys_reserve55.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve55 represents the MSG_SYS_reserve55 diff --git a/network/mhfpacket/msg_sys_reserve56.go b/network/mhfpacket/msg_sys_reserve56.go index b063ed410..da2e8d0cf 100644 --- a/network/mhfpacket/msg_sys_reserve56.go +++ b/network/mhfpacket/msg_sys_reserve56.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve56 represents the MSG_SYS_reserve56 diff --git a/network/mhfpacket/msg_sys_reserve57.go b/network/mhfpacket/msg_sys_reserve57.go index 9db35825f..986db3b5a 100644 --- a/network/mhfpacket/msg_sys_reserve57.go +++ b/network/mhfpacket/msg_sys_reserve57.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve57 represents the MSG_SYS_reserve57 diff --git a/network/mhfpacket/msg_sys_reserve5c.go b/network/mhfpacket/msg_sys_reserve5c.go index f92078ff4..c145f78c8 100644 --- a/network/mhfpacket/msg_sys_reserve5c.go +++ b/network/mhfpacket/msg_sys_reserve5c.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve5C represents the MSG_SYS_reserve5C diff --git a/network/mhfpacket/msg_sys_reserve5e.go b/network/mhfpacket/msg_sys_reserve5e.go index ea456b4fb..6b59787e4 100644 --- a/network/mhfpacket/msg_sys_reserve5e.go +++ b/network/mhfpacket/msg_sys_reserve5e.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve5E represents the MSG_SYS_reserve5E diff --git a/network/mhfpacket/msg_sys_reserve5f.go b/network/mhfpacket/msg_sys_reserve5f.go index c67db1df7..c3325d7c4 100644 --- a/network/mhfpacket/msg_sys_reserve5f.go +++ b/network/mhfpacket/msg_sys_reserve5f.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve5F represents the MSG_SYS_reserve5F diff --git a/network/mhfpacket/msg_sys_reserve71.go b/network/mhfpacket/msg_sys_reserve71.go index d29e534ab..452cf7b0d 100644 --- a/network/mhfpacket/msg_sys_reserve71.go +++ b/network/mhfpacket/msg_sys_reserve71.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve71 represents the MSG_SYS_reserve71 diff --git a/network/mhfpacket/msg_sys_reserve72.go b/network/mhfpacket/msg_sys_reserve72.go index 6e7d47516..03e64fe73 100644 --- a/network/mhfpacket/msg_sys_reserve72.go +++ b/network/mhfpacket/msg_sys_reserve72.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve72 represents the MSG_SYS_reserve72 diff --git a/network/mhfpacket/msg_sys_reserve73.go b/network/mhfpacket/msg_sys_reserve73.go index d1f070cd8..40fda236f 100644 --- a/network/mhfpacket/msg_sys_reserve73.go +++ b/network/mhfpacket/msg_sys_reserve73.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve73 represents the MSG_SYS_reserve73 diff --git a/network/mhfpacket/msg_sys_reserve74.go b/network/mhfpacket/msg_sys_reserve74.go index 043e51746..6526bb90c 100644 --- a/network/mhfpacket/msg_sys_reserve74.go +++ b/network/mhfpacket/msg_sys_reserve74.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve74 represents the MSG_SYS_reserve74 diff --git a/network/mhfpacket/msg_sys_reserve75.go b/network/mhfpacket/msg_sys_reserve75.go index e14d32dcc..a45393109 100644 --- a/network/mhfpacket/msg_sys_reserve75.go +++ b/network/mhfpacket/msg_sys_reserve75.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve75 represents the MSG_SYS_reserve75 diff --git a/network/mhfpacket/msg_sys_reserve76.go b/network/mhfpacket/msg_sys_reserve76.go index 6572dfd40..d9928778f 100644 --- a/network/mhfpacket/msg_sys_reserve76.go +++ b/network/mhfpacket/msg_sys_reserve76.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve76 represents the MSG_SYS_reserve76 diff --git a/network/mhfpacket/msg_sys_reserve77.go b/network/mhfpacket/msg_sys_reserve77.go index 4baf553bd..132219338 100644 --- a/network/mhfpacket/msg_sys_reserve77.go +++ b/network/mhfpacket/msg_sys_reserve77.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve77 represents the MSG_SYS_reserve77 diff --git a/network/mhfpacket/msg_sys_reserve78.go b/network/mhfpacket/msg_sys_reserve78.go index 20c940566..12784454e 100644 --- a/network/mhfpacket/msg_sys_reserve78.go +++ b/network/mhfpacket/msg_sys_reserve78.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve78 represents the MSG_SYS_reserve78 diff --git a/network/mhfpacket/msg_sys_reserve79.go b/network/mhfpacket/msg_sys_reserve79.go index a88ebe71d..c65efd54a 100644 --- a/network/mhfpacket/msg_sys_reserve79.go +++ b/network/mhfpacket/msg_sys_reserve79.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve79 represents the MSG_SYS_reserve79 diff --git a/network/mhfpacket/msg_sys_reserve7a.go b/network/mhfpacket/msg_sys_reserve7a.go index 049bd6c2e..9a720dbe9 100644 --- a/network/mhfpacket/msg_sys_reserve7a.go +++ b/network/mhfpacket/msg_sys_reserve7a.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve7A represents the MSG_SYS_reserve7A diff --git a/network/mhfpacket/msg_sys_reserve7b.go b/network/mhfpacket/msg_sys_reserve7b.go index 274f4a29d..03b346522 100644 --- a/network/mhfpacket/msg_sys_reserve7b.go +++ b/network/mhfpacket/msg_sys_reserve7b.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve7B represents the MSG_SYS_reserve7B diff --git a/network/mhfpacket/msg_sys_reserve7c.go b/network/mhfpacket/msg_sys_reserve7c.go index d7c490d1c..8bff496b1 100644 --- a/network/mhfpacket/msg_sys_reserve7c.go +++ b/network/mhfpacket/msg_sys_reserve7c.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve7C represents the MSG_SYS_reserve7C diff --git a/network/mhfpacket/msg_sys_reserve7e.go b/network/mhfpacket/msg_sys_reserve7e.go index 4f0683c8f..c3598733d 100644 --- a/network/mhfpacket/msg_sys_reserve7e.go +++ b/network/mhfpacket/msg_sys_reserve7e.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysReserve7E represents the MSG_SYS_reserve7E diff --git a/network/mhfpacket/msg_sys_rotate_object.go b/network/mhfpacket/msg_sys_rotate_object.go index b7795ff57..cb240b3ee 100644 --- a/network/mhfpacket/msg_sys_rotate_object.go +++ b/network/mhfpacket/msg_sys_rotate_object.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysRotateObject represents the MSG_SYS_ROTATE_OBJECT diff --git a/network/mhfpacket/msg_sys_serialize.go b/network/mhfpacket/msg_sys_serialize.go index 5e6f57b9f..dd6a6f515 100644 --- a/network/mhfpacket/msg_sys_serialize.go +++ b/network/mhfpacket/msg_sys_serialize.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysSerialize represents the MSG_SYS_SERIALIZE diff --git a/network/mhfpacket/msg_sys_set_object_binary.go b/network/mhfpacket/msg_sys_set_object_binary.go index d34e03008..45b90e1e3 100644 --- a/network/mhfpacket/msg_sys_set_object_binary.go +++ b/network/mhfpacket/msg_sys_set_object_binary.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysSetObjectBinary represents the MSG_SYS_SET_OBJECT_BINARY diff --git a/network/mhfpacket/msg_sys_set_status.go b/network/mhfpacket/msg_sys_set_status.go index 5b1544d8d..0d52a81cf 100644 --- a/network/mhfpacket/msg_sys_set_status.go +++ b/network/mhfpacket/msg_sys_set_status.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysSetStatus represents the MSG_SYS_SET_STATUS diff --git a/network/mhfpacket/msg_sys_stage_destruct.go b/network/mhfpacket/msg_sys_stage_destruct.go index 19643af69..69c691ac1 100644 --- a/network/mhfpacket/msg_sys_stage_destruct.go +++ b/network/mhfpacket/msg_sys_stage_destruct.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgSysStageDestruct represents the MSG_SYS_STAGE_DESTRUCT diff --git a/network/mhfpacket/msg_sys_time.go b/network/mhfpacket/msg_sys_time.go index 64c5eacff..2fb5bd8f3 100644 --- a/network/mhfpacket/msg_sys_time.go +++ b/network/mhfpacket/msg_sys_time.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgSysTime represents the MSG_SYS_TIME diff --git a/network/mhfpacket/msg_sys_trans_binary.go b/network/mhfpacket/msg_sys_trans_binary.go index ba4a91af8..aa643f562 100644 --- a/network/mhfpacket/msg_sys_trans_binary.go +++ b/network/mhfpacket/msg_sys_trans_binary.go @@ -1,11 +1,11 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysTransBinary represents the MSG_SYS_TRANS_BINARY diff --git a/network/mhfpacket/msg_sys_unlock_global_sema.go b/network/mhfpacket/msg_sys_unlock_global_sema.go index 35f3acb93..c715448c6 100644 --- a/network/mhfpacket/msg_sys_unlock_global_sema.go +++ b/network/mhfpacket/msg_sys_unlock_global_sema.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgSysUnlockGlobalSema represents the MSG_SYS_UNLOCK_GLOBAL_SEMA diff --git a/network/mhfpacket/msg_sys_unreserve_stage.go b/network/mhfpacket/msg_sys_unreserve_stage.go index a0739366f..0b224b1a4 100644 --- a/network/mhfpacket/msg_sys_unreserve_stage.go +++ b/network/mhfpacket/msg_sys_unreserve_stage.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgSysUnreserveStage represents the MSG_SYS_UNRESERVE_STAGE diff --git a/network/mhfpacket/msg_sys_update_object_binary.go b/network/mhfpacket/msg_sys_update_object_binary.go index cb493f5d1..0b2232a50 100644 --- a/network/mhfpacket/msg_sys_update_object_binary.go +++ b/network/mhfpacket/msg_sys_update_object_binary.go @@ -1,9 +1,9 @@ package mhfpacket import ( + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgSysUpdateObjectBinary represents the MSG_SYS_UPDATE_OBJECT_BINARY diff --git a/server/api/dbutils.go b/server/api/dbutils.go index 1bd8f8397..04874daf1 100644 --- a/server/api/dbutils.go +++ b/server/api/dbutils.go @@ -3,8 +3,8 @@ package api import ( "context" "database/sql" - "erupe-ce/common/token" "errors" + "erupe-ce/common/token" "fmt" "time" diff --git a/server/api/dbutils_test.go b/server/api/dbutils_test.go index f12994792..dc512eb95 100644 --- a/server/api/dbutils_test.go +++ b/server/api/dbutils_test.go @@ -67,11 +67,11 @@ func TestUserIDFromTokenScenarios(t *testing.T) { // TestGetReturnExpiryCalculation tests the return expiry calculation logic func TestGetReturnExpiryCalculation(t *testing.T) { tests := []struct { - name string - lastLogin time.Time - currentTime time.Time - shouldUpdate bool - description string + name string + lastLogin time.Time + currentTime time.Time + shouldUpdate bool + description string }{ { name: "RecentLogin", @@ -126,10 +126,10 @@ func TestGetReturnExpiryCalculation(t *testing.T) { // TestCharacterCreationConstraints tests character creation constraints func TestCharacterCreationConstraints(t *testing.T) { tests := []struct { - name string - currentCount int - allowCreation bool - description string + name string + currentCount int + allowCreation bool + description string }{ { name: "NoCharacters", @@ -170,22 +170,22 @@ func TestCharacterCreationConstraints(t *testing.T) { // TestCharacterDeletionLogic tests the character deletion behavior func TestCharacterDeletionLogic(t *testing.T) { tests := []struct { - name string + name string isNewCharacter bool expectedAction string - description string + description string }{ { name: "NewCharacterDeletion", isNewCharacter: true, expectedAction: "DELETE", - description: "New characters should be hard deleted", + description: "New characters should be hard deleted", }, { name: "FinalizedCharacterDeletion", isNewCharacter: false, expectedAction: "SOFT_DELETE", - description: "Finalized characters should be soft deleted (marked as deleted)", + description: "Finalized characters should be soft deleted (marked as deleted)", }, } @@ -367,10 +367,10 @@ func TestCreateLoginTokenContext(t *testing.T) { // TestPasswordValidation tests password validation logic func TestPasswordValidation(t *testing.T) { tests := []struct { - name string - password string - isValid bool - reason string + name string + password string + isValid bool + reason string }{ { name: "NormalPassword", diff --git a/server/api/endpoints_test.go b/server/api/endpoints_test.go index 80f77f508..d823af9d8 100644 --- a/server/api/endpoints_test.go +++ b/server/api/endpoints_test.go @@ -10,8 +10,8 @@ import ( "testing" "time" - cfg "erupe-ce/config" "erupe-ce/common/gametime" + cfg "erupe-ce/config" "go.uber.org/zap" ) @@ -150,9 +150,9 @@ func TestLoginEndpointEmptyCredentials(t *testing.T) { } tests := []struct { - name string - username string - password string + name string + username string + password string wantPanic bool // Note: will panic without real DB }{ {"EmptyUsername", "", "password", true}, diff --git a/server/channelserver/channel_registry.go b/server/channelserver/channel_registry.go index af391a727..e034250e8 100644 --- a/server/channelserver/channel_registry.go +++ b/server/channelserver/channel_registry.go @@ -36,23 +36,23 @@ type ChannelRegistry interface { // SessionSnapshot is an immutable copy of session data taken under lock. type SessionSnapshot struct { - CharID uint32 - Name string - StageID string - ServerIP net.IP - ServerPort uint16 - UserBinary3 []byte // Copy of userBinaryParts index 3 + CharID uint32 + Name string + StageID string + ServerIP net.IP + ServerPort uint16 + UserBinary3 []byte // Copy of userBinaryParts index 3 } // StageSnapshot is an immutable copy of stage data taken under lock. type StageSnapshot struct { - ServerIP net.IP - ServerPort uint16 - StageID string - ClientCount int - Reserved int - MaxPlayers uint16 - RawBinData0 []byte - RawBinData1 []byte - RawBinData3 []byte + ServerIP net.IP + ServerPort uint16 + StageID string + ClientCount int + Reserved int + MaxPlayers uint16 + RawBinData0 []byte + RawBinData1 []byte + RawBinData3 []byte } diff --git a/server/channelserver/client_connection_simulation_test.go b/server/channelserver/client_connection_simulation_test.go index 107464a30..49fa00ffa 100644 --- a/server/channelserver/client_connection_simulation_test.go +++ b/server/channelserver/client_connection_simulation_test.go @@ -45,7 +45,7 @@ func NewMockNetConn() *MockNetConn { func (m *MockNetConn) Read(b []byte) (n int, err error) { m.mu.Lock() defer m.mu.Unlock() - + if m.closed { return 0, io.EOF } @@ -58,7 +58,7 @@ func (m *MockNetConn) Read(b []byte) (n int, err error) { func (m *MockNetConn) Write(b []byte) (n int, err error) { m.mu.Lock() defer m.mu.Unlock() - + if m.closed { return 0, io.ErrClosedPipe } @@ -130,7 +130,7 @@ func TestClientConnection_GracefulLoginLogout(t *testing.T) { // Simulate client connecting mockConn := NewMockNetConn() session := createTestSessionForServerWithChar(server, charID, "ClientChar") - + // In real scenario, this would be set up by the connection handler // For testing, we test handlers directly without starting packet loops @@ -394,11 +394,11 @@ func TestClientConnection_SaveDuringCombat(t *testing.T) { t.Log("Simulating save/logout while in quest/stage") session := createTestSessionForServerWithChar(server, charID, "CombatChar") - + // Simulate being in a stage (quest) // In real scenario, session.stage would be set when entering quest // For now, we'll just test the basic save/logout flow - + // Note: Not calling Start() - testing handlers directly time.Sleep(50 * time.Millisecond) @@ -596,4 +596,3 @@ func TestClientConnection_PacketDuringLogout(t *testing.T) { t.Log("Race outcome: logout handler wrote last - marker byte overwritten (valid)") } } - diff --git a/server/channelserver/compression/nullcomp/nullcomp_test.go b/server/channelserver/compression/nullcomp/nullcomp_test.go index 8b94049aa..89e0768d8 100644 --- a/server/channelserver/compression/nullcomp/nullcomp_test.go +++ b/server/channelserver/compression/nullcomp/nullcomp_test.go @@ -69,9 +69,9 @@ func TestDecompress_WithValidHeader(t *testing.T) { func TestDecompress_WithoutHeader(t *testing.T) { tests := []struct { - name string - input []byte - expectError bool + name string + input []byte + expectError bool expectOriginal bool // Expect original data returned }{ { diff --git a/server/channelserver/constants_raviente.go b/server/channelserver/constants_raviente.go index b96660848..0306bb308 100644 --- a/server/channelserver/constants_raviente.go +++ b/server/channelserver/constants_raviente.go @@ -9,6 +9,6 @@ const ( // Raviente semaphore constants const ( - raviSemaphoreStride = 0x10000 // ID spacing between hs_l0* semaphores + raviSemaphoreStride = 0x10000 // ID spacing between hs_l0* semaphores raviSemaphoreMax = uint16(127) // max players per Raviente semaphore ) diff --git a/server/channelserver/handlers_achievement_test.go b/server/channelserver/handlers_achievement_test.go index 87bed7171..1cb2dac56 100644 --- a/server/channelserver/handlers_achievement_test.go +++ b/server/channelserver/handlers_achievement_test.go @@ -297,9 +297,9 @@ func TestGetAchData_Level7SilverTrophy(t *testing.T) { // produces the correct gold trophy and the last threshold as Required/Progress. func TestGetAchData_MaxedOut_AllCurves(t *testing.T) { tests := []struct { - name string - id uint8 - score int32 + name string + id uint8 + score int32 lastThresh int32 }{ // Curve 0: {5,15,30,50,100,150,200,300} sum=850, last=300 @@ -383,11 +383,11 @@ func TestGetAchData_Curve2_FestaWins(t *testing.T) { wantReq uint32 }{ {0, 0, 0, 1}, - {1, 1, 0, 2}, // Exactly at first threshold - {2, 1, 1, 2}, // One into second threshold - {3, 2, 0, 3}, // Exactly at second cumulative - {36, 8, 8, 8}, // Max level (sum of all thresholds) - {100, 8, 8, 8}, // Well above max + {1, 1, 0, 2}, // Exactly at first threshold + {2, 1, 1, 2}, // One into second threshold + {3, 2, 0, 3}, // Exactly at second cumulative + {36, 8, 8, 8}, // Max level (sum of all thresholds) + {100, 8, 8, 8}, // Well above max } for _, tt := range tests { diff --git a/server/channelserver/handlers_cast_binary.go b/server/channelserver/handlers_cast_binary.go index 7bcbd6f0c..f12da4316 100644 --- a/server/channelserver/handlers_cast_binary.go +++ b/server/channelserver/handlers_cast_binary.go @@ -35,9 +35,9 @@ func handleMsgSysCastBinary(s *Session, p mhfpacket.MHFPacket) { tmp := byteframe.NewByteFrameFromBytes(pkt.RawDataPayload) const ( - timerPayloadSize = 0x10 // expected payload length for timer packets + timerPayloadSize = 0x10 // expected payload length for timer packets timerSubtype = uint16(0x0002) // timer data subtype identifier - timerFlag = uint8(0x18) // timer flag byte + timerFlag = uint8(0x18) // timer flag byte ) if pkt.BroadcastType == BroadcastTypeStage && pkt.MessageType == BinaryMessageTypeData && len(pkt.RawDataPayload) == timerPayloadSize { if tmp.ReadUint16() == timerSubtype && tmp.ReadUint8() == timerFlag { diff --git a/server/channelserver/handlers_cast_binary_test.go b/server/channelserver/handlers_cast_binary_test.go index c1c1c096e..38c35c9ba 100644 --- a/server/channelserver/handlers_cast_binary_test.go +++ b/server/channelserver/handlers_cast_binary_test.go @@ -154,7 +154,7 @@ func TestBroadcastTypes(t *testing.T) { bf := byteframe.NewByteFrame() bf.SetBE() // Targeted uses BE msg := &binpacket.MsgBinTargeted{ - TargetCharIDs: []uint32{1, 2, 3}, + TargetCharIDs: []uint32{1, 2, 3}, RawDataPayload: []byte{0xDE, 0xAD, 0xBE, 0xEF}, } _ = msg.Build(bf) @@ -218,8 +218,8 @@ func TestBroadcastTypes(t *testing.T) { // TestBinaryMessageTypes verifies different message types are handled func TestBinaryMessageTypes(t *testing.T) { tests := []struct { - name string - messageType uint8 + name string + messageType uint8 buildPayload func() []byte }{ { diff --git a/server/channelserver/handlers_clients_test.go b/server/channelserver/handlers_clients_test.go index 65de21c36..236695788 100644 --- a/server/channelserver/handlers_clients_test.go +++ b/server/channelserver/handlers_clients_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - cfg "erupe-ce/config" "erupe-ce/common/byteframe" + cfg "erupe-ce/config" "erupe-ce/network/mhfpacket" "go.uber.org/zap" ) @@ -13,12 +13,12 @@ import ( // TestHandleMsgSysEnumerateClient tests client enumeration in stages func TestHandleMsgSysEnumerateClient(t *testing.T) { tests := []struct { - name string - stageID string - getType uint8 - setupStage func(*Server, string) - wantClientCount int - wantFailure bool + name string + stageID string + getType uint8 + setupStage func(*Server, string) + wantClientCount int + wantFailure bool }{ { name: "enumerate_all_clients", diff --git a/server/channelserver/handlers_commands_test.go b/server/channelserver/handlers_commands_test.go index 426c7f61c..3b23aa0a3 100644 --- a/server/channelserver/handlers_commands_test.go +++ b/server/channelserver/handlers_commands_test.go @@ -1256,4 +1256,3 @@ func TestParseChatCommand_UnknownCommand(t *testing.T) { t.Errorf("chat responses = %d, want 0 (unknown command is silent)", n) } } - diff --git a/server/channelserver/handlers_coverage2_test.go b/server/channelserver/handlers_coverage2_test.go index 7ef6fc560..d60fab4d3 100644 --- a/server/channelserver/handlers_coverage2_test.go +++ b/server/channelserver/handlers_coverage2_test.go @@ -141,8 +141,8 @@ func TestHandleMsgMhfMercenaryHuntdata_RequestTypeIs1(t *testing.T) { session := createMockSession(1, server) pkt := &mhfpacket.MsgMhfMercenaryHuntdata{ - AckHandle: 12345, - RequestType: 1, + AckHandle: 12345, + RequestType: 1, } handleMsgMhfMercenaryHuntdata(session, pkt) @@ -162,8 +162,8 @@ func TestHandleMsgMhfMercenaryHuntdata_RequestTypeIs0(t *testing.T) { session := createMockSession(1, server) pkt := &mhfpacket.MsgMhfMercenaryHuntdata{ - AckHandle: 12345, - RequestType: 0, + AckHandle: 12345, + RequestType: 0, } handleMsgMhfMercenaryHuntdata(session, pkt) @@ -183,8 +183,8 @@ func TestHandleMsgMhfMercenaryHuntdata_RequestTypeIs2(t *testing.T) { session := createMockSession(1, server) pkt := &mhfpacket.MsgMhfMercenaryHuntdata{ - AckHandle: 12345, - RequestType: 2, + AckHandle: 12345, + RequestType: 2, } handleMsgMhfMercenaryHuntdata(session, pkt) diff --git a/server/channelserver/handlers_coverage4_test.go b/server/channelserver/handlers_coverage4_test.go index b1ca0bb81..388002268 100644 --- a/server/channelserver/handlers_coverage4_test.go +++ b/server/channelserver/handlers_coverage4_test.go @@ -17,7 +17,7 @@ func TestHandleMsgMhfGetPaperData_Case0(t *testing.T) { handleMsgMhfGetPaperData(session, &mhfpacket.MsgMhfGetPaperData{ AckHandle: 1, - DataType: 0, + DataType: 0, }) select { @@ -36,7 +36,7 @@ func TestHandleMsgMhfGetPaperData_Case5(t *testing.T) { handleMsgMhfGetPaperData(session, &mhfpacket.MsgMhfGetPaperData{ AckHandle: 1, - DataType: 5, + DataType: 5, }) select { @@ -55,7 +55,7 @@ func TestHandleMsgMhfGetPaperData_Case6(t *testing.T) { handleMsgMhfGetPaperData(session, &mhfpacket.MsgMhfGetPaperData{ AckHandle: 1, - DataType: 6, + DataType: 6, }) select { @@ -75,7 +75,7 @@ func TestHandleMsgMhfGetPaperData_GreaterThan1000_KnownKey(t *testing.T) { // 6001 is a known key in paperGiftData handleMsgMhfGetPaperData(session, &mhfpacket.MsgMhfGetPaperData{ AckHandle: 1, - DataType: 6001, + DataType: 6001, }) select { @@ -95,7 +95,7 @@ func TestHandleMsgMhfGetPaperData_GreaterThan1000_UnknownKey(t *testing.T) { // 9999 is not a known key in paperGiftData handleMsgMhfGetPaperData(session, &mhfpacket.MsgMhfGetPaperData{ AckHandle: 1, - DataType: 9999, + DataType: 9999, }) select { @@ -114,7 +114,7 @@ func TestHandleMsgMhfGetPaperData_DefaultUnknownLessThan1000(t *testing.T) { // Unknown type < 1000, hits default case then falls to else branch handleMsgMhfGetPaperData(session, &mhfpacket.MsgMhfGetPaperData{ AckHandle: 1, - DataType: 99, + DataType: 99, }) select { diff --git a/server/channelserver/handlers_data_extended_test.go b/server/channelserver/handlers_data_extended_test.go index 8811866c8..4dfc16c3e 100644 --- a/server/channelserver/handlers_data_extended_test.go +++ b/server/channelserver/handlers_data_extended_test.go @@ -10,12 +10,12 @@ import ( // TestCharacterSaveDataPersistenceEdgeCases tests edge cases in character savedata persistence func TestCharacterSaveDataPersistenceEdgeCases(t *testing.T) { tests := []struct { - name string - charID uint32 - charName string - isNew bool - playtime uint32 - wantValid bool + name string + charID uint32 + charName string + isNew bool + playtime uint32 + wantValid bool }{ { name: "valid_new_character", @@ -85,34 +85,34 @@ func TestCharacterSaveDataPersistenceEdgeCases(t *testing.T) { // TestSaveDataCompressionRoundTrip tests compression/decompression edge cases func TestSaveDataCompressionRoundTrip(t *testing.T) { tests := []struct { - name string - dataSize int + name string + dataSize int dataPattern byte - compresses bool + compresses bool }{ { - name: "empty_data", - dataSize: 0, + name: "empty_data", + dataSize: 0, dataPattern: 0x00, - compresses: true, + compresses: true, }, { - name: "small_data", - dataSize: 10, + name: "small_data", + dataSize: 10, dataPattern: 0xFF, - compresses: false, // Small data may not compress well + compresses: false, // Small data may not compress well }, { - name: "highly_repetitive_data", - dataSize: 1000, + name: "highly_repetitive_data", + dataSize: 1000, dataPattern: 0xAA, - compresses: true, // Highly repetitive should compress + compresses: true, // Highly repetitive should compress }, { - name: "random_data", - dataSize: 500, + name: "random_data", + dataSize: 500, dataPattern: 0x00, // Will be varied by position - compresses: false, + compresses: false, }, } @@ -149,34 +149,34 @@ func TestSaveDataCompressionRoundTrip(t *testing.T) { // TestSaveDataPointerHandling tests edge cases in save data pointer management func TestSaveDataPointerHandling(t *testing.T) { tests := []struct { - name string - pointerCount int + name string + pointerCount int maxPointerValue int - valid bool + valid bool }{ { - name: "no_pointers", - pointerCount: 0, + name: "no_pointers", + pointerCount: 0, maxPointerValue: 0, - valid: true, + valid: true, }, { - name: "single_pointer", - pointerCount: 1, + name: "single_pointer", + pointerCount: 1, maxPointerValue: 100, - valid: true, + valid: true, }, { - name: "multiple_pointers", - pointerCount: 10, + name: "multiple_pointers", + pointerCount: 10, maxPointerValue: 5000, - valid: true, + valid: true, }, { - name: "max_pointers", - pointerCount: 100, + name: "max_pointers", + pointerCount: 100, maxPointerValue: 1000000, - valid: true, + valid: true, }, } @@ -321,12 +321,12 @@ func TestSaveDataRPHandling(t *testing.T) { // TestSaveDataHousingDataHandling tests various housing/decorative data fields func TestSaveDataHousingDataHandling(t *testing.T) { tests := []struct { - name string - houseTier []byte - houseData []byte + name string + houseTier []byte + houseData []byte bookshelfData []byte - galleryData []byte - validEmpty bool + galleryData []byte + validEmpty bool }{ { name: "all_empty_housing", @@ -588,8 +588,8 @@ func TestSaveDataBoundaryValues(t *testing.T) { // TestSaveDataSerialization tests savedata can be serialized to binary format func TestSaveDataSerialization(t *testing.T) { tests := []struct { - name string - charID uint32 + name string + charID uint32 playtime uint32 }{ { @@ -643,18 +643,18 @@ func TestSaveDataTimestampHandling(t *testing.T) { expectFresh bool }{ { - name: "just_saved", - ageSeconds: 0, + name: "just_saved", + ageSeconds: 0, expectFresh: true, }, { - name: "recent_save", - ageSeconds: 60, + name: "recent_save", + ageSeconds: 60, expectFresh: true, }, { - name: "old_save", - ageSeconds: 86400, // 1 day old + name: "old_save", + ageSeconds: 86400, // 1 day old expectFresh: false, }, } @@ -745,9 +745,9 @@ func TestDataCorruptionRecovery(t *testing.T) { // TestChecksumValidation tests savedata checksum validation func TestChecksumValidation(t *testing.T) { tests := []struct { - name string - data []byte - checksumValid bool + name string + data []byte + checksumValid bool }{ { name: "valid_checksum", @@ -794,11 +794,11 @@ func TestChecksumValidation(t *testing.T) { // TestSaveDataBackupRestoration tests backup and restoration functionality func TestSaveDataBackupRestoration(t *testing.T) { tests := []struct { - name string - originalCharID uint32 - originalPlaytime uint32 - hasBackup bool - canRestore bool + name string + originalCharID uint32 + originalPlaytime uint32 + hasBackup bool + canRestore bool }{ { name: "backup_with_restore", @@ -862,11 +862,11 @@ func TestSaveDataBackupRestoration(t *testing.T) { // TestSaveDataVersionMigration tests savedata version migration and compatibility func TestSaveDataVersionMigration(t *testing.T) { tests := []struct { - name string - sourceVersion int - targetVersion int - canMigrate bool - dataLoss bool + name string + sourceVersion int + targetVersion int + canMigrate bool + dataLoss bool }{ { name: "same_version", @@ -932,10 +932,10 @@ func TestSaveDataVersionMigration(t *testing.T) { // TestSaveDataRollback tests rollback to previous savedata state func TestSaveDataRollback(t *testing.T) { tests := []struct { - name string - snapshots int - canRollback bool - rollbackSteps int + name string + snapshots int + canRollback bool + rollbackSteps int }{ { name: "single_snapshot", @@ -1048,18 +1048,18 @@ func TestSaveDataConcurrentAccess(t *testing.T) { concurrentWrites int }{ { - name: "multiple_readers", - concurrentReads: 5, + name: "multiple_readers", + concurrentReads: 5, concurrentWrites: 0, }, { - name: "multiple_writers", - concurrentReads: 0, + name: "multiple_writers", + concurrentReads: 0, concurrentWrites: 3, }, { - name: "mixed_access", - concurrentReads: 3, + name: "mixed_access", + concurrentReads: 3, concurrentWrites: 2, }, } diff --git a/server/channelserver/handlers_data_test.go b/server/channelserver/handlers_data_test.go index 0078463af..8d06b6e3a 100644 --- a/server/channelserver/handlers_data_test.go +++ b/server/channelserver/handlers_data_test.go @@ -125,19 +125,19 @@ func TestScenarioSaveErrorHandling(t *testing.T) { // 3. The function should return early after sending fail ACK tests := []struct { - name string + name string scenarioData []byte - wantError bool + wantError bool }{ { - name: "valid_scenario_data", + name: "valid_scenario_data", scenarioData: []byte{0x01, 0x02, 0x03}, - wantError: false, + wantError: false, }, { - name: "empty_scenario_data", + name: "empty_scenario_data", scenarioData: []byte{}, - wantError: false, // Empty data is valid + wantError: false, // Empty data is valid }, } diff --git a/server/channelserver/handlers_diva.go b/server/channelserver/handlers_diva.go index 7e2a71676..a35d8c0b1 100644 --- a/server/channelserver/handlers_diva.go +++ b/server/channelserver/handlers_diva.go @@ -13,10 +13,10 @@ import ( // Diva Defense event duration constants (all values in seconds) const ( - divaPhaseDuration = 601200 // 6d 23h = first song phase - divaInterlude = 3900 // 65 min = gap between phases + divaPhaseDuration = 601200 // 6d 23h = first song phase + divaInterlude = 3900 // 65 min = gap between phases divaWeekDuration = secsPerWeek // 7 days = subsequent phase length - divaTotalLifespan = 2977200 // ~34.5 days = full event window + divaTotalLifespan = 2977200 // ~34.5 days = full event window ) func cleanupDiva(s *Session) { diff --git a/server/channelserver/handlers_festa_test.go b/server/channelserver/handlers_festa_test.go index 93de791b4..12cde0901 100644 --- a/server/channelserver/handlers_festa_test.go +++ b/server/channelserver/handlers_festa_test.go @@ -106,4 +106,3 @@ func TestHandleMsgMhfEnumerateRanking_State3(t *testing.T) { t.Error("No response packet queued") } } - diff --git a/server/channelserver/handlers_gacha_test.go b/server/channelserver/handlers_gacha_test.go index a0430af13..2c18e9aca 100644 --- a/server/channelserver/handlers_gacha_test.go +++ b/server/channelserver/handlers_gacha_test.go @@ -326,8 +326,8 @@ func TestHandleMsgMhfPlayStepupGacha_Success(t *testing.T) { func TestHandleMsgMhfGetStepupStatus_FreshStep(t *testing.T) { server := createMockServer() gachaRepo := &mockGachaRepo{ - stepupStep: 2, - stepupTime: time.Now(), // recent, not stale + stepupStep: 2, + stepupTime: time.Now(), // recent, not stale hasEntryType: true, } server.gachaRepo = gachaRepo diff --git a/server/channelserver/handlers_guild_cooking_test.go b/server/channelserver/handlers_guild_cooking_test.go index 568a9ca94..44fb5f8a6 100644 --- a/server/channelserver/handlers_guild_cooking_test.go +++ b/server/channelserver/handlers_guild_cooking_test.go @@ -33,8 +33,8 @@ func TestLoadGuildCooking_WithActiveMeals(t *testing.T) { server := createMockServer() guildMock := &mockGuildRepoOps{ meals: []*GuildMeal{ - {ID: 1, MealID: 100, Level: 3, CreatedAt: TimeAdjusted()}, // active (within 60 min) - {ID: 2, MealID: 200, Level: 1, CreatedAt: TimeAdjusted().Add(-2 * time.Hour)}, // expired + {ID: 1, MealID: 100, Level: 3, CreatedAt: TimeAdjusted()}, // active (within 60 min) + {ID: 2, MealID: 200, Level: 1, CreatedAt: TimeAdjusted().Add(-2 * time.Hour)}, // expired }, } guildMock.guild = &Guild{ID: 10} diff --git a/server/channelserver/handlers_guild_ops_test.go b/server/channelserver/handlers_guild_ops_test.go index 102ee0a70..33c118e2f 100644 --- a/server/channelserver/handlers_guild_ops_test.go +++ b/server/channelserver/handlers_guild_ops_test.go @@ -599,9 +599,9 @@ func newNullTermBF(data []byte) *byteframe.ByteFrame { func newMottoBF(sub, main uint8) *byteframe.ByteFrame { bf := byteframe.NewByteFrame() - bf.WriteUint16(0) // skipped - bf.WriteUint8(sub) // SubMotto - bf.WriteUint8(main) // MainMotto + bf.WriteUint16(0) // skipped + bf.WriteUint8(sub) // SubMotto + bf.WriteUint8(main) // MainMotto _, _ = bf.Seek(0, 0) return bf } diff --git a/server/channelserver/handlers_helpers_test.go b/server/channelserver/handlers_helpers_test.go index ff7610ac9..821deb973 100644 --- a/server/channelserver/handlers_helpers_test.go +++ b/server/channelserver/handlers_helpers_test.go @@ -208,4 +208,3 @@ func TestUpdateRights_Error(t *testing.T) { t.Fatal("updateRights should queue a packet even on error") } } - diff --git a/server/channelserver/handlers_house_test.go b/server/channelserver/handlers_house_test.go index 066ce079f..f9eff1f3a 100644 --- a/server/channelserver/handlers_house_test.go +++ b/server/channelserver/handlers_house_test.go @@ -2,9 +2,9 @@ package channelserver import ( "erupe-ce/common/byteframe" - cfg "erupe-ce/config" "erupe-ce/common/mhfitem" "erupe-ce/common/token" + cfg "erupe-ce/config" "erupe-ce/network/mhfpacket" "testing" @@ -699,7 +699,7 @@ func TestWarehouseItemSerialization(t *testing.T) { items []mhfitem.MHFItemStack }{ { - name: "empty_warehouse", + name: "empty_warehouse", items: []mhfitem.MHFItemStack{}, }, { @@ -747,11 +747,11 @@ func TestWarehouseEquipmentSerialization(t *testing.T) { equipment: []mhfitem.MHFEquipment{}, }, { - name: "single_equipment", + name: "single_equipment", equipment: createTestEquipment([]uint16{100}, []uint32{1}), }, { - name: "multiple_equipment", + name: "multiple_equipment", equipment: createTestEquipment([]uint16{100, 101, 102}, []uint32{1, 2, 3}), }, } @@ -837,16 +837,16 @@ func TestWarehouseItemDiff(t *testing.T) { // TestWarehouseEquipmentMerge verifies equipment merging logic func TestWarehouseEquipmentMerge(t *testing.T) { tests := []struct { - name string - oldEquip []mhfitem.MHFEquipment - newEquip []mhfitem.MHFEquipment - wantMerged int + name string + oldEquip []mhfitem.MHFEquipment + newEquip []mhfitem.MHFEquipment + wantMerged int }{ { - name: "merge_empty", - oldEquip: []mhfitem.MHFEquipment{}, - newEquip: []mhfitem.MHFEquipment{}, - wantMerged: 0, + name: "merge_empty", + oldEquip: []mhfitem.MHFEquipment{}, + newEquip: []mhfitem.MHFEquipment{}, + wantMerged: 0, }, { name: "add_new_equipment", diff --git a/server/channelserver/handlers_items_test.go b/server/channelserver/handlers_items_test.go index 11a569424..b880ddb63 100644 --- a/server/channelserver/handlers_items_test.go +++ b/server/channelserver/handlers_items_test.go @@ -45,10 +45,10 @@ func TestUserGetItems_ParsesData(t *testing.T) { bf.WriteUint16(1) // numStacks bf.WriteUint16(0) // unused // Item stack: warehouseID(4) + itemID(2) + quantity(2) + unk0(4) = 12 bytes - bf.WriteUint32(100) // warehouseID - bf.WriteUint16(500) // itemID - bf.WriteUint16(3) // quantity - bf.WriteUint32(0) // unk0 + bf.WriteUint32(100) // warehouseID + bf.WriteUint16(500) // itemID + bf.WriteUint16(3) // quantity + bf.WriteUint32(0) // unk0 server := createMockServer() userMock := &mockUserRepoForItems{itemBoxData: bf.Data()} diff --git a/server/channelserver/handlers_mercenary_test.go b/server/channelserver/handlers_mercenary_test.go index 5a355466d..2bb4ed2b7 100644 --- a/server/channelserver/handlers_mercenary_test.go +++ b/server/channelserver/handlers_mercenary_test.go @@ -86,9 +86,9 @@ func TestGetAirouDetails_Empty(t *testing.T) { func TestGetAirouDetails_SingleCat(t *testing.T) { input := Airou{ - ID: 42, - Name: []byte("TestCat"), - Task: 4, + ID: 42, + Name: []byte("TestCat"), + Task: 4, Personality: 3, Class: 2, Experience: 1500, @@ -175,16 +175,16 @@ func TestGetAirouDetails_ExtraTrailingBytes(t *testing.T) { catBuf := new(bytes.Buffer) _ = binary.Write(catBuf, binary.BigEndian, uint32(99)) // catID - catBuf.WriteByte(0) // skip - catBuf.Write(make([]byte, 18)) // name - catBuf.WriteByte(3) // currentTask - catBuf.Write(make([]byte, 16)) // appearance skip - catBuf.WriteByte(1) // personality - catBuf.WriteByte(2) // class - catBuf.Write(make([]byte, 5)) // affection skip + catBuf.WriteByte(0) // skip + catBuf.Write(make([]byte, 18)) // name + catBuf.WriteByte(3) // currentTask + catBuf.Write(make([]byte, 16)) // appearance skip + catBuf.WriteByte(1) // personality + catBuf.WriteByte(2) // class + catBuf.Write(make([]byte, 5)) // affection skip _ = binary.Write(catBuf, binary.BigEndian, uint32(500)) // experience - catBuf.WriteByte(0) // weapon equipped bool - catBuf.WriteByte(6) // weaponType + catBuf.WriteByte(0) // weapon equipped bool + catBuf.WriteByte(6) // weaponType _ = binary.Write(catBuf, binary.BigEndian, uint16(50)) // weaponID catData := catBuf.Bytes() @@ -238,8 +238,8 @@ func TestHandleMsgMhfMercenaryHuntdata_Unk0_1(t *testing.T) { session := createMockSession(1, server) pkt := &mhfpacket.MsgMhfMercenaryHuntdata{ - AckHandle: 12345, - RequestType: 1, + AckHandle: 12345, + RequestType: 1, } handleMsgMhfMercenaryHuntdata(session, pkt) @@ -260,8 +260,8 @@ func TestHandleMsgMhfMercenaryHuntdata_Unk0_0(t *testing.T) { session := createMockSession(1, server) pkt := &mhfpacket.MsgMhfMercenaryHuntdata{ - AckHandle: 12345, - RequestType: 0, + AckHandle: 12345, + RequestType: 0, } handleMsgMhfMercenaryHuntdata(session, pkt) diff --git a/server/channelserver/handlers_quest_test.go b/server/channelserver/handlers_quest_test.go index 8858815fd..e6f6a5d6a 100644 --- a/server/channelserver/handlers_quest_test.go +++ b/server/channelserver/handlers_quest_test.go @@ -73,10 +73,10 @@ func TestBackportQuestBasic(t *testing.T) { // TestFindSubSliceIndices tests byte slice pattern finding func TestFindSubSliceIndices(t *testing.T) { tests := []struct { - name string - data []byte - pattern []byte - expected int + name string + data []byte + pattern []byte + expected int }{ { name: "single_match", @@ -213,9 +213,9 @@ func TestEnumerateQuestBasicStructure(t *testing.T) { bf := byteframe.NewByteFrame() // Build a minimal response structure - bf.WriteUint16(0) // Returned count + bf.WriteUint16(0) // Returned count bf.WriteUint16(uint16(time.Now().Unix() & 0xFFFF)) // Unix timestamp offset - bf.WriteUint16(0) // Tune values count + bf.WriteUint16(0) // Tune values count data := bf.Data() @@ -301,12 +301,12 @@ func TestEnumerateQuestTuneValuesEncoding(t *testing.T) { // TestEventQuestCycleCalculation tests event quest cycle calculations func TestEventQuestCycleCalculation(t *testing.T) { tests := []struct { - name string - startTime time.Time - activeDays int - inactiveDays int - currentTime time.Time - shouldBeActive bool + name string + startTime time.Time + activeDays int + inactiveDays int + currentTime time.Time + shouldBeActive bool }{ { name: "active_period", @@ -409,8 +409,8 @@ func TestMakeEventQuestPacketStructure(t *testing.T) { questType := uint8(16) bf.WriteUint32(questID) - bf.WriteUint32(0) // Unk - bf.WriteUint8(0) // Unk + bf.WriteUint32(0) // Unk + bf.WriteUint8(0) // Unk bf.WriteUint8(maxPlayers) bf.WriteUint8(questType) bf.WriteBool(true) // Multi-player @@ -626,13 +626,13 @@ func TestGetUdBonusQuestInfoStructure(t *testing.T) { bf.SetLE() // Example UD bonus quest info entry - bf.WriteUint8(0) // Unk0 - bf.WriteUint8(0) // Unk1 - bf.WriteUint32(uint32(time.Now().Unix())) // StartTime - bf.WriteUint32(uint32(time.Now().Add(30*24*time.Hour).Unix())) // EndTime - bf.WriteUint32(0) // Unk4 - bf.WriteUint8(0) // Unk5 - bf.WriteUint8(0) // Unk6 + bf.WriteUint8(0) // Unk0 + bf.WriteUint8(0) // Unk1 + bf.WriteUint32(uint32(time.Now().Unix())) // StartTime + bf.WriteUint32(uint32(time.Now().Add(30 * 24 * time.Hour).Unix())) // EndTime + bf.WriteUint32(0) // Unk4 + bf.WriteUint8(0) // Unk5 + bf.WriteUint8(0) // Unk6 data := bf.Data() @@ -646,8 +646,8 @@ func TestGetUdBonusQuestInfoStructure(t *testing.T) { bf2 := byteframe.NewByteFrameFromBytes(data) bf2.SetLE() - bf2.ReadUint8() // Unk0 - bf2.ReadUint8() // Unk1 + bf2.ReadUint8() // Unk0 + bf2.ReadUint8() // Unk1 startTime := bf2.ReadUint32() endTime := bf2.ReadUint32() bf2.ReadUint32() // Unk4 @@ -665,9 +665,9 @@ func BenchmarkQuestEnumeration(b *testing.B) { bf := byteframe.NewByteFrame() // Build a response with tune values - bf.WriteUint16(0) // Returned count + bf.WriteUint16(0) // Returned count bf.WriteUint16(uint16(time.Now().Unix() & 0xFFFF)) - bf.WriteUint16(100) // 100 tune values + bf.WriteUint16(100) // 100 tune values for j := 0; j < 100; j++ { bf.WriteUint16(uint16(j)) diff --git a/server/channelserver/handlers_rengoku_integration_test.go b/server/channelserver/handlers_rengoku_integration_test.go index 14cd30531..390665f63 100644 --- a/server/channelserver/handlers_rengoku_integration_test.go +++ b/server/channelserver/handlers_rengoku_integration_test.go @@ -155,11 +155,11 @@ func TestRengokuData_SaveLoadRoundTrip(t *testing.T) { // Build a realistic payload with non-zero skill data payload := buildRengokuTestPayload( - 15, 18519, // MP: 15 stages, 18519 points - 4, 381, // SP: 4 stages, 381 points - [3]uint16{0x0012, 0x0034, 0x0056}, // skill slot IDs + 15, 18519, // MP: 15 stages, 18519 points + 4, 381, // SP: 4 stages, 381 points + [3]uint16{0x0012, 0x0034, 0x0056}, // skill slot IDs [3]uint32{0x00110001, 0x00220002, 0x00330003}, // equipped skills - [3]uint32{100, 200, 300}, // skill points invested + [3]uint32{100, 200, 300}, // skill points invested ) // === SAVE === @@ -212,8 +212,8 @@ func TestRengokuData_SaveLoadRoundTrip_AcrossSessions(t *testing.T) { session1 := createTestSessionForServerWithChar(server, charID, "RengokuChar2") payload := buildRengokuTestPayload( - 80, 342295, // MP: deep run - 38, 54634, // SP: deep run + 80, 342295, // MP: deep run + 38, 54634, // SP: deep run [3]uint16{0x00AA, 0x00BB, 0x00CC}, [3]uint32{0xDEAD0001, 0xBEEF0002, 0xCAFE0003}, [3]uint32{500, 750, 1000}, @@ -1052,9 +1052,9 @@ func TestRengokuData_LargePayload(t *testing.T) { } // Ensure valid score region at offsets 71-90 binary.BigEndian.PutUint32(payload[71:75], 20) // maxStageMp - binary.BigEndian.PutUint32(payload[75:79], 30000) // maxScoreMp - binary.BigEndian.PutUint32(payload[83:87], 10) // maxStageSp - binary.BigEndian.PutUint32(payload[87:91], 15000) // maxScoreSp + binary.BigEndian.PutUint32(payload[75:79], 30000) // maxScoreMp + binary.BigEndian.PutUint32(payload[83:87], 10) // maxStageSp + binary.BigEndian.PutUint32(payload[87:91], 15000) // maxScoreSp savePkt := &mhfpacket.MsgMhfSaveRengokuData{ AckHandle: 10001, diff --git a/server/channelserver/handlers_savedata_integration_test.go b/server/channelserver/handlers_savedata_integration_test.go index f84bca92b..4c3e9aab0 100644 --- a/server/channelserver/handlers_savedata_integration_test.go +++ b/server/channelserver/handlers_savedata_integration_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - cfg "erupe-ce/config" "erupe-ce/common/mhfitem" + cfg "erupe-ce/config" "erupe-ce/network/mhfpacket" "erupe-ce/server/channelserver/compression/nullcomp" ) @@ -263,7 +263,7 @@ func TestSaveLoad_CurrentEquipment(t *testing.T) { copy(saveData[88:], []byte("TestChar\x00")) // Set weapon type at known offset (simplified) - weaponTypeOffset := 500 // Example offset + weaponTypeOffset := 500 // Example offset saveData[weaponTypeOffset] = 0x03 // Great Sword compressed, err := nullcomp.Compress(saveData) @@ -377,10 +377,10 @@ func TestSaveLoad_Transmog(t *testing.T) { setSize := 76 // G10+ numSets := 1 transmogData := make([]byte, 2+numSets*(2+setSize)) - transmogData[0] = 1 // version + transmogData[0] = 1 // version transmogData[1] = byte(numSets) // count - transmogData[2] = 0 // index high byte - transmogData[3] = 1 // index low byte (set #1) + transmogData[2] = 0 // index high byte + transmogData[3] = 1 // index low byte (set #1) // Save transmog data pkt := &mhfpacket.MsgMhfSaveDecoMyset{ diff --git a/server/channelserver/handlers_shop_test.go b/server/channelserver/handlers_shop_test.go index d58b2d123..3d88be233 100644 --- a/server/channelserver/handlers_shop_test.go +++ b/server/channelserver/handlers_shop_test.go @@ -223,11 +223,11 @@ func TestHandleMsgMhfAcquireExchangeShop_RecordsPurchases(t *testing.T) { // Build payload: 2 exchanges, one with non-zero hash, one with zero hash payload := byteframe.NewByteFrame() - payload.WriteUint16(2) // count - payload.WriteUint32(12345) // itemHash 1 - payload.WriteUint32(3) // buyCount 1 - payload.WriteUint32(0) // itemHash 2 (zero, should be skipped) - payload.WriteUint32(1) // buyCount 2 + payload.WriteUint16(2) // count + payload.WriteUint32(12345) // itemHash 1 + payload.WriteUint32(3) // buyCount 1 + payload.WriteUint32(0) // itemHash 2 (zero, should be skipped) + payload.WriteUint32(1) // buyCount 2 pkt := &mhfpacket.MsgMhfAcquireExchangeShop{ AckHandle: 100, diff --git a/server/channelserver/handlers_stage_test.go b/server/channelserver/handlers_stage_test.go index 8bbe0bc5d..93cf5dafd 100644 --- a/server/channelserver/handlers_stage_test.go +++ b/server/channelserver/handlers_stage_test.go @@ -18,7 +18,6 @@ func TestCreateStageSuccess(t *testing.T) { mock := &MockCryptConn{sentPackets: make([][]byte, 0)} s := createTestSession(mock) - // Create a new stage pkt := &mhfpacket.MsgSysCreateStage{ StageID: "test_stage_1", @@ -46,7 +45,6 @@ func TestCreateStageDuplicate(t *testing.T) { mock := &MockCryptConn{sentPackets: make([][]byte, 0)} s := createTestSession(mock) - // Create first stage pkt1 := &mhfpacket.MsgSysCreateStage{ StageID: "test_stage", @@ -76,7 +74,6 @@ func TestStageLocking(t *testing.T) { mock := &MockCryptConn{sentPackets: make([][]byte, 0)} s := createTestSession(mock) - // Create a stage stage := NewStage("locked_stage") stage.host = s @@ -105,7 +102,6 @@ func TestStageReservation(t *testing.T) { mock := &MockCryptConn{sentPackets: make([][]byte, 0)} s := createTestSession(mock) - // Create a stage stage := NewStage("reserved_stage") stage.host = s @@ -164,7 +160,7 @@ func TestStageBinaryData(t *testing.T) { stage := NewStage("binary_stage") stage.rawBinaryData = make(map[stageBinaryKey][]byte) s.stage = stage - + s.server.stages.Store("binary_stage", stage) // Store binary data directly @@ -231,7 +227,6 @@ func TestIsStageFull(t *testing.T) { stage.clients[client] = uint32(i) } - s.server.stages.Store("full_test_stage", stage) result := isStageFull(s, "full_test_stage") @@ -303,7 +298,6 @@ func TestDestructEmptyStages(t *testing.T) { mock := &MockCryptConn{sentPackets: make([][]byte, 0)} s := createTestSession(mock) - // Create stages with different client counts emptyStage := NewStage("empty_stage") emptyStage.clients = make(map[*Session]uint32) @@ -423,7 +417,6 @@ func TestConcurrentStageOperations(t *testing.T) { mock := &MockCryptConn{sentPackets: make([][]byte, 0)} baseSession := createTestSession(mock) - // Create a stage stage := NewStage("concurrent_stage") stage.clients = make(map[*Session]uint32) diff --git a/server/channelserver/handlers_tournament_test.go b/server/channelserver/handlers_tournament_test.go index d1878b930..83d511a4a 100644 --- a/server/channelserver/handlers_tournament_test.go +++ b/server/channelserver/handlers_tournament_test.go @@ -12,7 +12,7 @@ func TestHandleMsgMhfInfoTournament_Type0(t *testing.T) { pkt := &mhfpacket.MsgMhfInfoTournament{ AckHandle: 12345, - QueryType: 0, + QueryType: 0, } handleMsgMhfInfoTournament(session, pkt) @@ -34,7 +34,7 @@ func TestHandleMsgMhfInfoTournament_Type1(t *testing.T) { pkt := &mhfpacket.MsgMhfInfoTournament{ AckHandle: 12345, - QueryType: 1, + QueryType: 1, } handleMsgMhfInfoTournament(session, pkt) diff --git a/server/channelserver/handlers_tower_test.go b/server/channelserver/handlers_tower_test.go index b61eac821..35d42ebaa 100644 --- a/server/channelserver/handlers_tower_test.go +++ b/server/channelserver/handlers_tower_test.go @@ -35,7 +35,7 @@ func TestHandleMsgMhfGetTenrouirai_Default(t *testing.T) { pkt := &mhfpacket.MsgMhfGetTenrouirai{ AckHandle: 12345, Unk0: 0, - DataType: 0, + DataType: 0, } handleMsgMhfGetTenrouirai(session, pkt) diff --git a/server/channelserver/integration_test.go b/server/channelserver/integration_test.go index b96516711..3db93c58e 100644 --- a/server/channelserver/integration_test.go +++ b/server/channelserver/integration_test.go @@ -19,22 +19,22 @@ func IntegrationTest_PacketQueueFlow(t *testing.T) { } tests := []struct { - name string - packetCount int - queueDelay time.Duration - wantPackets int + name string + packetCount int + queueDelay time.Duration + wantPackets int }{ { - name: "sequential_packets", - packetCount: 10, - queueDelay: 10 * time.Millisecond, - wantPackets: 10, + name: "sequential_packets", + packetCount: 10, + queueDelay: 10 * time.Millisecond, + wantPackets: 10, }, { - name: "rapid_fire_packets", - packetCount: 50, - queueDelay: 1 * time.Millisecond, - wantPackets: 50, + name: "rapid_fire_packets", + packetCount: 50, + queueDelay: 1 * time.Millisecond, + wantPackets: 50, }, } @@ -44,7 +44,7 @@ func IntegrationTest_PacketQueueFlow(t *testing.T) { s := &Session{ sendPackets: make(chan packet, 100), - server: &Server{ + server: &Server{ erupeConfig: &cfg.Config{ DebugOptions: cfg.DebugOptions{ LogOutboundMessages: false, @@ -126,7 +126,7 @@ func IntegrationTest_ConcurrentQueueing(t *testing.T) { }, }, } - s.cryptConn = mock + s.cryptConn = mock go s.sendLoop() @@ -224,7 +224,7 @@ func IntegrationTest_AckPacketFlow(t *testing.T) { }, }, } - s.cryptConn = mock + s.cryptConn = mock go s.sendLoop() @@ -289,7 +289,7 @@ func IntegrationTest_MixedPacketTypes(t *testing.T) { }, }, } - s.cryptConn = mock + s.cryptConn = mock go s.sendLoop() @@ -345,7 +345,7 @@ func IntegrationTest_PacketOrderPreservation(t *testing.T) { }, }, } - s.cryptConn = mock + s.cryptConn = mock go s.sendLoop() @@ -403,7 +403,7 @@ func IntegrationTest_QueueBackpressure(t *testing.T) { }, }, } - s.cryptConn = mock + s.cryptConn = mock go s.sendLoop() @@ -443,10 +443,10 @@ func IntegrationTest_GuildEnumerationFlow(t *testing.T) { } tests := []struct { - name string - guildCount int + name string + guildCount int membersPerGuild int - wantValid bool + wantValid bool }{ { name: "single_guild", @@ -530,22 +530,22 @@ func IntegrationTest_ConcurrentClientAccess(t *testing.T) { } tests := []struct { - name string + name string concurrentClients int packetsPerClient int wantTotalPackets int }{ { - name: "two_concurrent_clients", + name: "two_concurrent_clients", concurrentClients: 2, packetsPerClient: 5, - wantTotalPackets: 10, + wantTotalPackets: 10, }, { - name: "five_concurrent_clients", + name: "five_concurrent_clients", concurrentClients: 5, packetsPerClient: 10, - wantTotalPackets: 50, + wantTotalPackets: 50, }, } diff --git a/server/channelserver/repo_mocks_test.go b/server/channelserver/repo_mocks_test.go index 302b8515a..b7a6bd7a7 100644 --- a/server/channelserver/repo_mocks_test.go +++ b/server/channelserver/repo_mocks_test.go @@ -174,34 +174,51 @@ func (m *mockCharacterRepo) LoadColumn(_ uint32, column string) ([]byte, error) } return m.columns[column], nil } -func (m *mockCharacterRepo) SaveColumn(_ uint32, column string, data []byte) error { m.columns[column] = data; return m.saveErr } -func (m *mockCharacterRepo) GetName(_ uint32) (string, error) { return "TestChar", nil } -func (m *mockCharacterRepo) GetUserID(_ uint32) (uint32, error) { return 1, nil } -func (m *mockCharacterRepo) UpdateLastLogin(_ uint32, _ int64) error { return nil } -func (m *mockCharacterRepo) UpdateTimePlayed(_ uint32, _ int) error { return nil } -func (m *mockCharacterRepo) GetCharIDsByUserID(_ uint32) ([]uint32, error) { return nil, nil } -func (m *mockCharacterRepo) SaveBool(_ uint32, col string, v bool) error { m.bools[col] = v; return nil } -func (m *mockCharacterRepo) SaveString(_ uint32, col string, v string) error { m.strings[col] = v; return nil } -func (m *mockCharacterRepo) ReadBool(_ uint32, col string) (bool, error) { return m.bools[col], nil } -func (m *mockCharacterRepo) ReadString(_ uint32, col string) (string, error) { return m.strings[col], nil } +func (m *mockCharacterRepo) SaveColumn(_ uint32, column string, data []byte) error { + m.columns[column] = data + return m.saveErr +} +func (m *mockCharacterRepo) GetName(_ uint32) (string, error) { return "TestChar", nil } +func (m *mockCharacterRepo) GetUserID(_ uint32) (uint32, error) { return 1, nil } +func (m *mockCharacterRepo) UpdateLastLogin(_ uint32, _ int64) error { return nil } +func (m *mockCharacterRepo) UpdateTimePlayed(_ uint32, _ int) error { return nil } +func (m *mockCharacterRepo) GetCharIDsByUserID(_ uint32) ([]uint32, error) { return nil, nil } +func (m *mockCharacterRepo) SaveBool(_ uint32, col string, v bool) error { + m.bools[col] = v + return nil +} +func (m *mockCharacterRepo) SaveString(_ uint32, col string, v string) error { + m.strings[col] = v + return nil +} +func (m *mockCharacterRepo) ReadBool(_ uint32, col string) (bool, error) { return m.bools[col], nil } +func (m *mockCharacterRepo) ReadString(_ uint32, col string) (string, error) { + return m.strings[col], nil +} func (m *mockCharacterRepo) LoadColumnWithDefault(_ uint32, col string, def []byte) ([]byte, error) { if d, ok := m.columns[col]; ok { return d, nil } return def, nil } -func (m *mockCharacterRepo) SetDeleted(_ uint32) error { return nil } -func (m *mockCharacterRepo) UpdateDailyCafe(_ uint32, _ time.Time, _, _ uint32) error { return nil } -func (m *mockCharacterRepo) ResetDailyQuests(_ uint32) error { return nil } -func (m *mockCharacterRepo) ReadEtcPoints(_ uint32) (uint32, uint32, uint32, error) { return 0, 0, 0, nil } -func (m *mockCharacterRepo) ResetCafeTime(_ uint32, _ time.Time) error { return nil } -func (m *mockCharacterRepo) UpdateGuildPostChecked(_ uint32) error { return nil } -func (m *mockCharacterRepo) ReadGuildPostChecked(_ uint32) (time.Time, error) { return time.Time{}, nil } -func (m *mockCharacterRepo) SaveMercenary(_ uint32, _ []byte, _ uint32) error { return nil } -func (m *mockCharacterRepo) UpdateGCPAndPact(_ uint32, _ uint32, _ uint32) error { return nil } -func (m *mockCharacterRepo) FindByRastaID(_ int) (uint32, string, error) { return 0, "", nil } -func (m *mockCharacterRepo) SaveCharacterData(_ uint32, _ []byte, _, _ uint16, _ bool, _ uint8, _ uint16) error { return nil } -func (m *mockCharacterRepo) SaveHouseData(_ uint32, _ []byte, _, _, _, _, _ []byte) error { return nil } +func (m *mockCharacterRepo) SetDeleted(_ uint32) error { return nil } +func (m *mockCharacterRepo) UpdateDailyCafe(_ uint32, _ time.Time, _, _ uint32) error { return nil } +func (m *mockCharacterRepo) ResetDailyQuests(_ uint32) error { return nil } +func (m *mockCharacterRepo) ReadEtcPoints(_ uint32) (uint32, uint32, uint32, error) { + return 0, 0, 0, nil +} +func (m *mockCharacterRepo) ResetCafeTime(_ uint32, _ time.Time) error { return nil } +func (m *mockCharacterRepo) UpdateGuildPostChecked(_ uint32) error { return nil } +func (m *mockCharacterRepo) ReadGuildPostChecked(_ uint32) (time.Time, error) { + return time.Time{}, nil +} +func (m *mockCharacterRepo) SaveMercenary(_ uint32, _ []byte, _ uint32) error { return nil } +func (m *mockCharacterRepo) UpdateGCPAndPact(_ uint32, _ uint32, _ uint32) error { return nil } +func (m *mockCharacterRepo) FindByRastaID(_ int) (uint32, string, error) { return 0, "", nil } +func (m *mockCharacterRepo) SaveCharacterData(_ uint32, _ []byte, _, _ uint16, _ bool, _ uint8, _ uint16) error { + return nil +} +func (m *mockCharacterRepo) SaveHouseData(_ uint32, _ []byte, _, _, _, _, _ []byte) error { return nil } func (m *mockCharacterRepo) LoadSaveData(_ uint32) (uint32, []byte, bool, string, error) { return m.loadSaveDataID, m.loadSaveDataData, m.loadSaveDataNew, m.loadSaveDataName, m.loadSaveDataErr } @@ -209,10 +226,10 @@ func (m *mockCharacterRepo) LoadSaveData(_ uint32) (uint32, []byte, bool, string // --- mockGoocooRepo --- type mockGoocooRepo struct { - slots map[uint32][]byte - ensureCalled bool - clearCalled []uint32 - savedSlots map[uint32][]byte + slots map[uint32][]byte + ensureCalled bool + clearCalled []uint32 + savedSlots map[uint32][]byte } func newMockGoocooRepo() *mockGoocooRepo { @@ -265,77 +282,87 @@ func (m *mockGuildRepoForMail) GetMembers(_ uint32, _ bool) ([]*GuildMember, err } // Stub out all other GuildRepo methods. -func (m *mockGuildRepoForMail) GetByID(_ uint32) (*Guild, error) { return nil, errNotFound } -func (m *mockGuildRepoForMail) ListAll() ([]*Guild, error) { return nil, nil } +func (m *mockGuildRepoForMail) GetByID(_ uint32) (*Guild, error) { return nil, errNotFound } +func (m *mockGuildRepoForMail) ListAll() ([]*Guild, error) { return nil, nil } func (m *mockGuildRepoForMail) Create(_ uint32, _ string) (int32, error) { return 0, nil } -func (m *mockGuildRepoForMail) Save(_ *Guild) error { return nil } -func (m *mockGuildRepoForMail) Disband(_ uint32) error { return nil } -func (m *mockGuildRepoForMail) RemoveCharacter(_ uint32) error { return nil } -func (m *mockGuildRepoForMail) AcceptApplication(_, _ uint32) error { return nil } +func (m *mockGuildRepoForMail) Save(_ *Guild) error { return nil } +func (m *mockGuildRepoForMail) Disband(_ uint32) error { return nil } +func (m *mockGuildRepoForMail) RemoveCharacter(_ uint32) error { return nil } +func (m *mockGuildRepoForMail) AcceptApplication(_, _ uint32) error { return nil } func (m *mockGuildRepoForMail) CreateApplication(_, _, _ uint32, _ GuildApplicationType) error { return nil } func (m *mockGuildRepoForMail) CreateApplicationWithMail(_, _, _ uint32, _ GuildApplicationType, _, _ uint32, _, _ string) error { return nil } -func (m *mockGuildRepoForMail) CancelInvitation(_, _ uint32) error { return nil } -func (m *mockGuildRepoForMail) RejectApplication(_, _ uint32) error { return nil } -func (m *mockGuildRepoForMail) ArrangeCharacters(_ []uint32) error { return nil } +func (m *mockGuildRepoForMail) CancelInvitation(_, _ uint32) error { return nil } +func (m *mockGuildRepoForMail) RejectApplication(_, _ uint32) error { return nil } +func (m *mockGuildRepoForMail) ArrangeCharacters(_ []uint32) error { return nil } func (m *mockGuildRepoForMail) GetApplication(_, _ uint32, _ GuildApplicationType) (*GuildApplication, error) { return nil, nil } -func (m *mockGuildRepoForMail) HasApplication(_, _ uint32) (bool, error) { return false, nil } -func (m *mockGuildRepoForMail) GetItemBox(_ uint32) ([]byte, error) { return nil, nil } -func (m *mockGuildRepoForMail) SaveItemBox(_ uint32, _ []byte) error { return nil } -func (m *mockGuildRepoForMail) GetCharacterMembership(_ uint32) (*GuildMember, error) { return nil, nil } -func (m *mockGuildRepoForMail) SaveMember(_ *GuildMember) error { return nil } -func (m *mockGuildRepoForMail) SetRecruiting(_ uint32, _ bool) error { return nil } -func (m *mockGuildRepoForMail) SetPugiOutfits(_ uint32, _ uint32) error { return nil } -func (m *mockGuildRepoForMail) SetRecruiter(_ uint32, _ bool) error { return nil } -func (m *mockGuildRepoForMail) AddMemberDailyRP(_ uint32, _ uint16) error { return nil } +func (m *mockGuildRepoForMail) HasApplication(_, _ uint32) (bool, error) { return false, nil } +func (m *mockGuildRepoForMail) GetItemBox(_ uint32) ([]byte, error) { return nil, nil } +func (m *mockGuildRepoForMail) SaveItemBox(_ uint32, _ []byte) error { return nil } +func (m *mockGuildRepoForMail) GetCharacterMembership(_ uint32) (*GuildMember, error) { + return nil, nil +} +func (m *mockGuildRepoForMail) SaveMember(_ *GuildMember) error { return nil } +func (m *mockGuildRepoForMail) SetRecruiting(_ uint32, _ bool) error { return nil } +func (m *mockGuildRepoForMail) SetPugiOutfits(_ uint32, _ uint32) error { return nil } +func (m *mockGuildRepoForMail) SetRecruiter(_ uint32, _ bool) error { return nil } +func (m *mockGuildRepoForMail) AddMemberDailyRP(_ uint32, _ uint16) error { return nil } func (m *mockGuildRepoForMail) ExchangeEventRP(_ uint32, _ uint16) (uint32, error) { return 0, nil } -func (m *mockGuildRepoForMail) AddRankRP(_ uint32, _ uint16) error { return nil } -func (m *mockGuildRepoForMail) AddEventRP(_ uint32, _ uint16) error { return nil } -func (m *mockGuildRepoForMail) GetRoomRP(_ uint32) (uint16, error) { return 0, nil } -func (m *mockGuildRepoForMail) SetRoomRP(_ uint32, _ uint16) error { return nil } -func (m *mockGuildRepoForMail) AddRoomRP(_ uint32, _ uint16) error { return nil } -func (m *mockGuildRepoForMail) SetRoomExpiry(_ uint32, _ time.Time) error { return nil } -func (m *mockGuildRepoForMail) ListPosts(_ uint32, _ int) ([]*MessageBoardPost, error) { return nil, nil } -func (m *mockGuildRepoForMail) CreatePost(_, _, _ uint32, _ int, _, _ string, _ int) error { return nil } -func (m *mockGuildRepoForMail) DeletePost(_ uint32) error { return nil } -func (m *mockGuildRepoForMail) UpdatePost(_ uint32, _, _ string) error { return nil } -func (m *mockGuildRepoForMail) UpdatePostStamp(_, _ uint32) error { return nil } -func (m *mockGuildRepoForMail) GetPostLikedBy(_ uint32) (string, error) { return "", nil } -func (m *mockGuildRepoForMail) SetPostLikedBy(_ uint32, _ string) error { return nil } -func (m *mockGuildRepoForMail) CountNewPosts(_ uint32, _ time.Time) (int, error) { return 0, nil } -func (m *mockGuildRepoForMail) GetAllianceByID(_ uint32) (*GuildAlliance, error) { return nil, nil } -func (m *mockGuildRepoForMail) ListAlliances() ([]*GuildAlliance, error) { return nil, nil } -func (m *mockGuildRepoForMail) CreateAlliance(_ string, _ uint32) error { return nil } -func (m *mockGuildRepoForMail) DeleteAlliance(_ uint32) error { return nil } -func (m *mockGuildRepoForMail) RemoveGuildFromAlliance(_, _, _, _ uint32) error { return nil } +func (m *mockGuildRepoForMail) AddRankRP(_ uint32, _ uint16) error { return nil } +func (m *mockGuildRepoForMail) AddEventRP(_ uint32, _ uint16) error { return nil } +func (m *mockGuildRepoForMail) GetRoomRP(_ uint32) (uint16, error) { return 0, nil } +func (m *mockGuildRepoForMail) SetRoomRP(_ uint32, _ uint16) error { return nil } +func (m *mockGuildRepoForMail) AddRoomRP(_ uint32, _ uint16) error { return nil } +func (m *mockGuildRepoForMail) SetRoomExpiry(_ uint32, _ time.Time) error { return nil } +func (m *mockGuildRepoForMail) ListPosts(_ uint32, _ int) ([]*MessageBoardPost, error) { + return nil, nil +} +func (m *mockGuildRepoForMail) CreatePost(_, _, _ uint32, _ int, _, _ string, _ int) error { + return nil +} +func (m *mockGuildRepoForMail) DeletePost(_ uint32) error { return nil } +func (m *mockGuildRepoForMail) UpdatePost(_ uint32, _, _ string) error { return nil } +func (m *mockGuildRepoForMail) UpdatePostStamp(_, _ uint32) error { return nil } +func (m *mockGuildRepoForMail) GetPostLikedBy(_ uint32) (string, error) { return "", nil } +func (m *mockGuildRepoForMail) SetPostLikedBy(_ uint32, _ string) error { return nil } +func (m *mockGuildRepoForMail) CountNewPosts(_ uint32, _ time.Time) (int, error) { return 0, nil } +func (m *mockGuildRepoForMail) GetAllianceByID(_ uint32) (*GuildAlliance, error) { return nil, nil } +func (m *mockGuildRepoForMail) ListAlliances() ([]*GuildAlliance, error) { return nil, nil } +func (m *mockGuildRepoForMail) CreateAlliance(_ string, _ uint32) error { return nil } +func (m *mockGuildRepoForMail) DeleteAlliance(_ uint32) error { return nil } +func (m *mockGuildRepoForMail) RemoveGuildFromAlliance(_, _, _, _ uint32) error { return nil } func (m *mockGuildRepoForMail) ListAdventures(_ uint32) ([]*GuildAdventure, error) { return nil, nil } -func (m *mockGuildRepoForMail) CreateAdventure(_, _ uint32, _, _ int64) error { return nil } -func (m *mockGuildRepoForMail) CreateAdventureWithCharge(_, _, _ uint32, _, _ int64) error { return nil } -func (m *mockGuildRepoForMail) CollectAdventure(_ uint32, _ uint32) error { return nil } -func (m *mockGuildRepoForMail) ChargeAdventure(_ uint32, _ uint32) error { return nil } -func (m *mockGuildRepoForMail) GetPendingHunt(_ uint32) (*TreasureHunt, error) { return nil, nil } -func (m *mockGuildRepoForMail) ListGuildHunts(_, _ uint32) ([]*TreasureHunt, error) { return nil, nil } -func (m *mockGuildRepoForMail) CreateHunt(_, _, _, _ uint32, _ []byte, _ string) error { return nil } -func (m *mockGuildRepoForMail) AcquireHunt(_ uint32) error { return nil } -func (m *mockGuildRepoForMail) RegisterHuntReport(_, _ uint32) error { return nil } -func (m *mockGuildRepoForMail) CollectHunt(_ uint32) error { return nil } -func (m *mockGuildRepoForMail) ClaimHuntReward(_, _ uint32) error { return nil } -func (m *mockGuildRepoForMail) ListMeals(_ uint32) ([]*GuildMeal, error) { return nil, nil } -func (m *mockGuildRepoForMail) CreateMeal(_, _, _ uint32, _ time.Time) (uint32, error) { return 0, nil } -func (m *mockGuildRepoForMail) UpdateMeal(_, _, _ uint32, _ time.Time) error { return nil } -func (m *mockGuildRepoForMail) ClaimHuntBox(_ uint32, _ time.Time) error { return nil } -func (m *mockGuildRepoForMail) ListGuildKills(_, _ uint32) ([]*GuildKill, error) { return nil, nil } -func (m *mockGuildRepoForMail) CountGuildKills(_, _ uint32) (int, error) { return 0, nil } -func (m *mockGuildRepoForMail) ClearTreasureHunt(_ uint32) error { return nil } +func (m *mockGuildRepoForMail) CreateAdventure(_, _ uint32, _, _ int64) error { return nil } +func (m *mockGuildRepoForMail) CreateAdventureWithCharge(_, _, _ uint32, _, _ int64) error { + return nil +} +func (m *mockGuildRepoForMail) CollectAdventure(_ uint32, _ uint32) error { return nil } +func (m *mockGuildRepoForMail) ChargeAdventure(_ uint32, _ uint32) error { return nil } +func (m *mockGuildRepoForMail) GetPendingHunt(_ uint32) (*TreasureHunt, error) { return nil, nil } +func (m *mockGuildRepoForMail) ListGuildHunts(_, _ uint32) ([]*TreasureHunt, error) { return nil, nil } +func (m *mockGuildRepoForMail) CreateHunt(_, _, _, _ uint32, _ []byte, _ string) error { return nil } +func (m *mockGuildRepoForMail) AcquireHunt(_ uint32) error { return nil } +func (m *mockGuildRepoForMail) RegisterHuntReport(_, _ uint32) error { return nil } +func (m *mockGuildRepoForMail) CollectHunt(_ uint32) error { return nil } +func (m *mockGuildRepoForMail) ClaimHuntReward(_, _ uint32) error { return nil } +func (m *mockGuildRepoForMail) ListMeals(_ uint32) ([]*GuildMeal, error) { return nil, nil } +func (m *mockGuildRepoForMail) CreateMeal(_, _, _ uint32, _ time.Time) (uint32, error) { return 0, nil } +func (m *mockGuildRepoForMail) UpdateMeal(_, _, _ uint32, _ time.Time) error { return nil } +func (m *mockGuildRepoForMail) ClaimHuntBox(_ uint32, _ time.Time) error { return nil } +func (m *mockGuildRepoForMail) ListGuildKills(_, _ uint32) ([]*GuildKill, error) { return nil, nil } +func (m *mockGuildRepoForMail) CountGuildKills(_, _ uint32) (int, error) { return 0, nil } +func (m *mockGuildRepoForMail) ClearTreasureHunt(_ uint32) error { return nil } func (m *mockGuildRepoForMail) InsertKillLog(_ uint32, _ int, _ uint8, _ time.Time) error { return nil } -func (m *mockGuildRepoForMail) ListInvitedCharacters(_ uint32) ([]*ScoutedCharacter, error) { return nil, nil } -func (m *mockGuildRepoForMail) RolloverDailyRP(_ uint32, _ time.Time) error { return nil } -func (m *mockGuildRepoForMail) AddWeeklyBonusUsers(_ uint32, _ uint8) error { return nil } +func (m *mockGuildRepoForMail) ListInvitedCharacters(_ uint32) ([]*ScoutedCharacter, error) { + return nil, nil +} +func (m *mockGuildRepoForMail) RolloverDailyRP(_ uint32, _ time.Time) error { return nil } +func (m *mockGuildRepoForMail) AddWeeklyBonusUsers(_ uint32, _ uint8) error { return nil } // --- mockGuildRepoOps (enhanced guild repo for ops/scout/board tests) --- @@ -371,7 +398,7 @@ type mockGuildRepoOps struct { // Alliance alliance *GuildAlliance - getAllianceErr error + getAllianceErr error createAllianceErr error deleteAllianceErr error removeAllyErr error @@ -386,29 +413,29 @@ type mockGuildRepoOps struct { updateMealErr error // Adventure - adventures []*GuildAdventure - listAdvErr error - createAdvErr error - collectAdvID uint32 - chargeAdvID uint32 - chargeAdvAmount uint32 + adventures []*GuildAdventure + listAdvErr error + createAdvErr error + collectAdvID uint32 + chargeAdvID uint32 + chargeAdvAmount uint32 // Treasure hunt - pendingHunt *TreasureHunt - guildHunts []*TreasureHunt - listHuntsErr error - acquireHuntID uint32 - reportHuntID uint32 - collectHuntID uint32 - claimHuntID uint32 - createHuntErr error + pendingHunt *TreasureHunt + guildHunts []*TreasureHunt + listHuntsErr error + acquireHuntID uint32 + reportHuntID uint32 + collectHuntID uint32 + claimHuntID uint32 + createHuntErr error // Hunt data - guildKills []*GuildKill - listKillsErr error - countKills int - countKillsErr error - claimBoxCalled bool + guildKills []*GuildKill + listKillsErr error + countKills int + countKillsErr error + claimBoxCalled bool // Data membership *GuildMember @@ -623,46 +650,56 @@ func (m *mockUserRepoForItems) SetItemBox(_ uint32, data []byte) error { } // Stub all other UserRepo methods. -func (m *mockUserRepoForItems) GetGachaPoints(_ uint32) (uint32, uint32, uint32, error) { return 0, 0, 0, nil } -func (m *mockUserRepoForItems) GetTrialCoins(_ uint32) (uint16, error) { return 0, nil } -func (m *mockUserRepoForItems) DeductTrialCoins(_ uint32, _ uint32) error { return nil } -func (m *mockUserRepoForItems) DeductPremiumCoins(_ uint32, _ uint32) error { return nil } -func (m *mockUserRepoForItems) AddPremiumCoins(_ uint32, _ uint32) error { return nil } -func (m *mockUserRepoForItems) AddTrialCoins(_ uint32, _ uint32) error { return nil } -func (m *mockUserRepoForItems) DeductFrontierPoints(_ uint32, _ uint32) error { return nil } -func (m *mockUserRepoForItems) AddFrontierPoints(_ uint32, _ uint32) error { return nil } -func (m *mockUserRepoForItems) AdjustFrontierPointsDeduct(_ uint32, _ int) (uint32, error) { return 0, nil } -func (m *mockUserRepoForItems) AdjustFrontierPointsCredit(_ uint32, _ int) (uint32, error) { return 0, nil } -func (m *mockUserRepoForItems) AddFrontierPointsFromGacha(_ uint32, _ uint32, _ uint8) error { return nil } -func (m *mockUserRepoForItems) GetRights(_ uint32) (uint32, error) { return 0, nil } -func (m *mockUserRepoForItems) SetRights(_ uint32, _ uint32) error { return nil } -func (m *mockUserRepoForItems) IsOp(_ uint32) (bool, error) { return false, nil } -func (m *mockUserRepoForItems) SetLastCharacter(_ uint32, _ uint32) error { return nil } -func (m *mockUserRepoForItems) GetTimer(_ uint32) (bool, error) { return false, nil } -func (m *mockUserRepoForItems) SetTimer(_ uint32, _ bool) error { return nil } -func (m *mockUserRepoForItems) CountByPSNID(_ string) (int, error) { return 0, nil } -func (m *mockUserRepoForItems) SetPSNID(_ uint32, _ string) error { return nil } -func (m *mockUserRepoForItems) GetDiscordToken(_ uint32) (string, error) { return "", nil } -func (m *mockUserRepoForItems) SetDiscordToken(_ uint32, _ string) error { return nil } -func (m *mockUserRepoForItems) LinkDiscord(_ string, _ string) (string, error) { return "", nil } -func (m *mockUserRepoForItems) SetPasswordByDiscordID(_ string, _ []byte) error { return nil } -func (m *mockUserRepoForItems) GetByIDAndUsername(_ uint32) (uint32, string, error) { return 0, "", nil } -func (m *mockUserRepoForItems) BanUser(_ uint32, _ *time.Time) error { return nil } +func (m *mockUserRepoForItems) GetGachaPoints(_ uint32) (uint32, uint32, uint32, error) { + return 0, 0, 0, nil +} +func (m *mockUserRepoForItems) GetTrialCoins(_ uint32) (uint16, error) { return 0, nil } +func (m *mockUserRepoForItems) DeductTrialCoins(_ uint32, _ uint32) error { return nil } +func (m *mockUserRepoForItems) DeductPremiumCoins(_ uint32, _ uint32) error { return nil } +func (m *mockUserRepoForItems) AddPremiumCoins(_ uint32, _ uint32) error { return nil } +func (m *mockUserRepoForItems) AddTrialCoins(_ uint32, _ uint32) error { return nil } +func (m *mockUserRepoForItems) DeductFrontierPoints(_ uint32, _ uint32) error { return nil } +func (m *mockUserRepoForItems) AddFrontierPoints(_ uint32, _ uint32) error { return nil } +func (m *mockUserRepoForItems) AdjustFrontierPointsDeduct(_ uint32, _ int) (uint32, error) { + return 0, nil +} +func (m *mockUserRepoForItems) AdjustFrontierPointsCredit(_ uint32, _ int) (uint32, error) { + return 0, nil +} +func (m *mockUserRepoForItems) AddFrontierPointsFromGacha(_ uint32, _ uint32, _ uint8) error { + return nil +} +func (m *mockUserRepoForItems) GetRights(_ uint32) (uint32, error) { return 0, nil } +func (m *mockUserRepoForItems) SetRights(_ uint32, _ uint32) error { return nil } +func (m *mockUserRepoForItems) IsOp(_ uint32) (bool, error) { return false, nil } +func (m *mockUserRepoForItems) SetLastCharacter(_ uint32, _ uint32) error { return nil } +func (m *mockUserRepoForItems) GetTimer(_ uint32) (bool, error) { return false, nil } +func (m *mockUserRepoForItems) SetTimer(_ uint32, _ bool) error { return nil } +func (m *mockUserRepoForItems) CountByPSNID(_ string) (int, error) { return 0, nil } +func (m *mockUserRepoForItems) SetPSNID(_ uint32, _ string) error { return nil } +func (m *mockUserRepoForItems) GetDiscordToken(_ uint32) (string, error) { return "", nil } +func (m *mockUserRepoForItems) SetDiscordToken(_ uint32, _ string) error { return nil } +func (m *mockUserRepoForItems) LinkDiscord(_ string, _ string) (string, error) { return "", nil } +func (m *mockUserRepoForItems) SetPasswordByDiscordID(_ string, _ []byte) error { return nil } +func (m *mockUserRepoForItems) GetByIDAndUsername(_ uint32) (uint32, string, error) { + return 0, "", nil +} +func (m *mockUserRepoForItems) BanUser(_ uint32, _ *time.Time) error { return nil } // --- mockStampRepoForItems --- type mockStampRepoForItems struct { - checkedTime time.Time - checkedErr error - totals [2]uint16 // total, redeemed - totalsErr error - initCalled bool + checkedTime time.Time + checkedErr error + totals [2]uint16 // total, redeemed + totalsErr error + initCalled bool incrementCalled bool - setCalled bool - exchangeResult [2]uint16 - exchangeErr error - yearlyResult [2]uint16 - yearlyErr error + setCalled bool + exchangeResult [2]uint16 + exchangeErr error + yearlyResult [2]uint16 + yearlyErr error // Monthly item fields monthlyClaimed time.Time @@ -736,27 +773,33 @@ func (m *mockHouseRepoForItems) SetWarehouseItemData(_ uint32, index uint8, data return m.setErr } -func (m *mockHouseRepoForItems) InitializeWarehouse(_ uint32) error { return nil } +func (m *mockHouseRepoForItems) InitializeWarehouse(_ uint32) error { return nil } // Stub all other HouseRepo methods. -func (m *mockHouseRepoForItems) UpdateInterior(_ uint32, _ []byte) error { return nil } -func (m *mockHouseRepoForItems) GetHouseByCharID(_ uint32) (HouseData, error) { return HouseData{}, nil } -func (m *mockHouseRepoForItems) SearchHousesByName(_ string) ([]HouseData, error) { return nil, nil } -func (m *mockHouseRepoForItems) UpdateHouseState(_ uint32, _ uint8, _ string) error { return nil } -func (m *mockHouseRepoForItems) GetHouseAccess(_ uint32) (uint8, string, error) { return 0, "", nil } +func (m *mockHouseRepoForItems) UpdateInterior(_ uint32, _ []byte) error { return nil } +func (m *mockHouseRepoForItems) GetHouseByCharID(_ uint32) (HouseData, error) { + return HouseData{}, nil +} +func (m *mockHouseRepoForItems) SearchHousesByName(_ string) ([]HouseData, error) { return nil, nil } +func (m *mockHouseRepoForItems) UpdateHouseState(_ uint32, _ uint8, _ string) error { return nil } +func (m *mockHouseRepoForItems) GetHouseAccess(_ uint32) (uint8, string, error) { return 0, "", nil } func (m *mockHouseRepoForItems) GetHouseContents(_ uint32) ([]byte, []byte, []byte, []byte, []byte, []byte, []byte, error) { return nil, nil, nil, nil, nil, nil, nil, nil } -func (m *mockHouseRepoForItems) GetMission(_ uint32) ([]byte, error) { return nil, nil } -func (m *mockHouseRepoForItems) UpdateMission(_ uint32, _ []byte) error { return nil } +func (m *mockHouseRepoForItems) GetMission(_ uint32) ([]byte, error) { return nil, nil } +func (m *mockHouseRepoForItems) UpdateMission(_ uint32, _ []byte) error { return nil } func (m *mockHouseRepoForItems) GetWarehouseNames(_ uint32) ([10]string, [10]string, error) { return [10]string{}, [10]string{}, nil } -func (m *mockHouseRepoForItems) RenameWarehouseBox(_ uint32, _ uint8, _ uint8, _ string) error { return nil } -func (m *mockHouseRepoForItems) GetWarehouseEquipData(_ uint32, _ uint8) ([]byte, error) { return nil, nil } -func (m *mockHouseRepoForItems) SetWarehouseEquipData(_ uint32, _ uint8, _ []byte) error { return nil } -func (m *mockHouseRepoForItems) GetTitles(_ uint32) ([]Title, error) { return nil, nil } -func (m *mockHouseRepoForItems) AcquireTitle(_ uint16, _ uint32) error { return nil } +func (m *mockHouseRepoForItems) RenameWarehouseBox(_ uint32, _ uint8, _ uint8, _ string) error { + return nil +} +func (m *mockHouseRepoForItems) GetWarehouseEquipData(_ uint32, _ uint8) ([]byte, error) { + return nil, nil +} +func (m *mockHouseRepoForItems) SetWarehouseEquipData(_ uint32, _ uint8, _ []byte) error { return nil } +func (m *mockHouseRepoForItems) GetTitles(_ uint32) ([]Title, error) { return nil, nil } +func (m *mockHouseRepoForItems) AcquireTitle(_ uint16, _ uint32) error { return nil } // --- mockSessionRepo --- @@ -766,11 +809,13 @@ type mockSessionRepo struct { clearErr error updateErr error - boundToken string + boundToken string clearedToken string } -func (m *mockSessionRepo) ValidateLoginToken(_ string, _ uint32, _ uint32) error { return m.validateErr } +func (m *mockSessionRepo) ValidateLoginToken(_ string, _ uint32, _ uint32) error { + return m.validateErr +} func (m *mockSessionRepo) BindSession(token string, _ uint16, _ uint32) error { m.boundToken = token return m.bindErr @@ -816,10 +861,10 @@ type mockGachaRepo struct { deletedBox bool // Shop - gachas []Gacha - listShopErr error - shopType int - allEntries []GachaEntry + gachas []Gacha + listShopErr error + shopType int + allEntries []GachaEntry allEntriesErr error weightDivisor float64 @@ -873,8 +918,8 @@ func (m *mockGachaRepo) DeleteBoxEntries(_ uint32, _ uint32) error { m.deletedBox = true return nil } -func (m *mockGachaRepo) ListShop() ([]Gacha, error) { return m.gachas, m.listShopErr } -func (m *mockGachaRepo) GetShopType(_ uint32) (int, error) { return m.shopType, nil } +func (m *mockGachaRepo) ListShop() ([]Gacha, error) { return m.gachas, m.listShopErr } +func (m *mockGachaRepo) GetShopType(_ uint32) (int, error) { return m.shopType, nil } func (m *mockGachaRepo) GetAllEntries(_ uint32) ([]GachaEntry, error) { return m.allEntries, m.allEntriesErr } @@ -917,11 +962,11 @@ type mockUserRepoGacha struct { mockUserRepoForItems gachaFP, gachaGP, gachaGT uint32 - trialCoins uint16 - deductTrialErr error - deductPremiumErr error - deductFPErr error - addFPFromGachaErr error + trialCoins uint16 + deductTrialErr error + deductPremiumErr error + deductFPErr error + addFPFromGachaErr error fpDeductBalance uint32 fpDeductErr error @@ -952,4 +997,4 @@ func (m *mockUserRepoGacha) AdjustFrontierPointsCredit(_ uint32, _ int) (uint32, return m.fpCreditBalance, m.fpCreditErr } func (m *mockUserRepoGacha) SetLastCharacter(_ uint32, _ uint32) error { return m.setLastCharErr } -func (m *mockUserRepoGacha) GetRights(_ uint32) (uint32, error) { return m.rights, m.rightsErr } +func (m *mockUserRepoGacha) GetRights(_ uint32) (uint32, error) { return m.rights, m.rightsErr } diff --git a/server/channelserver/savedata_lifecycle_monitoring_test.go b/server/channelserver/savedata_lifecycle_monitoring_test.go index bb6614e48..a6af41610 100644 --- a/server/channelserver/savedata_lifecycle_monitoring_test.go +++ b/server/channelserver/savedata_lifecycle_monitoring_test.go @@ -25,19 +25,19 @@ import ( // SaveHandlerMonitor tracks calls to save handlers type SaveHandlerMonitor struct { - mu sync.Mutex - savedataCallCount int - hunterNaviCallCount int - kouryouPointCallCount int - warehouseCallCount int - decomysetCallCount int - savedataAtLogout bool - lastSavedataTime time.Time - lastHunterNaviTime time.Time - lastKouryouPointTime time.Time - lastWarehouseTime time.Time - lastDecomysetTime time.Time - logoutTime time.Time + mu sync.Mutex + savedataCallCount int + hunterNaviCallCount int + kouryouPointCallCount int + warehouseCallCount int + decomysetCallCount int + savedataAtLogout bool + lastSavedataTime time.Time + lastHunterNaviTime time.Time + lastKouryouPointTime time.Time + lastWarehouseTime time.Time + lastDecomysetTime time.Time + logoutTime time.Time } func (m *SaveHandlerMonitor) RecordSavedata() { @@ -79,7 +79,7 @@ func (m *SaveHandlerMonitor) RecordLogout() { m.mu.Lock() defer m.mu.Unlock() m.logoutTime = time.Now() - + // Check if savedata was called within 5 seconds before logout if !m.lastSavedataTime.IsZero() && m.logoutTime.Sub(m.lastSavedataTime) < 5*time.Second { m.savedataAtLogout = true @@ -89,7 +89,7 @@ func (m *SaveHandlerMonitor) RecordLogout() { func (m *SaveHandlerMonitor) GetStats() string { m.mu.Lock() defer m.mu.Unlock() - + return fmt.Sprintf(`Save Handler Statistics: - Savedata calls: %d (last: %v) - HunterNavi calls: %d (last: %v) @@ -385,7 +385,7 @@ func TestSequential_RepeatedLogoutLoginCycles(t *testing.T) { // Verify data after each cycle var savedCompressed []byte _ = db.QueryRow("SELECT savedata FROM characters WHERE id = $1", charID).Scan(&savedCompressed) - + if len(savedCompressed) > 0 { decompressed, err := nullcomp.Decompress(savedCompressed) if err != nil { @@ -393,7 +393,7 @@ func TestSequential_RepeatedLogoutLoginCycles(t *testing.T) { } else if len(decompressed) > 7001 { savedCycle := (int(decompressed[7000]) << 8) | int(decompressed[7001]) if savedCycle != cycle { - t.Errorf("Cycle %d: ❌ Data corruption - expected cycle %d, got %d", + t.Errorf("Cycle %d: ❌ Data corruption - expected cycle %d, got %d", cycle, cycle, savedCycle) } else { t.Logf("Cycle %d: ✓ Data correct", cycle) @@ -431,7 +431,7 @@ func TestRealtime_SaveDataTimestamps(t *testing.T) { saveData := make([]byte, 150000) copy(saveData[88:], []byte("TimestampChar\x00")) compressed, _ := nullcomp.Compress(saveData) - + savePkt := &mhfpacket.MsgMhfSavedata{ SaveType: 0, AckHandle: 11001, @@ -477,7 +477,7 @@ func TestRealtime_SaveDataTimestamps(t *testing.T) { if !lastSaveTime.IsZero() && !logoutTime.IsZero() { gap := logoutTime.Sub(lastSaveTime) t.Logf("Time between last save and logout: %v", gap.Round(time.Millisecond)) - + if gap > 50*time.Millisecond { t.Log("⚠️ Significant gap between last save and logout") t.Log("Player changes after last save would be LOST") @@ -498,4 +498,3 @@ func containsAny(s string, substrs []string) bool { } return false } - diff --git a/server/channelserver/session_lifecycle_integration_test.go b/server/channelserver/session_lifecycle_integration_test.go index bfe1d36cb..f00f6864f 100644 --- a/server/channelserver/session_lifecycle_integration_test.go +++ b/server/channelserver/session_lifecycle_integration_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - cfg "erupe-ce/config" "erupe-ce/common/mhfitem" + cfg "erupe-ce/config" "erupe-ce/network/clientctx" "erupe-ce/network/mhfpacket" "erupe-ce/server/channelserver/compression/nullcomp" @@ -18,9 +18,9 @@ import ( // ============================================================================ // SESSION LIFECYCLE INTEGRATION TESTS // Full end-to-end tests that simulate the complete player session lifecycle -// +// // These tests address the core issue: handler-level tests don't catch problems -// with the logout flow. Players report data loss because logout doesn't +// with the logout flow. Players report data loss because logout doesn't // trigger save handlers. // // Test Strategy: @@ -580,16 +580,16 @@ func createTestServerWithDB(t *testing.T, db *sqlx.DB) *Server { // Create minimal server for testing // Note: This may need adjustment based on actual Server initialization server := &Server{ - db: db, - sessions: make(map[net.Conn]*Session), + db: db, + sessions: make(map[net.Conn]*Session), userBinary: NewUserBinaryStore(), minidata: NewMinidataStore(), - semaphore: make(map[string]*Semaphore), + semaphore: make(map[string]*Semaphore), erupeConfig: &cfg.Config{ RealClientMode: cfg.ZZ, }, - isShuttingDown: false, - done: make(chan struct{}), + isShuttingDown: false, + done: make(chan struct{}), } // Create logger @@ -617,7 +617,7 @@ func createTestServerWithDB(t *testing.T, db *sqlx.DB) *Server { func createTestSessionForServerWithChar(server *Server, charID uint32, name string) *Session { mock := &MockCryptConn{sentPackets: make([][]byte, 0)} mockNetConn := NewMockNetConn() // Create a mock net.Conn for the session map key - + session := &Session{ logger: server.logger, server: server, @@ -638,4 +638,3 @@ func createTestSessionForServerWithChar(server *Server, charID uint32, name stri return session } - diff --git a/server/channelserver/sys_channel_server.go b/server/channelserver/sys_channel_server.go index 52b8417e3..8820edfa6 100644 --- a/server/channelserver/sys_channel_server.go +++ b/server/channelserver/sys_channel_server.go @@ -43,13 +43,13 @@ type Config struct { // own locks internally and may be acquired at any point. type Server struct { sync.Mutex - Registry ChannelRegistry - ID uint16 - GlobalID string - IP string - Port uint16 - logger *zap.Logger - db *sqlx.DB + Registry ChannelRegistry + ID uint16 + GlobalID string + IP string + Port uint16 + logger *zap.Logger + db *sqlx.DB charRepo CharacterRepo guildRepo GuildRepo userRepo UserRepo @@ -71,13 +71,13 @@ type Server struct { miscRepo MiscRepo scenarioRepo ScenarioRepo mercenaryRepo MercenaryRepo - erupeConfig *cfg.Config - acceptConns chan net.Conn - deleteConns chan net.Conn - sessions map[net.Conn]*Session - listener net.Listener // Listener that is created when Server.Start is called. - isShuttingDown bool - done chan struct{} // Closed on Shutdown to wake background goroutines. + erupeConfig *cfg.Config + acceptConns chan net.Conn + deleteConns chan net.Conn + sessions map[net.Conn]*Session + listener net.Listener // Listener that is created when Server.Start is called. + isShuttingDown bool + done chan struct{} // Closed on Shutdown to wake background goroutines. stages StageMap @@ -107,28 +107,28 @@ type Server struct { // NewServer creates a new Server type. func NewServer(config *Config) *Server { s := &Server{ - ID: config.ID, - logger: config.Logger, - db: config.DB, - erupeConfig: config.ErupeConfig, - acceptConns: make(chan net.Conn), - deleteConns: make(chan net.Conn), - done: make(chan struct{}), - sessions: make(map[net.Conn]*Session), - userBinary: NewUserBinaryStore(), - minidata: NewMinidataStore(), - semaphore: make(map[string]*Semaphore), - semaphoreIndex: 7, - discordBot: config.DiscordBot, - name: config.Name, + ID: config.ID, + logger: config.Logger, + db: config.DB, + erupeConfig: config.ErupeConfig, + acceptConns: make(chan net.Conn), + deleteConns: make(chan net.Conn), + done: make(chan struct{}), + sessions: make(map[net.Conn]*Session), + userBinary: NewUserBinaryStore(), + minidata: NewMinidataStore(), + semaphore: make(map[string]*Semaphore), + semaphoreIndex: 7, + discordBot: config.DiscordBot, + name: config.Name, raviente: &Raviente{ id: 1, register: make([]uint32, 30), state: make([]uint32, 30), support: make([]uint32, 30), }, - questCache: NewQuestCache(config.ErupeConfig.QuestCacheExpiry), - handlerTable: buildHandlerTable(), + questCache: NewQuestCache(config.ErupeConfig.QuestCacheExpiry), + handlerTable: buildHandlerTable(), } s.charRepo = NewCharacterRepository(config.DB) diff --git a/server/channelserver/sys_channel_server_test.go b/server/channelserver/sys_channel_server_test.go index 0ac8d2210..dcb95069e 100644 --- a/server/channelserver/sys_channel_server_test.go +++ b/server/channelserver/sys_channel_server_test.go @@ -36,9 +36,11 @@ func (m *mockConn) RemoteAddr() net.Addr { return &net.TCPAddr{IP: net.ParseIP("127.0.0.1"), Port: 12345} } -func (m *mockConn) Read(b []byte) (n int, err error) { return 0, nil } -func (m *mockConn) Write(b []byte) (n int, err error) { return len(b), nil } -func (m *mockConn) LocalAddr() net.Addr { return &net.TCPAddr{IP: net.ParseIP("127.0.0.1"), Port: 54321} } +func (m *mockConn) Read(b []byte) (n int, err error) { return 0, nil } +func (m *mockConn) Write(b []byte) (n int, err error) { return len(b), nil } +func (m *mockConn) LocalAddr() net.Addr { + return &net.TCPAddr{IP: net.ParseIP("127.0.0.1"), Port: 54321} +} func (m *mockConn) SetDeadline(t time.Time) error { return nil } func (m *mockConn) SetReadDeadline(t time.Time) error { return nil } func (m *mockConn) SetWriteDeadline(t time.Time) error { return nil } @@ -53,10 +55,10 @@ func (m *mockConn) WasClosed() bool { func createTestServer() *Server { logger, _ := zap.NewDevelopment() s := &Server{ - ID: 1, - logger: logger, - sessions: make(map[net.Conn]*Session), - semaphore: make(map[string]*Semaphore), + ID: 1, + logger: logger, + sessions: make(map[net.Conn]*Session), + semaphore: make(map[string]*Semaphore), questCache: NewQuestCache(0), erupeConfig: &cfg.Config{ DebugOptions: cfg.DebugOptions{ @@ -79,15 +81,15 @@ func createTestServer() *Server { func createTestSessionForServer(server *Server, conn net.Conn, charID uint32, name string) *Session { mock := &MockCryptConn{sentPackets: make([][]byte, 0)} s := &Session{ - logger: server.logger, - server: server, - rawConn: conn, - cryptConn: mock, - sendPackets: make(chan packet, 20), + logger: server.logger, + server: server, + rawConn: conn, + cryptConn: mock, + sendPackets: make(chan packet, 20), clientContext: &clientctx.ClientContext{}, - lastPacket: time.Now(), - charID: charID, - Name: name, + lastPacket: time.Now(), + charID: charID, + Name: name, } return s } diff --git a/server/channelserver/sys_object_test.go b/server/channelserver/sys_object_test.go index 8f9fcb1a9..174d8fdf9 100644 --- a/server/channelserver/sys_object_test.go +++ b/server/channelserver/sys_object_test.go @@ -319,4 +319,3 @@ func TestStageBroadcastMHF_EmptyStage(t *testing.T) { // Should not panic with empty stage stage.BroadcastMHF(pkt, nil) } - diff --git a/server/channelserver/sys_session_test.go b/server/channelserver/sys_session_test.go index 60479820c..9a5ba7ac2 100644 --- a/server/channelserver/sys_session_test.go +++ b/server/channelserver/sys_session_test.go @@ -4,7 +4,7 @@ import ( "bytes" "encoding/binary" "io" - + cfg "erupe-ce/config" "erupe-ce/network" "sync" @@ -76,27 +76,27 @@ func createTestSession(mock network.Conn) *Session { // with their own terminators instead of being concatenated func TestPacketQueueIndividualSending(t *testing.T) { tests := []struct { - name string - packetCount int - wantPackets int + name string + packetCount int + wantPackets int wantTerminators int }{ { - name: "single_packet", - packetCount: 1, - wantPackets: 1, + name: "single_packet", + packetCount: 1, + wantPackets: 1, wantTerminators: 1, }, { - name: "multiple_packets", - packetCount: 5, - wantPackets: 5, + name: "multiple_packets", + packetCount: 5, + wantPackets: 5, wantTerminators: 5, }, { - name: "many_packets", - packetCount: 20, - wantPackets: 20, + name: "many_packets", + packetCount: 20, + wantPackets: 20, wantTerminators: 20, }, } diff --git a/server/channelserver/sys_stage_test.go b/server/channelserver/sys_stage_test.go index be34a292c..41ca36902 100644 --- a/server/channelserver/sys_stage_test.go +++ b/server/channelserver/sys_stage_test.go @@ -287,4 +287,3 @@ func TestStageNewMaxPlayers(t *testing.T) { t.Errorf("initial maxPlayers = %d, want 127", stage.maxPlayers) } } - diff --git a/server/channelserver/sys_time.go b/server/channelserver/sys_time.go index 1520db47a..b3a3bf3eb 100644 --- a/server/channelserver/sys_time.go +++ b/server/channelserver/sys_time.go @@ -10,9 +10,9 @@ import ( // convenient access to adjusted server time, daily/weekly boundaries, and the // absolute game timestamp used by the MHF client. -func TimeAdjusted() time.Time { return gametime.Adjusted() } -func TimeMidnight() time.Time { return gametime.Midnight() } -func TimeWeekStart() time.Time { return gametime.WeekStart() } -func TimeWeekNext() time.Time { return gametime.WeekNext() } -func TimeMonthStart() time.Time { return gametime.MonthStart() } -func TimeGameAbsolute() uint32 { return gametime.GameAbsolute() } +func TimeAdjusted() time.Time { return gametime.Adjusted() } +func TimeMidnight() time.Time { return gametime.Midnight() } +func TimeWeekStart() time.Time { return gametime.WeekStart() } +func TimeWeekNext() time.Time { return gametime.WeekNext() } +func TimeMonthStart() time.Time { return gametime.MonthStart() } +func TimeGameAbsolute() uint32 { return gametime.GameAbsolute() } diff --git a/server/channelserver/test_helpers_test.go b/server/channelserver/test_helpers_test.go index cdb6e2a09..b6a284459 100644 --- a/server/channelserver/test_helpers_test.go +++ b/server/channelserver/test_helpers_test.go @@ -38,8 +38,8 @@ func (m *mockPacket) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext func createMockServer() *Server { logger, _ := zap.NewDevelopment() s := &Server{ - logger: logger, - erupeConfig: &cfg.Config{}, + logger: logger, + erupeConfig: &cfg.Config{}, // stages is a StageMap (zero value is ready to use) sessions: make(map[net.Conn]*Session), handlerTable: buildHandlerTable(), diff --git a/server/discordbot/discord_bot.go b/server/discordbot/discord_bot.go index d1992edfa..5dca4731c 100644 --- a/server/discordbot/discord_bot.go +++ b/server/discordbot/discord_bot.go @@ -124,6 +124,7 @@ func (bot *DiscordBot) RealtimeChannelSend(message string) (err error) { return } + // ReplaceTextAll replaces every match of regex in text by calling handler with // the first capture group of each match and substituting the result. func ReplaceTextAll(text string, regex *regexp.Regexp, handler func(input string) string) string { diff --git a/server/discordbot/discord_bot_test.go b/server/discordbot/discord_bot_test.go index 7a5e55652..200e4f178 100644 --- a/server/discordbot/discord_bot_test.go +++ b/server/discordbot/discord_bot_test.go @@ -229,8 +229,8 @@ func TestNormalizeDiscordMessage_Integration(t *testing.T) { contains: []string{"Hello", ":smile:"}, }, { - name: "mixed content", - input: "<@123456789012345678> sent :wave:", + name: "mixed content", + input: "<@123456789012345678> sent :wave:", contains: []string{"sent"}, }, } diff --git a/server/entranceserver/make_resp_test.go b/server/entranceserver/make_resp_test.go index 53192b787..c187ffb91 100644 --- a/server/entranceserver/make_resp_test.go +++ b/server/entranceserver/make_resp_test.go @@ -23,11 +23,11 @@ func TestEncodeServerInfo_EmptyClanMemberLimits(t *testing.T) { Port: 53310, Entries: []cfg.EntranceServerInfo{ { - Name: "TestServer", - Description: "Test", - IP: "127.0.0.1", - Type: 0, - Recommended: 0, + Name: "TestServer", + Description: "Test", + IP: "127.0.0.1", + Type: 0, + Recommended: 0, AllowedClientFlags: 0xFFFFFFFF, Channels: []cfg.EntranceChannelInfo{ { @@ -74,10 +74,10 @@ func TestEncodeServerInfo_EmptyClanMemberLimits(t *testing.T) { func TestClanMemberLimitsBoundsChecking(t *testing.T) { // Test the bounds checking logic directly testCases := []struct { - name string - clanMemberLimits [][]uint8 - expectedValue uint8 - expectDefault bool + name string + clanMemberLimits [][]uint8 + expectedValue uint8 + expectDefault bool }{ {"empty array", [][]uint8{}, 60, true}, {"single row with 2 columns", [][]uint8{{1, 50}}, 50, false}, @@ -112,7 +112,6 @@ func TestClanMemberLimitsBoundsChecking(t *testing.T) { } } - // TestEncodeServerInfo_WithMockRepo tests encodeServerInfo with a mock server repo func TestEncodeServerInfo_WithMockRepo(t *testing.T) { config := &cfg.Config{ @@ -123,11 +122,11 @@ func TestEncodeServerInfo_WithMockRepo(t *testing.T) { Port: 53310, Entries: []cfg.EntranceServerInfo{ { - Name: "TestServer", - Description: "Test", - IP: "127.0.0.1", - Type: 0, - Recommended: 0, + Name: "TestServer", + Description: "Test", + IP: "127.0.0.1", + Type: 0, + Recommended: 0, AllowedClientFlags: 0xFFFFFFFF, Channels: []cfg.EntranceChannelInfo{ { @@ -218,11 +217,11 @@ func TestEncodeServerInfo_MissingSecondColumnClanMemberLimits(t *testing.T) { Port: 53310, Entries: []cfg.EntranceServerInfo{ { - Name: "TestServer", - Description: "Test", - IP: "127.0.0.1", - Type: 0, - Recommended: 0, + Name: "TestServer", + Description: "Test", + IP: "127.0.0.1", + Type: 0, + Recommended: 0, AllowedClientFlags: 0xFFFFFFFF, Channels: []cfg.EntranceChannelInfo{ { diff --git a/server/signserver/dsgn_resp.go b/server/signserver/dsgn_resp.go index 686ec0eab..9f9ae3b12 100644 --- a/server/signserver/dsgn_resp.go +++ b/server/signserver/dsgn_resp.go @@ -2,10 +2,10 @@ package signserver import ( "erupe-ce/common/byteframe" + "erupe-ce/common/gametime" ps "erupe-ce/common/pascalstring" "erupe-ce/common/stringsupport" cfg "erupe-ce/config" - "erupe-ce/common/gametime" "fmt" "strings" "time"