From ee1dfdc9d94c737193d27202792cf858ce8b738f Mon Sep 17 00:00:00 2001 From: Xian55 <367101+Xian55@users.noreply.github.com> Date: Sun, 12 Jan 2025 15:36:35 +0100 Subject: [PATCH] Solution: Apply code cleanup --- Benchmarks/ClassProfile/LoadAllProfiles.cs | 8 ------- .../PPather_Utils_PointDistanceToSegment.cs | 1 - ...irementFactory_CreateTargetCastingSpell.cs | 4 ++-- BlazorServer/Program.cs | 13 +++++------ Core/Actionbar/ActionBarCooldownReader.cs | 2 +- Core/Actionbar/ActionBarCostReader.cs | 8 +++---- Core/Actionbar/ActionBarPopulator.cs | 6 ++--- Core/Addon/AddonConfig.cs | 6 +++-- Core/Addon/PlayerReader.cs | 8 +++---- Core/Addon/SpellBookReader.cs | 8 ++++--- Core/AddonComponent/SchoolMask.cs | 4 ++-- Core/AddonComponent/UnitClassification.cs | 4 ++-- Core/AddonDataProvider/IAddonDataProvider.cs | 10 ++++---- Core/Bag/BagChangeTracker.cs | 4 ++-- Core/Bag/BagItem.cs | 4 ++-- Core/BotController.cs | 20 ++++++++++------ Core/Chat/ChatReader.cs | 6 ++--- Core/ClassConfig/KeyAction.cs | 5 ++-- Core/ClassConfig/KeyActions.cs | 1 + Core/ClassConfig/KeyReader.cs | 1 + Core/ConfigBotController.cs | 7 ++++-- Core/Configurator/AddonConfigurator.cs | 11 +++++---- Core/Cursor/ImageHashing.cs | 2 +- Core/DataFrame/DataFrameConfig.cs | 4 ++-- Core/DataFrame/DataFrameMeta.cs | 6 +++-- Core/Database/AreaDB.cs | 10 ++++---- Core/Database/CreatureDB.cs | 6 ++--- Core/Database/ItemDB.cs | 8 +++---- Core/Database/SpellDB.cs | 6 ++--- Core/Database/TalentDB.cs | 6 ++--- Core/DependencyInjection.cs | 11 +++++---- Core/Environment/FrontendUpdate.cs | 4 ++-- Core/Equipments/EquipmentReader.cs | 6 ++--- Core/ExecGameCommand/ExecGameCommand.cs | 4 +++- Core/Extensions/ServiceCollectionExtension.cs | 4 ++-- Core/GOAP/GoapAgent.cs | 12 ++++++---- Core/GOAP/GoapPlanner.cs | 4 ++-- Core/Goals/AdhocGoal.cs | 1 + Core/Goals/AdhocNPCGoal.cs | 16 ++++++++----- Core/Goals/ApproachTargetGoal.cs | 1 - Core/Goals/BlacklistTargetGoal.cs | 4 +--- Core/Goals/CombatGoal.cs | 1 - Core/Goals/ConsumeCorpseGoal.cs | 5 ++-- Core/Goals/CorpseConsumedGoal.cs | 6 ++--- Core/Goals/FleeGoal.cs | 2 -- Core/Goals/FollowRouteGoal.cs | 11 +++++---- Core/Goals/LootGoal.cs | 16 ++++++++----- Core/Goals/ParallelGoal.cs | 3 ++- Core/Goals/PullTargetGoal.cs | 1 - Core/Goals/SkinningGoal.cs | 5 +++- Core/Goals/TargetLastDeadGoal.cs | 1 + Core/Goals/WaitForGatheringGoal.cs | 4 +++- Core/Goals/WalkToCorpseGoal.cs | 2 ++ Core/GoalsComponent/Blacklist/Blacklist.cs | 3 +-- Core/GoalsComponent/CastingHandler.cs | 4 ++-- .../CastingHandlerInterruptWatchdog.cs | 8 +++---- Core/GoalsComponent/DruidMountHandler.cs | 6 ++--- Core/GoalsComponent/MountHandler.cs | 5 ++-- Core/GoalsComponent/Navigation.cs | 14 ++++++----- Core/GoalsComponent/NpcNameTargeting.cs | 16 ++++++++----- .../NpcNameTargetingLocations.cs | 3 ++- Core/GoalsComponent/PlayerDirection.cs | 12 ++++++---- Core/GoalsComponent/ReactCastError.cs | 3 ++- Core/GoalsComponent/StopMoving.cs | 9 +++++--- Core/GoalsComponent/TargetFinder.cs | 3 ++- Core/GoalsFactory/GoalFactory.cs | 17 ++++++++------ Core/IBotController.cs | 1 + Core/Input/ConfigurableInput.cs | 7 +++--- Core/Minimap/MinimapNodeFinder.cs | 8 +++---- Core/Minimap/MinimapRowOperation.cs | 10 ++++---- Core/Overlay/NpcNameOverlay.cs | 6 ++--- Core/PPather/Client/AnTcpClient.cs | 1 + Core/PPather/IPPather.cs | 3 ++- Core/PPather/IPathVizualizer.cs | 6 ++--- Core/PPather/LocalPathingApi.cs | 10 ++++---- Core/PPather/NoPathVisualizer.cs | 6 ++--- Core/PPather/RemotePathingAPI.cs | 19 ++++++++------- Core/PPather/RemotePathingAPIV3.cs | 20 +++++++++------- Core/Path/DirectionCalculator.cs | 3 +-- Core/Path/IRouteReceiver.cs | 3 +-- Core/Path/RouteInfo.cs | 10 ++++---- Core/PathDrawer/PathDrawer.cs | 11 ++++----- Core/Requirement/RequirementFactory.cs | 19 ++++++++------- Core/ScreenCapture/ScreenCapture.cs | 10 ++++---- Core/ScreenCapture/ScreenCaptureCleaner.cs | 6 ++--- Core/Session/ExperienceProvider.cs | 4 ++-- Core/Session/GrindSession.cs | 4 ++-- Core/Session/LocalGrindSessionDAO.cs | 3 +-- Core/Talents/TalentReader.cs | 5 ++-- Core/WoWScreen/WowScreenDXGI.cs | 2 +- Core/WowheadAPI/WApi.cs | 6 ++--- CoreTests/Input/Test_Input.cs | 9 +++++--- .../Test_MinimapNodeFinder.cs | 8 +++---- CoreTests/NpcNameFinder/MockWoWProcess.cs | 7 +++--- .../NpcNameFinder/MockWowProcessInput.cs | 7 +++--- CoreTests/NpcNameFinder/Test_NpcNameFinder.cs | 17 ++++++++------ CoreTests/Program.cs | 23 +++++++++++-------- DataConfig/DataConfig.cs | 9 ++++---- Game/Input/IMouseInput.cs | 1 + Game/Input/InputSimulator.cs | 10 +++++--- Game/Input/InputWindowsNative.cs | 7 ++++-- Game/WoWProcess/WowProcess.cs | 8 +++---- Game/WoWScreen/IWowScreen.cs | 4 ++-- HeadlessServer/Program.cs | 3 +-- PPather/Extensions/BinaryReaderExtensions.cs | 1 - PPather/Graph/GraphChunk.cs | 10 ++++---- PPather/Graph/PathGraph.cs | 17 ++++++++------ PPather/Graph/Spot.cs | 4 ++-- PPather/Search/MeshFactory.cs | 7 +++--- PPather/Search/PPatherService.cs | 17 ++++++++------ PPather/Search/Search.cs | 6 +++-- PPather/StormDll/ArchiveSet.cs | 5 ++-- .../Triangles/ChunkedTriangleCollection.cs | 14 +++++++---- PPather/Triangles/MPQTriangleSupplier.cs | 16 +++++++------ PPather/Triangles/TriangleCollection.cs | 12 +++++----- PPather/Triangles/Utils.cs | 1 - PPather/Triangles/WmoFile.cs | 22 ++++++++++-------- PathingAPI/Controllers/PPatherController.cs | 14 +++++------ .../ComponentWithCancellationToken.cs | 3 ++- PathingAPI/PathingAPILoggerSink.cs | 6 ++--- PathingAPI/RateLimit/RateLimitFilter.cs | 3 ++- PathingAPI/Startup.cs | 8 +++---- SharedLib/Converters/Vector3Converter.cs | 4 ++-- SharedLib/Converters/Vector4Converter.cs | 4 ++-- SharedLib/Data/WorldMapAreaDB.cs | 6 ++--- SharedLib/NpcFinder/LineSegmentOperation.cs | 8 +++---- SharedLib/NpcFinder/NpcNameFinder.cs | 14 ++++++----- SharedLib/NpcFinder/NpcPositionComparer.cs | 6 ++--- WinAPI/NativeMethods.cs | 3 ++- WowheadDB/Herb/Node.cs | 8 ++++--- WowheadDB/NPC/NPC.cs | 8 ++++--- 131 files changed, 522 insertions(+), 417 deletions(-) diff --git a/Benchmarks/ClassProfile/LoadAllProfiles.cs b/Benchmarks/ClassProfile/LoadAllProfiles.cs index 9bd6f825f..68c80d76f 100644 --- a/Benchmarks/ClassProfile/LoadAllProfiles.cs +++ b/Benchmarks/ClassProfile/LoadAllProfiles.cs @@ -1,13 +1,5 @@ using BenchmarkDotNet.Attributes; -using HeadlessServer; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - using WinAPI; namespace Benchmarks.ClassProfile; diff --git a/Benchmarks/PPather/PPather_Utils_PointDistanceToSegment.cs b/Benchmarks/PPather/PPather_Utils_PointDistanceToSegment.cs index 19b9bff26..0cf9bba72 100644 --- a/Benchmarks/PPather/PPather_Utils_PointDistanceToSegment.cs +++ b/Benchmarks/PPather/PPather_Utils_PointDistanceToSegment.cs @@ -3,7 +3,6 @@ using System.Numerics; using System.Runtime.CompilerServices; -using static System.MathF; using static System.Numerics.Vector3; namespace Benchmarks.PPather; diff --git a/Benchmarks/Requirement/Core_RequirementFactory_CreateTargetCastingSpell.cs b/Benchmarks/Requirement/Core_RequirementFactory_CreateTargetCastingSpell.cs index d8746cf11..56a4f3540 100644 --- a/Benchmarks/Requirement/Core_RequirementFactory_CreateTargetCastingSpell.cs +++ b/Benchmarks/Requirement/Core_RequirementFactory_CreateTargetCastingSpell.cs @@ -1,6 +1,6 @@ -using System.Runtime.CompilerServices; +using BenchmarkDotNet.Attributes; -using BenchmarkDotNet.Attributes; +using System.Runtime.CompilerServices; namespace Requirement; diff --git a/BlazorServer/Program.cs b/BlazorServer/Program.cs index 6dbfbd6f5..d40cd3126 100644 --- a/BlazorServer/Program.cs +++ b/BlazorServer/Program.cs @@ -1,23 +1,22 @@ -using System; -using System.Threading; - using Core; using Frontend; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Serilog; -using Serilog.Events; -using Serilog.Templates.Themes; using Serilog.Templates; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.FileProviders; +using Serilog.Templates.Themes; + +using System; using System.IO; +using System.Threading; namespace BlazorServer; diff --git a/Core/Actionbar/ActionBarCooldownReader.cs b/Core/Actionbar/ActionBarCooldownReader.cs index e074dd6b2..12753e93a 100644 --- a/Core/Actionbar/ActionBarCooldownReader.cs +++ b/Core/Actionbar/ActionBarCooldownReader.cs @@ -1,8 +1,8 @@ using System; using static Core.ActionBar; -using static System.Math; using static System.DateTime; +using static System.Math; namespace Core; diff --git a/Core/Actionbar/ActionBarCostReader.cs b/Core/Actionbar/ActionBarCostReader.cs index 234da6d56..7c9535f46 100644 --- a/Core/Actionbar/ActionBarCostReader.cs +++ b/Core/Actionbar/ActionBarCostReader.cs @@ -1,10 +1,10 @@ -using System; +using Microsoft.Extensions.Logging; -using static Core.ActionBar; - -using Microsoft.Extensions.Logging; +using System; using System.Runtime.CompilerServices; +using static Core.ActionBar; + namespace Core; #pragma warning disable CS0162 diff --git a/Core/Actionbar/ActionBarPopulator.cs b/Core/Actionbar/ActionBarPopulator.cs index ccce71376..5774df333 100644 --- a/Core/Actionbar/ActionBarPopulator.cs +++ b/Core/Actionbar/ActionBarPopulator.cs @@ -1,6 +1,6 @@ -using System.Collections.Generic; +using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging; +using System.Collections.Generic; namespace Core; @@ -124,7 +124,7 @@ private static bool ScriptBuilder(ActionBarSlotItem abs, out string content) string func = GetFunction(abs); int slot = abs.KeyAction.SlotIndex + 1; content = $"/run {func}({nameOrId})PlaceAction({slot})ClearCursor()--"; - + return true; } diff --git a/Core/Addon/AddonConfig.cs b/Core/Addon/AddonConfig.cs index 372cd0ae4..cccd1c8b3 100644 --- a/Core/Addon/AddonConfig.cs +++ b/Core/Addon/AddonConfig.cs @@ -1,6 +1,8 @@ -using System.IO; +using Newtonsoft.Json; + +using System.IO; + using static Newtonsoft.Json.JsonConvert; -using Newtonsoft.Json; namespace Core; diff --git a/Core/Addon/PlayerReader.cs b/Core/Addon/PlayerReader.cs index c25719f66..fee39fc66 100644 --- a/Core/Addon/PlayerReader.cs +++ b/Core/Addon/PlayerReader.cs @@ -1,11 +1,11 @@ -using System.Collections.Specialized; -using System.Numerics; - -using Core.AddonComponent; +using Core.AddonComponent; using Core.Database; using SharedLib; +using System.Collections.Specialized; +using System.Numerics; + namespace Core; public sealed partial class PlayerReader : IMouseOverReader, IReader diff --git a/Core/Addon/SpellBookReader.cs b/Core/Addon/SpellBookReader.cs index 14fd57cc9..cf1298483 100644 --- a/Core/Addon/SpellBookReader.cs +++ b/Core/Addon/SpellBookReader.cs @@ -1,8 +1,10 @@ -using System.Collections.Generic; -using System; -using Core.Database; +using Core.Database; + using SharedLib; +using System; +using System.Collections.Generic; + namespace Core; public sealed class SpellBookReader : IReader diff --git a/Core/AddonComponent/SchoolMask.cs b/Core/AddonComponent/SchoolMask.cs index 5fbd75cd8..8c814cfee 100644 --- a/Core/AddonComponent/SchoolMask.cs +++ b/Core/AddonComponent/SchoolMask.cs @@ -1,6 +1,6 @@ -using System; +using Newtonsoft.Json; -using Newtonsoft.Json; +using System; namespace Core; diff --git a/Core/AddonComponent/UnitClassification.cs b/Core/AddonComponent/UnitClassification.cs index 454711d41..a9ba44997 100644 --- a/Core/AddonComponent/UnitClassification.cs +++ b/Core/AddonComponent/UnitClassification.cs @@ -1,6 +1,6 @@ -using System; +using Newtonsoft.Json; -using Newtonsoft.Json; +using System; namespace Core; diff --git a/Core/AddonDataProvider/IAddonDataProvider.cs b/Core/AddonDataProvider/IAddonDataProvider.cs index 43328f527..b6d828d6f 100644 --- a/Core/AddonDataProvider/IAddonDataProvider.cs +++ b/Core/AddonDataProvider/IAddonDataProvider.cs @@ -1,10 +1,10 @@ -using System; +using SixLabors.ImageSharp; +using SixLabors.ImageSharp.Advanced; +using SixLabors.ImageSharp.PixelFormats; -using System.Text; +using System; using System.Runtime.CompilerServices; -using SixLabors.ImageSharp.PixelFormats; -using SixLabors.ImageSharp.Advanced; -using SixLabors.ImageSharp; +using System.Text; namespace Core; diff --git a/Core/Bag/BagChangeTracker.cs b/Core/Bag/BagChangeTracker.cs index e331ee35f..50a7a8d52 100644 --- a/Core/Bag/BagChangeTracker.cs +++ b/Core/Bag/BagChangeTracker.cs @@ -1,6 +1,6 @@ -using System; +using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging; +using System; namespace Core; diff --git a/Core/Bag/BagItem.cs b/Core/Bag/BagItem.cs index 6e2276aaa..afafa85b2 100644 --- a/Core/Bag/BagItem.cs +++ b/Core/Bag/BagItem.cs @@ -1,6 +1,6 @@ -using System; +using SharedLib; -using SharedLib; +using System; namespace Core; diff --git a/Core/BotController.cs b/Core/BotController.cs index 366f9cab0..cea7b33f7 100644 --- a/Core/BotController.cs +++ b/Core/BotController.cs @@ -1,22 +1,28 @@ using Core.Goals; using Core.GOAP; -using Microsoft.Extensions.Options; -using Microsoft.Extensions.Logging; + +using Game; + using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; + +using PPather.Data; + +using SharedLib; +using SharedLib.NpcFinder; + using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Numerics; using System.Threading; -using Game; -using PPather.Data; + using WinAPI; -using SharedLib.NpcFinder; -using SharedLib; -using static System.Diagnostics.Stopwatch; using static Newtonsoft.Json.JsonConvert; +using static System.Diagnostics.Stopwatch; namespace Core; diff --git a/Core/Chat/ChatReader.cs b/Core/Chat/ChatReader.cs index 8a28d07c4..80e477013 100644 --- a/Core/Chat/ChatReader.cs +++ b/Core/Chat/ChatReader.cs @@ -1,9 +1,9 @@ -using System; +using Microsoft.Extensions.Logging; + +using System; using System.Collections.ObjectModel; using System.Text; -using Microsoft.Extensions.Logging; - namespace Core; public enum ChatMessageType diff --git a/Core/ClassConfig/KeyAction.cs b/Core/ClassConfig/KeyAction.cs index d919acd14..c8597ce54 100644 --- a/Core/ClassConfig/KeyAction.cs +++ b/Core/ClassConfig/KeyAction.cs @@ -1,12 +1,13 @@ using Core.Goals; +using Game; + using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; -using System.Numerics; using System.Collections.Specialized; -using Game; +using System.Numerics; namespace Core; diff --git a/Core/ClassConfig/KeyActions.cs b/Core/ClassConfig/KeyActions.cs index 828c39ecc..1772eb48a 100644 --- a/Core/ClassConfig/KeyActions.cs +++ b/Core/ClassConfig/KeyActions.cs @@ -1,4 +1,5 @@ using Microsoft.Extensions.Logging; + using System; namespace Core; diff --git a/Core/ClassConfig/KeyReader.cs b/Core/ClassConfig/KeyReader.cs index e0edec65d..4cae15bfa 100644 --- a/Core/ClassConfig/KeyReader.cs +++ b/Core/ClassConfig/KeyReader.cs @@ -1,4 +1,5 @@ using Microsoft.Extensions.Logging; + using System; using System.Collections.Generic; diff --git a/Core/ConfigBotController.cs b/Core/ConfigBotController.cs index 9241e87aa..a8598abc6 100644 --- a/Core/ConfigBotController.cs +++ b/Core/ConfigBotController.cs @@ -1,9 +1,12 @@ using Core.GOAP; + +using Game; + +using Microsoft.Extensions.Logging; + using System; using System.Collections.Generic; using System.Threading; -using Microsoft.Extensions.Logging; -using Game; namespace Core; diff --git a/Core/Configurator/AddonConfigurator.cs b/Core/Configurator/AddonConfigurator.cs index 53ef2086d..697a9ff4c 100644 --- a/Core/Configurator/AddonConfigurator.cs +++ b/Core/Configurator/AddonConfigurator.cs @@ -1,10 +1,13 @@ -using System.IO; +using Core.Extensions; + +using Game; + using Microsoft.Extensions.Logging; -using System.Linq; + using System; +using System.IO; +using System.Linq; using System.Text.RegularExpressions; -using Game; -using Core.Extensions; namespace Core; diff --git a/Core/Cursor/ImageHashing.cs b/Core/Cursor/ImageHashing.cs index eaeedf45e..2194f241c 100644 --- a/Core/Cursor/ImageHashing.cs +++ b/Core/Cursor/ImageHashing.cs @@ -1,8 +1,8 @@ using System; using System.Drawing; using System.Drawing.Imaging; -using System.Runtime.CompilerServices; using System.Numerics; +using System.Runtime.CompilerServices; namespace Core; diff --git a/Core/DataFrame/DataFrameConfig.cs b/Core/DataFrame/DataFrameConfig.cs index a55b92a9d..b44ceb189 100644 --- a/Core/DataFrame/DataFrameConfig.cs +++ b/Core/DataFrame/DataFrameConfig.cs @@ -1,6 +1,6 @@ -using System; +using SixLabors.ImageSharp; -using SixLabors.ImageSharp; +using System; namespace Core; diff --git a/Core/DataFrame/DataFrameMeta.cs b/Core/DataFrame/DataFrameMeta.cs index 1e1c9cc72..878514516 100644 --- a/Core/DataFrame/DataFrameMeta.cs +++ b/Core/DataFrame/DataFrameMeta.cs @@ -1,6 +1,8 @@ -using System; +using Newtonsoft.Json; + using SixLabors.ImageSharp; -using Newtonsoft.Json; + +using System; namespace Core; diff --git a/Core/Database/AreaDB.cs b/Core/Database/AreaDB.cs index 4ec7eafeb..165396fb5 100644 --- a/Core/Database/AreaDB.cs +++ b/Core/Database/AreaDB.cs @@ -1,13 +1,13 @@ -using System; -using System.Numerics; -using System.Threading; - -using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging; using Newtonsoft.Json; using SharedLib.Extensions; +using System; +using System.Numerics; +using System.Threading; + using WowheadDB; using static System.IO.File; diff --git a/Core/Database/CreatureDB.cs b/Core/Database/CreatureDB.cs index 0d6074289..9d033796a 100644 --- a/Core/Database/CreatureDB.cs +++ b/Core/Database/CreatureDB.cs @@ -1,10 +1,10 @@ -using System.Collections.Frozen; +using SharedLib; -using SharedLib; +using System.Collections.Frozen; +using static Newtonsoft.Json.JsonConvert; using static System.IO.File; using static System.IO.Path; -using static Newtonsoft.Json.JsonConvert; namespace Core.Database; diff --git a/Core/Database/ItemDB.cs b/Core/Database/ItemDB.cs index da36d1448..20b6f0445 100644 --- a/Core/Database/ItemDB.cs +++ b/Core/Database/ItemDB.cs @@ -1,11 +1,11 @@ -using System.Collections.Frozen; -using System.Collections.Generic; +using SharedLib; -using SharedLib; +using System.Collections.Frozen; +using System.Collections.Generic; +using static Newtonsoft.Json.JsonConvert; using static System.IO.File; using static System.IO.Path; -using static Newtonsoft.Json.JsonConvert; namespace Core.Database; diff --git a/Core/Database/SpellDB.cs b/Core/Database/SpellDB.cs index e7907d229..dd2cac6ce 100644 --- a/Core/Database/SpellDB.cs +++ b/Core/Database/SpellDB.cs @@ -1,10 +1,10 @@ -using System.Collections.Frozen; +using SharedLib; -using SharedLib; +using System.Collections.Frozen; +using static Newtonsoft.Json.JsonConvert; using static System.IO.File; using static System.IO.Path; -using static Newtonsoft.Json.JsonConvert; namespace Core.Database; diff --git a/Core/Database/TalentDB.cs b/Core/Database/TalentDB.cs index 6b6948d07..a907c4a2f 100644 --- a/Core/Database/TalentDB.cs +++ b/Core/Database/TalentDB.cs @@ -1,12 +1,12 @@ using Core.Talents; -using System; - using SharedLib; +using System; + +using static Newtonsoft.Json.JsonConvert; using static System.IO.File; using static System.IO.Path; -using static Newtonsoft.Json.JsonConvert; namespace Core.Database; diff --git a/Core/DependencyInjection.cs b/Core/DependencyInjection.cs index f1017ecbf..c4c21ecef 100644 --- a/Core/DependencyInjection.cs +++ b/Core/DependencyInjection.cs @@ -1,8 +1,4 @@ -using System; -using SixLabors.ImageSharp; -using System.Threading; - -using Core.Addon; +using Core.Addon; using Core.Database; using Core.Extensions; using Core.Goals; @@ -19,6 +15,11 @@ using SharedLib; using SharedLib.NpcFinder; +using SixLabors.ImageSharp; + +using System; +using System.Threading; + using WinAPI; namespace Core; diff --git a/Core/Environment/FrontendUpdate.cs b/Core/Environment/FrontendUpdate.cs index a6ae62f52..fc3f741a2 100644 --- a/Core/Environment/FrontendUpdate.cs +++ b/Core/Environment/FrontendUpdate.cs @@ -1,6 +1,6 @@ -using System.Threading; +using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging; +using System.Threading; namespace Core; diff --git a/Core/Equipments/EquipmentReader.cs b/Core/Equipments/EquipmentReader.cs index 5cab41e6e..f24c9ce29 100644 --- a/Core/Equipments/EquipmentReader.cs +++ b/Core/Equipments/EquipmentReader.cs @@ -1,9 +1,9 @@ -using System; - -using Core.Database; +using Core.Database; using SharedLib; +using System; + namespace Core; public sealed class EquipmentReader : IReader diff --git a/Core/ExecGameCommand/ExecGameCommand.cs b/Core/ExecGameCommand/ExecGameCommand.cs index 7a9c9e653..f0549a41a 100644 --- a/Core/ExecGameCommand/ExecGameCommand.cs +++ b/Core/ExecGameCommand/ExecGameCommand.cs @@ -1,7 +1,9 @@ using Game; + +using Microsoft.Extensions.Logging; + using System; using System.Threading; -using Microsoft.Extensions.Logging; namespace Core; diff --git a/Core/Extensions/ServiceCollectionExtension.cs b/Core/Extensions/ServiceCollectionExtension.cs index 0bbd72023..f7ae2b632 100644 --- a/Core/Extensions/ServiceCollectionExtension.cs +++ b/Core/Extensions/ServiceCollectionExtension.cs @@ -1,6 +1,6 @@ -using System; +using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.DependencyInjection; +using System; namespace Core.Extensions; public static class ServiceCollectionExtension diff --git a/Core/GOAP/GoapAgent.cs b/Core/GOAP/GoapAgent.cs index 112158cb8..826d399fa 100644 --- a/Core/GOAP/GoapAgent.cs +++ b/Core/GOAP/GoapAgent.cs @@ -1,15 +1,19 @@ using Core.Goals; +using Core.Session; + using Game; + using Microsoft.Extensions.Logging; + +using SharedLib; using SharedLib.Extensions; + using System; -using System.Threading; using System.Collections.Generic; +using System.Collections.Specialized; using System.Linq; -using Core.Session; using System.Numerics; -using System.Collections.Specialized; -using SharedLib; +using System.Threading; namespace Core.GOAP; diff --git a/Core/GOAP/GoapPlanner.cs b/Core/GOAP/GoapPlanner.cs index 9f99ad619..c65eb8f1a 100644 --- a/Core/GOAP/GoapPlanner.cs +++ b/Core/GOAP/GoapPlanner.cs @@ -1,7 +1,7 @@ using Core.Goals; -using System.Collections.Generic; -using System.Linq; + using System; +using System.Collections.Generic; using System.Collections.Specialized; namespace Core.GOAP; diff --git a/Core/Goals/AdhocGoal.cs b/Core/Goals/AdhocGoal.cs index 903c92033..07d0be73d 100644 --- a/Core/Goals/AdhocGoal.cs +++ b/Core/Goals/AdhocGoal.cs @@ -1,4 +1,5 @@ using Core.GOAP; + using Microsoft.Extensions.Logging; namespace Core.Goals; diff --git a/Core/Goals/AdhocNPCGoal.cs b/Core/Goals/AdhocNPCGoal.cs index c310eeb2f..a5f13e80c 100644 --- a/Core/Goals/AdhocNPCGoal.cs +++ b/Core/Goals/AdhocNPCGoal.cs @@ -1,13 +1,17 @@ -using Core.GOAP; -using SharedLib.NpcFinder; +using Core.Database; +using Core.GOAP; + +using Game; + using Microsoft.Extensions.Logging; + +using SharedLib.Extensions; +using SharedLib.NpcFinder; + using System; -using System.Numerics; using System.Linq; +using System.Numerics; using System.Threading; -using SharedLib.Extensions; -using Game; -using Core.Database; #pragma warning disable 162 diff --git a/Core/Goals/ApproachTargetGoal.cs b/Core/Goals/ApproachTargetGoal.cs index 304cb92f6..1744d8e66 100644 --- a/Core/Goals/ApproachTargetGoal.cs +++ b/Core/Goals/ApproachTargetGoal.cs @@ -1,7 +1,6 @@ using Core.AddonComponent; using Core.GOAP; -using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using System; diff --git a/Core/Goals/BlacklistTargetGoal.cs b/Core/Goals/BlacklistTargetGoal.cs index b948c0194..7c76ab20d 100644 --- a/Core/Goals/BlacklistTargetGoal.cs +++ b/Core/Goals/BlacklistTargetGoal.cs @@ -1,6 +1,4 @@ -using Microsoft.Extensions.DependencyInjection; - -namespace Core.Goals; +namespace Core.Goals; public sealed class BlacklistTargetGoal : GoapGoal { diff --git a/Core/Goals/CombatGoal.cs b/Core/Goals/CombatGoal.cs index 2b9bcc52e..c6f0ba46e 100644 --- a/Core/Goals/CombatGoal.cs +++ b/Core/Goals/CombatGoal.cs @@ -3,7 +3,6 @@ using Microsoft.Extensions.Logging; using System; -using System.Collections.Generic; using System.Numerics; namespace Core.Goals; diff --git a/Core/Goals/ConsumeCorpseGoal.cs b/Core/Goals/ConsumeCorpseGoal.cs index d80df9b61..566927bc6 100644 --- a/Core/Goals/ConsumeCorpseGoal.cs +++ b/Core/Goals/ConsumeCorpseGoal.cs @@ -1,5 +1,6 @@ -using Microsoft.Extensions.Logging; -using Core.GOAP; +using Core.GOAP; + +using Microsoft.Extensions.Logging; namespace Core.Goals; diff --git a/Core/Goals/CorpseConsumedGoal.cs b/Core/Goals/CorpseConsumedGoal.cs index ff39e82ab..7d0ca125e 100644 --- a/Core/Goals/CorpseConsumedGoal.cs +++ b/Core/Goals/CorpseConsumedGoal.cs @@ -1,9 +1,9 @@ -using System; - -using Core.GOAP; +using Core.GOAP; using Microsoft.Extensions.Logging; +using System; + namespace Core.Goals; public sealed partial class CorpseConsumedGoal : GoapGoal diff --git a/Core/Goals/FleeGoal.cs b/Core/Goals/FleeGoal.cs index 0097df7ed..4c8596dc2 100644 --- a/Core/Goals/FleeGoal.cs +++ b/Core/Goals/FleeGoal.cs @@ -2,8 +2,6 @@ using Microsoft.Extensions.Logging; -using SharedLib.Extensions; - using System; using System.Buffers; using System.Numerics; diff --git a/Core/Goals/FollowRouteGoal.cs b/Core/Goals/FollowRouteGoal.cs index 5df3322b1..3e77570ba 100644 --- a/Core/Goals/FollowRouteGoal.cs +++ b/Core/Goals/FollowRouteGoal.cs @@ -1,13 +1,16 @@ using Core.GOAP; -using SharedLib.NpcFinder; + +using Game; + using Microsoft.Extensions.Logging; + +using SharedLib.Extensions; +using SharedLib.NpcFinder; + using System; using System.Linq; using System.Numerics; using System.Threading; -using SharedLib.Extensions; -using Game; -using Microsoft.Extensions.DependencyInjection; #pragma warning disable 162 diff --git a/Core/Goals/LootGoal.cs b/Core/Goals/LootGoal.cs index eca5048ed..d965866ce 100644 --- a/Core/Goals/LootGoal.cs +++ b/Core/Goals/LootGoal.cs @@ -1,14 +1,18 @@ -using Core.Database; +using Core.AddonComponent; +using Core.Database; using Core.GOAP; -using SharedLib.NpcFinder; + using Microsoft.Extensions.Logging; -using WowheadDB; -using System.Collections.Generic; -using System.Numerics; + using SharedLib.Extensions; +using SharedLib.NpcFinder; + using System; +using System.Collections.Generic; +using System.Numerics; using System.Threading; -using Core.AddonComponent; + +using WowheadDB; namespace Core.Goals; diff --git a/Core/Goals/ParallelGoal.cs b/Core/Goals/ParallelGoal.cs index 1bdde5522..546747fec 100644 --- a/Core/Goals/ParallelGoal.cs +++ b/Core/Goals/ParallelGoal.cs @@ -1,6 +1,7 @@ using Core.GOAP; + using Microsoft.Extensions.Logging; -using System; + using System.Threading.Tasks; namespace Core.Goals; diff --git a/Core/Goals/PullTargetGoal.cs b/Core/Goals/PullTargetGoal.cs index 7142e9854..56fe68320 100644 --- a/Core/Goals/PullTargetGoal.cs +++ b/Core/Goals/PullTargetGoal.cs @@ -1,6 +1,5 @@ using Core.GOAP; -using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using SharedLib.NpcFinder; diff --git a/Core/Goals/SkinningGoal.cs b/Core/Goals/SkinningGoal.cs index 13c251804..343927d94 100644 --- a/Core/Goals/SkinningGoal.cs +++ b/Core/Goals/SkinningGoal.cs @@ -1,6 +1,9 @@ using Core.GOAP; -using SharedLib.NpcFinder; + using Microsoft.Extensions.Logging; + +using SharedLib.NpcFinder; + using System; using System.Collections.Generic; using System.Threading; diff --git a/Core/Goals/TargetLastDeadGoal.cs b/Core/Goals/TargetLastDeadGoal.cs index 9e6ea78bb..db7216008 100644 --- a/Core/Goals/TargetLastDeadGoal.cs +++ b/Core/Goals/TargetLastDeadGoal.cs @@ -1,4 +1,5 @@ using Core.GOAP; + using Microsoft.Extensions.Logging; namespace Core.Goals; diff --git a/Core/Goals/WaitForGatheringGoal.cs b/Core/Goals/WaitForGatheringGoal.cs index 7aa423593..c8e44d3b1 100644 --- a/Core/Goals/WaitForGatheringGoal.cs +++ b/Core/Goals/WaitForGatheringGoal.cs @@ -1,7 +1,9 @@ using Core.GOAP; + using Microsoft.Extensions.Logging; -using System.Diagnostics; + using System; +using System.Diagnostics; namespace Core.Goals; diff --git a/Core/Goals/WalkToCorpseGoal.cs b/Core/Goals/WalkToCorpseGoal.cs index d1fd64c1f..4e66e57c3 100644 --- a/Core/Goals/WalkToCorpseGoal.cs +++ b/Core/Goals/WalkToCorpseGoal.cs @@ -1,5 +1,7 @@ using Core.GOAP; + using Microsoft.Extensions.Logging; + using System; using System.Numerics; diff --git a/Core/GoalsComponent/Blacklist/Blacklist.cs b/Core/GoalsComponent/Blacklist/Blacklist.cs index 7dc0d6656..4d176abf6 100644 --- a/Core/GoalsComponent/Blacklist/Blacklist.cs +++ b/Core/GoalsComponent/Blacklist/Blacklist.cs @@ -1,9 +1,8 @@ using Microsoft.Extensions.Logging; -using System; - using SharedLib.Extensions; +using System; using System.Buffers; namespace Core; diff --git a/Core/GoalsComponent/CastingHandler.cs b/Core/GoalsComponent/CastingHandler.cs index 3e1287d05..5c425637e 100644 --- a/Core/GoalsComponent/CastingHandler.cs +++ b/Core/GoalsComponent/CastingHandler.cs @@ -5,8 +5,8 @@ using System; using System.Threading; -using static System.Math; using static Core.AddonTicks; +using static System.Math; namespace Core.Goals; @@ -455,7 +455,7 @@ private bool PreparedForCast(KeyAction item, CancellationToken token) float elapsedMs = wait.Until(waitTimeMs, token); logger.LogInformation($"Stop {nameof(bits.Shoot)} and wait {waitTimeMs}ms | {elapsedMs}ms"); - + if (elapsedMs >= 0) { wait.Update(); diff --git a/Core/GoalsComponent/CastingHandlerInterruptWatchdog.cs b/Core/GoalsComponent/CastingHandlerInterruptWatchdog.cs index 2db563b9f..5b2ac36a2 100644 --- a/Core/GoalsComponent/CastingHandlerInterruptWatchdog.cs +++ b/Core/GoalsComponent/CastingHandlerInterruptWatchdog.cs @@ -1,12 +1,12 @@ -using System; -using System.Threading; - -using Core.GOAP; +using Core.GOAP; using Microsoft.Extensions.Logging; using SharedLib; +using System; +using System.Threading; + #pragma warning disable 162 namespace Core.Goals; diff --git a/Core/GoalsComponent/DruidMountHandler.cs b/Core/GoalsComponent/DruidMountHandler.cs index 2890dd95e..85925a9b2 100644 --- a/Core/GoalsComponent/DruidMountHandler.cs +++ b/Core/GoalsComponent/DruidMountHandler.cs @@ -1,7 +1,7 @@ -using System.Numerics; -using System.Threading; +using Core.Goals; -using Core.Goals; +using System.Numerics; +using System.Threading; namespace Core; diff --git a/Core/GoalsComponent/MountHandler.cs b/Core/GoalsComponent/MountHandler.cs index 30404b846..9526c5f78 100644 --- a/Core/GoalsComponent/MountHandler.cs +++ b/Core/GoalsComponent/MountHandler.cs @@ -1,12 +1,11 @@ -using System.Numerics; - using Core.Goals; -using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using SharedLib.Extensions; +using System.Numerics; + namespace Core; public sealed partial class MountHandler : IMountHandler diff --git a/Core/GoalsComponent/Navigation.cs b/Core/GoalsComponent/Navigation.cs index 9cceaa052..2364ccb0e 100644 --- a/Core/GoalsComponent/Navigation.cs +++ b/Core/GoalsComponent/Navigation.cs @@ -1,14 +1,16 @@ +using Core.GOAP; + +using Microsoft.Extensions.Logging; + +using SharedLib; +using SharedLib.Extensions; + using System; using System.Collections.Generic; using System.Numerics; using System.Threading; -using static System.MathF; - -using Microsoft.Extensions.Logging; -using SharedLib.Extensions; -using SharedLib; -using Core.GOAP; +using static System.MathF; #pragma warning disable 162 diff --git a/Core/GoalsComponent/NpcNameTargeting.cs b/Core/GoalsComponent/NpcNameTargeting.cs index 488c7ab7a..5207914cd 100644 --- a/Core/GoalsComponent/NpcNameTargeting.cs +++ b/Core/GoalsComponent/NpcNameTargeting.cs @@ -1,13 +1,17 @@ -using System; -using SixLabors.ImageSharp; -using System.Threading; -using SharedLib.Extensions; -using SharedLib.NpcFinder; using Game; + +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; + +using SharedLib.Extensions; +using SharedLib.NpcFinder; + +using SixLabors.ImageSharp; + +using System; using System.Collections.Generic; using System.Runtime.CompilerServices; -using Microsoft.Extensions.DependencyInjection; +using System.Threading; using static Core.BlacklistSourceType; diff --git a/Core/GoalsComponent/NpcNameTargetingLocations.cs b/Core/GoalsComponent/NpcNameTargetingLocations.cs index cb6dfebb8..ce965adbf 100644 --- a/Core/GoalsComponent/NpcNameTargetingLocations.cs +++ b/Core/GoalsComponent/NpcNameTargetingLocations.cs @@ -1,7 +1,8 @@ -using SixLabors.ImageSharp; using SharedLib.Extensions; using SharedLib.NpcFinder; +using SixLabors.ImageSharp; + namespace Core.Goals; public sealed class NpcNameTargetingLocations diff --git a/Core/GoalsComponent/PlayerDirection.cs b/Core/GoalsComponent/PlayerDirection.cs index b6b848fcd..6f87c7eec 100644 --- a/Core/GoalsComponent/PlayerDirection.cs +++ b/Core/GoalsComponent/PlayerDirection.cs @@ -1,11 +1,15 @@ -using Microsoft.Extensions.Logging; +using Core.GOAP; + +using Microsoft.Extensions.Logging; + +using SharedLib; +using SharedLib.Extensions; + using System; using System.Numerics; using System.Threading; -using SharedLib.Extensions; + using static System.MathF; -using Core.GOAP; -using SharedLib; #pragma warning disable 162 diff --git a/Core/GoalsComponent/ReactCastError.cs b/Core/GoalsComponent/ReactCastError.cs index e3dec7537..de2ba6630 100644 --- a/Core/GoalsComponent/ReactCastError.cs +++ b/Core/GoalsComponent/ReactCastError.cs @@ -3,9 +3,10 @@ using Microsoft.Extensions.Logging; using System; -using static System.MathF; using System.Numerics; +using static System.MathF; + namespace Core; public sealed class ReactCastError diff --git a/Core/GoalsComponent/StopMoving.cs b/Core/GoalsComponent/StopMoving.cs index a81aea65a..b0e5552a4 100644 --- a/Core/GoalsComponent/StopMoving.cs +++ b/Core/GoalsComponent/StopMoving.cs @@ -1,9 +1,12 @@ -using System; -using System.Threading; +using Core.GOAP; + using Game; -using Core.GOAP; + using SharedLib; +using System; +using System.Threading; + namespace Core.Goals; public sealed class StopMoving : IDisposable diff --git a/Core/GoalsComponent/TargetFinder.cs b/Core/GoalsComponent/TargetFinder.cs index 5cc597344..7bce8ee54 100644 --- a/Core/GoalsComponent/TargetFinder.cs +++ b/Core/GoalsComponent/TargetFinder.cs @@ -1,6 +1,7 @@ using SharedLib.NpcFinder; -using System.Threading; + using System; +using System.Threading; namespace Core.Goals; diff --git a/Core/GoalsFactory/GoalFactory.cs b/Core/GoalsFactory/GoalFactory.cs index 2af92da0c..650422bb2 100644 --- a/Core/GoalsFactory/GoalFactory.cs +++ b/Core/GoalsFactory/GoalFactory.cs @@ -1,18 +1,21 @@ +using Core.Database; using Core.Goals; using Core.GOAP; +using Core.Session; + using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; + +using SharedLib; + using System; -using static System.IO.Path; -using static System.IO.File; using System.Numerics; using System.Threading; -using static Newtonsoft.Json.JsonConvert; -using Core.Session; -using SharedLib; -using Core.Database; using static Core.BlacklistSourceType; +using static Newtonsoft.Json.JsonConvert; +using static System.IO.File; +using static System.IO.Path; namespace Core; @@ -55,7 +58,7 @@ public static IServiceProvider Create( services.AddKeyedScoped>(MOUSE_OVER); services.AddKeyedScoped>(TARGET); - + services.AddScoped(x => x.GetRequiredKeyedService(TARGET)); services.AddScoped(); diff --git a/Core/IBotController.cs b/Core/IBotController.cs index 9d0b5f3e7..3b021091b 100644 --- a/Core/IBotController.cs +++ b/Core/IBotController.cs @@ -1,4 +1,5 @@ using Core.GOAP; + using System; using System.Collections.Generic; diff --git a/Core/Input/ConfigurableInput.cs b/Core/Input/ConfigurableInput.cs index 12bf8a5f3..15f36d613 100644 --- a/Core/Input/ConfigurableInput.cs +++ b/Core/Input/ConfigurableInput.cs @@ -1,9 +1,10 @@ -using System.Threading; -using System; +using Game; -using Game; using Microsoft.Extensions.Logging; +using System; +using System.Threading; + namespace Core; public sealed partial class ConfigurableInput diff --git a/Core/Minimap/MinimapNodeFinder.cs b/Core/Minimap/MinimapNodeFinder.cs index f4af95f17..128c3a88c 100644 --- a/Core/Minimap/MinimapNodeFinder.cs +++ b/Core/Minimap/MinimapNodeFinder.cs @@ -1,7 +1,4 @@ -using System; -using System.Buffers; - -using Core.Minimap; +using Core.Minimap; using Microsoft.Extensions.Logging; @@ -10,6 +7,9 @@ using SixLabors.ImageSharp; using SixLabors.ImageSharp.Advanced; +using System; +using System.Buffers; + namespace Core; public sealed class MinimapNodeFinder diff --git a/Core/Minimap/MinimapRowOperation.cs b/Core/Minimap/MinimapRowOperation.cs index dad01e238..95556aed9 100644 --- a/Core/Minimap/MinimapRowOperation.cs +++ b/Core/Minimap/MinimapRowOperation.cs @@ -1,15 +1,15 @@ -using System; -using System.Runtime.CompilerServices; -using System.Threading; - +using SharedLib; using SharedLib.Extensions; -using SharedLib; using SixLabors.ImageSharp; using SixLabors.ImageSharp.Advanced; using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.PixelFormats; +using System; +using System.Runtime.CompilerServices; +using System.Threading; + namespace Core.Minimap; internal readonly struct MinimapRowOperation : IRowOperation { diff --git a/Core/Overlay/NpcNameOverlay.cs b/Core/Overlay/NpcNameOverlay.cs index 2f0f266a4..35a34c294 100644 --- a/Core/Overlay/NpcNameOverlay.cs +++ b/Core/Overlay/NpcNameOverlay.cs @@ -1,6 +1,4 @@ -using System; - -using Core.Goals; +using Core.Goals; using GameOverlay.Drawing; using GameOverlay.Windows; @@ -8,6 +6,8 @@ using SharedLib.Extensions; using SharedLib.NpcFinder; +using System; + using DPoint = SixLabors.ImageSharp.Point; using DRectangle = SixLabors.ImageSharp.Rectangle; diff --git a/Core/PPather/Client/AnTcpClient.cs b/Core/PPather/Client/AnTcpClient.cs index 198650224..0ba268fce 100644 --- a/Core/PPather/Client/AnTcpClient.cs +++ b/Core/PPather/Client/AnTcpClient.cs @@ -1,4 +1,5 @@ using AnTCP.Client.Objects; + using System; using System.IO; using System.Net.Sockets; diff --git a/Core/PPather/IPPather.cs b/Core/PPather/IPPather.cs index 5e2c26f32..2f0b6dd3e 100644 --- a/Core/PPather/IPPather.cs +++ b/Core/PPather/IPPather.cs @@ -1,7 +1,8 @@ using PPather.Data; + using System.Collections.Generic; -using System.Threading.Tasks; using System.Numerics; +using System.Threading.Tasks; namespace Core; diff --git a/Core/PPather/IPathVizualizer.cs b/Core/PPather/IPathVizualizer.cs index 0dea6ecc0..1ad897f19 100644 --- a/Core/PPather/IPathVizualizer.cs +++ b/Core/PPather/IPathVizualizer.cs @@ -1,11 +1,11 @@ -using System; +using PPather.Data; + +using System; using System.Collections.Generic; using System.Net.Http; using System.Text.Json; using System.Threading.Tasks; -using PPather.Data; - namespace Core; public interface IPathVizualizer : IDisposable diff --git a/Core/PPather/LocalPathingApi.cs b/Core/PPather/LocalPathingApi.cs index 02d09bb85..1ded27405 100644 --- a/Core/PPather/LocalPathingApi.cs +++ b/Core/PPather/LocalPathingApi.cs @@ -1,12 +1,14 @@ -using PPather.Data; -using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging; + using PPather; +using PPather.Data; +using PPather.Graph; + +using System; using System.Collections.Generic; using System.Diagnostics; using System.Numerics; using System.Threading.Tasks; -using System; -using PPather.Graph; #pragma warning disable 162 diff --git a/Core/PPather/NoPathVisualizer.cs b/Core/PPather/NoPathVisualizer.cs index e335d9230..f50c954c8 100644 --- a/Core/PPather/NoPathVisualizer.cs +++ b/Core/PPather/NoPathVisualizer.cs @@ -1,10 +1,10 @@ -using System.Collections.Generic; +using PPather.Data; + +using System.Collections.Generic; using System.Net.Http; using System.Text.Json; using System.Threading.Tasks; -using PPather.Data; - namespace Core; internal sealed class NoPathVisualizer : IPathVizualizer diff --git a/Core/PPather/RemotePathingAPI.cs b/Core/PPather/RemotePathingAPI.cs index 139f41e22..cb1c90402 100644 --- a/Core/PPather/RemotePathingAPI.cs +++ b/Core/PPather/RemotePathingAPI.cs @@ -1,15 +1,18 @@ -using System.Text.Json; +using Microsoft.Extensions.Logging; + +using PPather.Data; + +using SharedLib.Converters; + using System; -using System.Linq; using System.Collections.Generic; +using System.Linq; using System.Net.Http; -using System.Threading.Tasks; -using Microsoft.Extensions.Logging; -using PPather.Data; -using System.Text; -using System.Numerics; -using SharedLib.Converters; using System.Net.Sockets; +using System.Numerics; +using System.Text; +using System.Text.Json; +using System.Threading.Tasks; namespace Core; diff --git a/Core/PPather/RemotePathingAPIV3.cs b/Core/PPather/RemotePathingAPIV3.cs index 960c93fae..b4e2460f3 100644 --- a/Core/PPather/RemotePathingAPIV3.cs +++ b/Core/PPather/RemotePathingAPIV3.cs @@ -1,16 +1,20 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; +using AnTCP.Client; + using Microsoft.Extensions.Logging; + +using PPather; using PPather.Data; -using System.Threading; -using AnTCP.Client; + using SharedLib; -using System.Numerics; + +using System; +using System.Collections.Generic; using System.Net.Http; -using System.Text.Json; +using System.Numerics; using System.Text; -using PPather; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; #pragma warning disable 162 diff --git a/Core/Path/DirectionCalculator.cs b/Core/Path/DirectionCalculator.cs index 127eda151..329d7a044 100644 --- a/Core/Path/DirectionCalculator.cs +++ b/Core/Path/DirectionCalculator.cs @@ -1,5 +1,4 @@ -using System; -using System.Numerics; +using System.Numerics; using static System.MathF; diff --git a/Core/Path/IRouteReceiver.cs b/Core/Path/IRouteReceiver.cs index a23613736..1474ef249 100644 --- a/Core/Path/IRouteReceiver.cs +++ b/Core/Path/IRouteReceiver.cs @@ -1,5 +1,4 @@ -using System; -using System.Numerics; +using System.Numerics; namespace Core; diff --git a/Core/Path/RouteInfo.cs b/Core/Path/RouteInfo.cs index 033b3e4fa..9cc2b0ea1 100644 --- a/Core/Path/RouteInfo.cs +++ b/Core/Path/RouteInfo.cs @@ -1,4 +1,8 @@ -using System; +using Core.Database; + +using SharedLib; + +using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Data; @@ -6,10 +10,6 @@ using System.Numerics; using System.Text; -using Core.Database; - -using SharedLib; - using WowheadDB; namespace Core; diff --git a/Core/PathDrawer/PathDrawer.cs b/Core/PathDrawer/PathDrawer.cs index 04a059a1d..b38847151 100644 --- a/Core/PathDrawer/PathDrawer.cs +++ b/Core/PathDrawer/PathDrawer.cs @@ -1,12 +1,11 @@ -using System.Drawing; -using System.Numerics; - +using System; using System.Collections.Generic; -using System.Linq; -using System.Drawing.Imaging; -using System; +using System.Drawing; using System.Drawing.Drawing2D; +using System.Drawing.Imaging; +using System.Linq; using System.Net.Http; +using System.Numerics; namespace Core; diff --git a/Core/Requirement/RequirementFactory.cs b/Core/Requirement/RequirementFactory.cs index fc13fd761..b84d79da2 100644 --- a/Core/Requirement/RequirementFactory.cs +++ b/Core/Requirement/RequirementFactory.cs @@ -1,12 +1,3 @@ -using System; -using System.Collections.Frozen; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Reflection; - -using static System.Math; - using Core.Database; using Core.Goals; @@ -16,8 +7,16 @@ using SharedLib; using SharedLib.NpcFinder; -using static Core.Requirement; +using System; using System.Buffers; +using System.Collections.Frozen; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Runtime.InteropServices; + +using static Core.Requirement; +using static System.Math; namespace Core; diff --git a/Core/ScreenCapture/ScreenCapture.cs b/Core/ScreenCapture/ScreenCapture.cs index ec84bd1f1..c273b6230 100644 --- a/Core/ScreenCapture/ScreenCapture.cs +++ b/Core/ScreenCapture/ScreenCapture.cs @@ -1,13 +1,13 @@ -using System; -using System.IO; -using System.Threading; - -using Game; +using Game; using Microsoft.Extensions.Logging; using SixLabors.ImageSharp; +using System; +using System.IO; +using System.Threading; + namespace Core; public sealed partial class ScreenCapture : ScreenCaptureCleaner, IDisposable diff --git a/Core/ScreenCapture/ScreenCaptureCleaner.cs b/Core/ScreenCapture/ScreenCaptureCleaner.cs index 82b676f46..e47000cbe 100644 --- a/Core/ScreenCapture/ScreenCaptureCleaner.cs +++ b/Core/ScreenCapture/ScreenCaptureCleaner.cs @@ -1,7 +1,7 @@ -using System; -using System.IO; +using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging; +using System; +using System.IO; namespace Core; diff --git a/Core/Session/ExperienceProvider.cs b/Core/Session/ExperienceProvider.cs index 596733203..defbfb62a 100644 --- a/Core/Session/ExperienceProvider.cs +++ b/Core/Session/ExperienceProvider.cs @@ -1,6 +1,6 @@ -using static System.IO.Path; +using static Newtonsoft.Json.JsonConvert; using static System.IO.File; -using static Newtonsoft.Json.JsonConvert; +using static System.IO.Path; namespace Core.Session; diff --git a/Core/Session/GrindSession.cs b/Core/Session/GrindSession.cs index 2454df5bc..d0b26e7cc 100644 --- a/Core/Session/GrindSession.cs +++ b/Core/Session/GrindSession.cs @@ -1,6 +1,6 @@ -using System; +using Newtonsoft.Json; -using Newtonsoft.Json; +using System; namespace Core.Session; diff --git a/Core/Session/LocalGrindSessionDAO.cs b/Core/Session/LocalGrindSessionDAO.cs index db8f8fea8..ab6e84baa 100644 --- a/Core/Session/LocalGrindSessionDAO.cs +++ b/Core/Session/LocalGrindSessionDAO.cs @@ -1,5 +1,4 @@ -using System.Collections; -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; diff --git a/Core/Talents/TalentReader.cs b/Core/Talents/TalentReader.cs index 74584b655..ab171dae0 100644 --- a/Core/Talents/TalentReader.cs +++ b/Core/Talents/TalentReader.cs @@ -1,6 +1,7 @@ -using System.Collections.Generic; +using Core.Database; using Core.Talents; -using Core.Database; + +using System.Collections.Generic; namespace Core; diff --git a/Core/WoWScreen/WowScreenDXGI.cs b/Core/WoWScreen/WowScreenDXGI.cs index 3869f2a1b..5361573f0 100644 --- a/Core/WoWScreen/WowScreenDXGI.cs +++ b/Core/WoWScreen/WowScreenDXGI.cs @@ -326,7 +326,7 @@ private void UpdateScreenImage(ID3D11Texture2D texture) int rowPitch = (int)resource.RowPitch; ReadOnlySpan src = resource.AsSpan(screenRect.Height * rowPitch); Span dest = MemoryMarshal.Cast(memory.Span); - + // Issue: at 3440x1440 resolution game fullscreen // the dest Span.Length much smaller then the src Span.Length // this fails to copy the buffer diff --git a/Core/WowheadAPI/WApi.cs b/Core/WowheadAPI/WApi.cs index 9254ef612..ebe7bbff0 100644 --- a/Core/WowheadAPI/WApi.cs +++ b/Core/WowheadAPI/WApi.cs @@ -1,9 +1,9 @@ -using System.Collections.Concurrent; +using SharedLib; + +using System.Collections.Concurrent; using System.Threading.Tasks; using System.Xml; -using SharedLib; - namespace Core; public sealed class WApi diff --git a/CoreTests/Input/Test_Input.cs b/CoreTests/Input/Test_Input.cs index 9fe1b38c1..15a7f3f5a 100644 --- a/CoreTests/Input/Test_Input.cs +++ b/CoreTests/Input/Test_Input.cs @@ -1,7 +1,10 @@ -using System; -using SixLabors.ImageSharp; -using Game; +using Game; + using Microsoft.Extensions.Logging; + +using SixLabors.ImageSharp; + +using System; using System.Threading; namespace CoreTests; diff --git a/CoreTests/MinimapNodeFinder/Test_MinimapNodeFinder.cs b/CoreTests/MinimapNodeFinder/Test_MinimapNodeFinder.cs index 4abcbacf1..5338c0128 100644 --- a/CoreTests/MinimapNodeFinder/Test_MinimapNodeFinder.cs +++ b/CoreTests/MinimapNodeFinder/Test_MinimapNodeFinder.cs @@ -1,7 +1,4 @@ -using System; -using System.Diagnostics; - -using Core; +using Core; using Game; @@ -9,6 +6,9 @@ using SixLabors.ImageSharp; +using System; +using System.Diagnostics; + #pragma warning disable 0162 #nullable enable diff --git a/CoreTests/NpcNameFinder/MockWoWProcess.cs b/CoreTests/NpcNameFinder/MockWoWProcess.cs index 8db54a43b..33d2a521b 100644 --- a/CoreTests/NpcNameFinder/MockWoWProcess.cs +++ b/CoreTests/NpcNameFinder/MockWoWProcess.cs @@ -1,9 +1,10 @@ -using SixLabors.ImageSharp; +using Game; + +using SixLabors.ImageSharp; + using System; using System.Threading; -using Game; - namespace CoreTests; internal sealed class MockWoWProcess : IMouseInput diff --git a/CoreTests/NpcNameFinder/MockWowProcessInput.cs b/CoreTests/NpcNameFinder/MockWowProcessInput.cs index 03892418a..965eac008 100644 --- a/CoreTests/NpcNameFinder/MockWowProcessInput.cs +++ b/CoreTests/NpcNameFinder/MockWowProcessInput.cs @@ -1,8 +1,9 @@ -using System; +using Game; + using SixLabors.ImageSharp; -using System.Threading; -using Game; +using System; +using System.Threading; namespace CoreTests; diff --git a/CoreTests/NpcNameFinder/Test_NpcNameFinder.cs b/CoreTests/NpcNameFinder/Test_NpcNameFinder.cs index 0f28ba71f..114f69e5b 100644 --- a/CoreTests/NpcNameFinder/Test_NpcNameFinder.cs +++ b/CoreTests/NpcNameFinder/Test_NpcNameFinder.cs @@ -1,13 +1,16 @@ -using Core.Goals; -using SharedLib.NpcFinder; -using Microsoft.Extensions.Logging; -using System.Threading; -using System.Text; -using System.Diagnostics; -using System; using Core; +using Core.Goals; + using Game; + +using Microsoft.Extensions.Logging; + using SharedLib; +using SharedLib.NpcFinder; + +using System; +using System.Text; +using System.Threading; using static System.Diagnostics.Stopwatch; diff --git a/CoreTests/Program.cs b/CoreTests/Program.cs index 962f3517a..a9b2170bd 100644 --- a/CoreTests/Program.cs +++ b/CoreTests/Program.cs @@ -1,16 +1,21 @@ -using Serilog; +using Core; + +using Game; + +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; + +using Serilog; using Serilog.Extensions.Logging; + +using SharedLib; using SharedLib.NpcFinder; + +using System; +using System.Collections.Generic; using System.Diagnostics; -using System.Threading; using System.Linq; -using System.Collections.Generic; -using Core; -using System; -using Microsoft.Extensions.Logging; -using Game; -using Microsoft.Extensions.Options; -using SharedLib; +using System.Threading; #pragma warning disable 0162 diff --git a/DataConfig/DataConfig.cs b/DataConfig/DataConfig.cs index a6fe0d6d8..ca3fc0e00 100644 --- a/DataConfig/DataConfig.cs +++ b/DataConfig/DataConfig.cs @@ -1,9 +1,10 @@ -using System.IO; +using Newtonsoft.Json; + +using System.IO; -using static System.IO.Path; -using static System.IO.File; -using Newtonsoft.Json; using static Newtonsoft.Json.JsonConvert; +using static System.IO.File; +using static System.IO.Path; public static class DataConfigMeta { diff --git a/Game/Input/IMouseInput.cs b/Game/Input/IMouseInput.cs index 752ea17ff..0180d81c2 100644 --- a/Game/Input/IMouseInput.cs +++ b/Game/Input/IMouseInput.cs @@ -1,4 +1,5 @@ using SixLabors.ImageSharp; + using System.Threading; namespace Game; diff --git a/Game/Input/InputSimulator.cs b/Game/Input/InputSimulator.cs index 06abcead6..915413072 100644 --- a/Game/Input/InputSimulator.cs +++ b/Game/Input/InputSimulator.cs @@ -1,10 +1,14 @@ -using System; +using GregsStack.InputSimulatorStandard.Native; + using SixLabors.ImageSharp; + +using System; using System.Threading; -using GregsStack.InputSimulatorStandard.Native; -using static WinAPI.NativeMethods; + using TextCopy; +using static WinAPI.NativeMethods; + namespace Game; public sealed class InputSimulator : IInput diff --git a/Game/Input/InputWindowsNative.cs b/Game/Input/InputWindowsNative.cs index 05260a48c..9f81b401b 100644 --- a/Game/Input/InputWindowsNative.cs +++ b/Game/Input/InputWindowsNative.cs @@ -1,7 +1,10 @@ -using System; -using SixLabors.ImageSharp; +using SixLabors.ImageSharp; + +using System; using System.Threading; + using TextCopy; + using static WinAPI.NativeMethods; namespace Game; diff --git a/Game/WoWProcess/WowProcess.cs b/Game/WoWProcess/WowProcess.cs index 4429a2e2b..7d39b9b3c 100644 --- a/Game/WoWProcess/WowProcess.cs +++ b/Game/WoWProcess/WowProcess.cs @@ -1,11 +1,11 @@ -using System; -using System.Diagnostics; -using System.Threading; - using Microsoft.Extensions.Options; using SharedLib; +using System; +using System.Diagnostics; +using System.Threading; + #nullable enable namespace Game; diff --git a/Game/WoWScreen/IWowScreen.cs b/Game/WoWScreen/IWowScreen.cs index 7a771e14c..8f03a8614 100644 --- a/Game/WoWScreen/IWowScreen.cs +++ b/Game/WoWScreen/IWowScreen.cs @@ -1,6 +1,6 @@ -using System; +using SharedLib; -using SharedLib; +using System; namespace Game; diff --git a/HeadlessServer/Program.cs b/HeadlessServer/Program.cs index 2be72af2c..c2fd20d1f 100644 --- a/HeadlessServer/Program.cs +++ b/HeadlessServer/Program.cs @@ -7,9 +7,8 @@ using Microsoft.Extensions.Logging; using Serilog; -using Serilog.Events; -using Serilog.Templates.Themes; using Serilog.Templates; +using Serilog.Templates.Themes; namespace HeadlessServer; diff --git a/PPather/Extensions/BinaryReaderExtensions.cs b/PPather/Extensions/BinaryReaderExtensions.cs index c0952c753..fe57cdd35 100644 --- a/PPather/Extensions/BinaryReaderExtensions.cs +++ b/PPather/Extensions/BinaryReaderExtensions.cs @@ -2,7 +2,6 @@ using System.IO; using System.Numerics; using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; namespace PPather.Extensions; diff --git a/PPather/Graph/GraphChunk.cs b/PPather/Graph/GraphChunk.cs index f36f52185..5a89eb754 100644 --- a/PPather/Graph/GraphChunk.cs +++ b/PPather/Graph/GraphChunk.cs @@ -17,17 +17,17 @@ You should have received a copy of the GNU Lesser General Public License */ using Microsoft.Extensions.Logging; + +using PPather.Extensions; + using System; -using System.Collections.Generic; +using System.Buffers; using System.IO; -using System.Diagnostics; -using System.Runtime.InteropServices; using System.Numerics; -using PPather.Extensions; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using static System.Diagnostics.Stopwatch; -using System.Buffers; namespace PPather.Graph; diff --git a/PPather/Graph/PathGraph.cs b/PPather/Graph/PathGraph.cs index 56ae64733..71b0e3b53 100644 --- a/PPather/Graph/PathGraph.cs +++ b/PPather/Graph/PathGraph.cs @@ -17,19 +17,22 @@ You should have received a copy of the GNU Lesser General Public License */ using Microsoft.Extensions.Logging; + +using PPather.Triangles.Data; + +using SharedLib.Data; + using System; +using System.Buffers; using System.Collections.Generic; -using System.Diagnostics; +using System.IO; +using System.Numerics; using System.Threading; + using WowTriangles; -using SharedLib.Data; -using System.Numerics; -using System.IO; -using PPather.Triangles.Data; -using static System.MathF; using static System.Diagnostics.Stopwatch; -using System.Buffers; +using static System.MathF; #pragma warning disable 162 diff --git a/PPather/Graph/Spot.cs b/PPather/Graph/Spot.cs index 64c733bc0..058e005aa 100644 --- a/PPather/Graph/Spot.cs +++ b/PPather/Graph/Spot.cs @@ -16,13 +16,13 @@ You should have received a copy of the GNU Lesser General Public License */ +using SharedLib.Extensions; + using System; using System.Buffers; using System.Numerics; using System.Runtime.CompilerServices; -using SharedLib.Extensions; - namespace PPather.Graph; public sealed class Spot diff --git a/PPather/Search/MeshFactory.cs b/PPather/Search/MeshFactory.cs index 65b5c9da3..83cf64082 100644 --- a/PPather/Search/MeshFactory.cs +++ b/PPather/Search/MeshFactory.cs @@ -1,8 +1,9 @@ -using WowTriangles; -using System.Numerics; +using System; using System.Buffers; -using System; using System.Collections.Generic; +using System.Numerics; + +using WowTriangles; namespace PPather; diff --git a/PPather/Search/PPatherService.cs b/PPather/Search/PPatherService.cs index bd426476e..e728fadb1 100644 --- a/PPather/Search/PPatherService.cs +++ b/PPather/Search/PPatherService.cs @@ -1,14 +1,17 @@ -using PPather.Graph; -using System; -using System.Collections.Generic; -using WowTriangles; +using Microsoft.Extensions.Logging; + using PPather.Data; +using PPather.Graph; + using SharedLib; using SharedLib.Data; -using Microsoft.Extensions.Logging; -using System.Numerics; -using SharedLib.Extensions; + +using System; +using System.Collections.Generic; using System.Diagnostics; +using System.Numerics; + +using WowTriangles; namespace PPather; diff --git a/PPather/Search/Search.cs b/PPather/Search/Search.cs index 186d50e2c..5e0250ef0 100644 --- a/PPather/Search/Search.cs +++ b/PPather/Search/Search.cs @@ -1,9 +1,11 @@ using Microsoft.Extensions.Logging; + using PPather.Graph; + using System; -using WowTriangles; using System.Numerics; -using SharedLib.Extensions; + +using WowTriangles; namespace PPather; diff --git a/PPather/StormDll/ArchiveSet.cs b/PPather/StormDll/ArchiveSet.cs index 1c0a866a3..8a0917f38 100644 --- a/PPather/StormDll/ArchiveSet.cs +++ b/PPather/StormDll/ArchiveSet.cs @@ -1,5 +1,6 @@ -using System.IO; -using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging; + +using System.IO; namespace StormDll; diff --git a/PPather/Triangles/ChunkedTriangleCollection.cs b/PPather/Triangles/ChunkedTriangleCollection.cs index 0f7cf35a1..e66d988d4 100644 --- a/PPather/Triangles/ChunkedTriangleCollection.cs +++ b/PPather/Triangles/ChunkedTriangleCollection.cs @@ -4,16 +4,20 @@ * */ +using Microsoft.Extensions.Logging; + +using PPather; +using PPather.Graph; +using PPather.Triangles.Data; + using System; using System.Numerics; +using System.Runtime.CompilerServices; + using Wmo; -using Microsoft.Extensions.Logging; -using PPather.Graph; + using static System.MathF; using static WowTriangles.Utils; -using PPather.Triangles.Data; -using PPather; -using System.Runtime.CompilerServices; namespace WowTriangles; diff --git a/PPather/Triangles/MPQTriangleSupplier.cs b/PPather/Triangles/MPQTriangleSupplier.cs index dfb581921..a15f78fe4 100644 --- a/PPather/Triangles/MPQTriangleSupplier.cs +++ b/PPather/Triangles/MPQTriangleSupplier.cs @@ -18,17 +18,19 @@ Copyright Pontus Borg 2008 */ +using Microsoft.Extensions.Logging; + +using PPather; + using System; +using System.IO; using System.Numerics; -using static System.MathF; +using System.Runtime.CompilerServices; + using Wmo; -using System.IO; -using Microsoft.Extensions.Logging; -using PPather.Triangles.Data; + +using static System.MathF; using static Wmo.MapTileFile; -using PPather; -using System.Runtime.CompilerServices; -using System.Collections.Generic; namespace WowTriangles; diff --git a/PPather/Triangles/TriangleCollection.cs b/PPather/Triangles/TriangleCollection.cs index de43c77e7..3ef049839 100644 --- a/PPather/Triangles/TriangleCollection.cs +++ b/PPather/Triangles/TriangleCollection.cs @@ -4,12 +4,6 @@ * */ -using System; -using System.Collections.Generic; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - using Microsoft.Extensions.Logging; using PPather; @@ -17,6 +11,12 @@ using SharedLib.Extensions; +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + namespace WowTriangles; /// diff --git a/PPather/Triangles/Utils.cs b/PPather/Triangles/Utils.cs index f21777c92..2d374baa1 100644 --- a/PPather/Triangles/Utils.cs +++ b/PPather/Triangles/Utils.cs @@ -18,7 +18,6 @@ Copyright Pontus Borg 2008 */ -using System; using System.Numerics; using System.Runtime.CompilerServices; diff --git a/PPather/Triangles/WmoFile.cs b/PPather/Triangles/WmoFile.cs index f3af794de..acb30ed85 100644 --- a/PPather/Triangles/WmoFile.cs +++ b/PPather/Triangles/WmoFile.cs @@ -18,20 +18,24 @@ Copyright Pontus Borg 2008 */ -using System; -using System.Numerics; -using System.Collections.Generic; -using System.IO; using Microsoft.Extensions.Logging; -using SharedLib.Data; -using System.Collections; + using PPather.Extensions; -using System.Text; -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; + +using SharedLib.Data; + using StormDll; + +using System; using System.Buffers; +using System.Collections; +using System.Collections.Generic; +using System.IO; using System.Linq; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; namespace Wmo; diff --git a/PathingAPI/Controllers/PPatherController.cs b/PathingAPI/Controllers/PPatherController.cs index 330056e35..d44e4726a 100644 --- a/PathingAPI/Controllers/PPatherController.cs +++ b/PathingAPI/Controllers/PPatherController.cs @@ -1,11 +1,4 @@ -using System; -using System.Buffers; -using System.Collections.Generic; -using System.Numerics; -using System.Runtime.InteropServices; -using System.Text.Json; - -using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using PathingAPI.RateLimit; @@ -16,6 +9,11 @@ using SharedLib.Data; +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text.Json; + namespace PathingAPI.Controllers; [Route("api/[controller]")] diff --git a/PathingAPI/DisposableComponent/ComponentWithCancellationToken.cs b/PathingAPI/DisposableComponent/ComponentWithCancellationToken.cs index 4e4bdedb6..f964ad487 100644 --- a/PathingAPI/DisposableComponent/ComponentWithCancellationToken.cs +++ b/PathingAPI/DisposableComponent/ComponentWithCancellationToken.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Components; -using System.Threading; + using System; +using System.Threading; #nullable enable diff --git a/PathingAPI/PathingAPILoggerSink.cs b/PathingAPI/PathingAPILoggerSink.cs index 6d6d41517..59b6c4dd9 100644 --- a/PathingAPI/PathingAPILoggerSink.cs +++ b/PathingAPI/PathingAPILoggerSink.cs @@ -1,8 +1,8 @@ -using System; - -using Serilog.Core; +using Serilog.Core; using Serilog.Events; +using System; + namespace PathingAPI; public sealed class PathingAPILoggerSink : ILogEventSink diff --git a/PathingAPI/RateLimit/RateLimitFilter.cs b/PathingAPI/RateLimit/RateLimitFilter.cs index b563ef897..160a08e79 100644 --- a/PathingAPI/RateLimit/RateLimitFilter.cs +++ b/PathingAPI/RateLimit/RateLimitFilter.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Filters; + using System.Threading.Tasks; namespace PathingAPI.RateLimit; diff --git a/PathingAPI/Startup.cs b/PathingAPI/Startup.cs index 389f40e89..4451cd7e0 100644 --- a/PathingAPI/Startup.cs +++ b/PathingAPI/Startup.cs @@ -1,7 +1,3 @@ -using System; -using System.IO; -using System.Reflection; - using MatBlazor; using Microsoft.AspNetCore.Builder; @@ -22,6 +18,10 @@ using SharedLib; using SharedLib.Converters; +using System; +using System.IO; +using System.Reflection; + namespace PathingAPI; public sealed class Startup diff --git a/SharedLib/Converters/Vector3Converter.cs b/SharedLib/Converters/Vector3Converter.cs index b8e3d70fe..8e0071851 100644 --- a/SharedLib/Converters/Vector3Converter.cs +++ b/SharedLib/Converters/Vector3Converter.cs @@ -1,8 +1,8 @@ using System; -using System.Text.Json; -using System.Text.Json.Serialization; using System.Numerics; using System.Runtime.CompilerServices; +using System.Text.Json; +using System.Text.Json.Serialization; namespace SharedLib.Converters; diff --git a/SharedLib/Converters/Vector4Converter.cs b/SharedLib/Converters/Vector4Converter.cs index 1a3a5a05e..6e278e836 100644 --- a/SharedLib/Converters/Vector4Converter.cs +++ b/SharedLib/Converters/Vector4Converter.cs @@ -1,8 +1,8 @@ using System; -using System.Text.Json; -using System.Text.Json.Serialization; using System.Numerics; using System.Runtime.CompilerServices; +using System.Text.Json; +using System.Text.Json.Serialization; namespace SharedLib.Converters; diff --git a/SharedLib/Data/WorldMapAreaDB.cs b/SharedLib/Data/WorldMapAreaDB.cs index 5f11666f1..6eca0fc12 100644 --- a/SharedLib/Data/WorldMapAreaDB.cs +++ b/SharedLib/Data/WorldMapAreaDB.cs @@ -1,12 +1,12 @@ -using System; +using Newtonsoft.Json; + +using System; using System.Collections.Frozen; using System.Collections.Generic; using System.IO; using System.Linq; using System.Numerics; -using Newtonsoft.Json; - namespace SharedLib; public sealed class WorldMapAreaDB diff --git a/SharedLib/NpcFinder/LineSegmentOperation.cs b/SharedLib/NpcFinder/LineSegmentOperation.cs index 45a6dd1d9..8e21d6078 100644 --- a/SharedLib/NpcFinder/LineSegmentOperation.cs +++ b/SharedLib/NpcFinder/LineSegmentOperation.cs @@ -1,11 +1,11 @@ -using System; - +using SixLabors.ImageSharp; using SixLabors.ImageSharp.Advanced; using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.PixelFormats; -using SixLabors.ImageSharp; -using System.Threading; + +using System; using System.Runtime.CompilerServices; +using System.Threading; namespace SharedLib.NpcFinder; diff --git a/SharedLib/NpcFinder/NpcNameFinder.cs b/SharedLib/NpcFinder/NpcNameFinder.cs index 0ada638b1..c8fd39302 100644 --- a/SharedLib/NpcFinder/NpcNameFinder.cs +++ b/SharedLib/NpcFinder/NpcNameFinder.cs @@ -1,15 +1,17 @@ -using SharedLib.Extensions; using Microsoft.Extensions.Logging; -using System; -using System.Linq; -using System.Runtime.CompilerServices; +using SharedLib.Extensions; + +using SixLabors.ImageSharp; +using SixLabors.ImageSharp.Advanced; + +using System; using System.Buffers; using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; using static SharedLib.NpcFinder.NpcNameColors; -using SixLabors.ImageSharp.Advanced; -using SixLabors.ImageSharp; namespace SharedLib.NpcFinder; diff --git a/SharedLib/NpcFinder/NpcPositionComparer.cs b/SharedLib/NpcFinder/NpcPositionComparer.cs index 5ba377ee8..bf04e25cb 100644 --- a/SharedLib/NpcFinder/NpcPositionComparer.cs +++ b/SharedLib/NpcFinder/NpcPositionComparer.cs @@ -1,9 +1,9 @@ -using System.Collections.Generic; - -using SharedLib.Extensions; +using SharedLib.Extensions; using SixLabors.ImageSharp; +using System.Collections.Generic; + namespace SharedLib.NpcFinder; internal sealed class NpcPositionComparer : IComparer diff --git a/WinAPI/NativeMethods.cs b/WinAPI/NativeMethods.cs index 6f45c35ea..73309c486 100644 --- a/WinAPI/NativeMethods.cs +++ b/WinAPI/NativeMethods.cs @@ -1,6 +1,7 @@ using SixLabors.ImageSharp; -using System.Runtime.InteropServices; + using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; [assembly: DisableRuntimeMarshalling] diff --git a/WowheadDB/Herb/Node.cs b/WowheadDB/Herb/Node.cs index 72c08d5ee..91f96d8d4 100644 --- a/WowheadDB/Herb/Node.cs +++ b/WowheadDB/Herb/Node.cs @@ -1,8 +1,10 @@ -using System.Collections.Generic; -using System.Numerics; -using Newtonsoft.Json; +using Newtonsoft.Json; + using SharedLib.Extensions; +using System.Collections.Generic; +using System.Numerics; + namespace WowheadDB; public sealed class Node diff --git a/WowheadDB/NPC/NPC.cs b/WowheadDB/NPC/NPC.cs index 0d96905af..63e7a9291 100644 --- a/WowheadDB/NPC/NPC.cs +++ b/WowheadDB/NPC/NPC.cs @@ -1,8 +1,10 @@ -using System.Collections.Generic; -using System.Numerics; -using Newtonsoft.Json; +using Newtonsoft.Json; + using SharedLib.Extensions; +using System.Collections.Generic; +using System.Numerics; + namespace WowheadDB; public sealed class NPC