Skip to content

Commit

Permalink
Solution: Apply code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Xian55 committed Jan 12, 2025
1 parent 5e622bd commit ee1dfdc
Show file tree
Hide file tree
Showing 131 changed files with 522 additions and 417 deletions.
8 changes: 0 additions & 8 deletions Benchmarks/ClassProfile/LoadAllProfiles.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 0 additions & 1 deletion Benchmarks/PPather/PPather_Utils_PointDistanceToSegment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Numerics;
using System.Runtime.CompilerServices;

using static System.MathF;
using static System.Numerics.Vector3;

namespace Benchmarks.PPather;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes;

using BenchmarkDotNet.Attributes;
using System.Runtime.CompilerServices;

namespace Requirement;

Expand Down
13 changes: 6 additions & 7 deletions BlazorServer/Program.cs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion Core/Actionbar/ActionBarCooldownReader.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System;

using static Core.ActionBar;
using static System.Math;
using static System.DateTime;
using static System.Math;

namespace Core;

Expand Down
8 changes: 4 additions & 4 deletions Core/Actionbar/ActionBarCostReader.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions Core/Actionbar/ActionBarPopulator.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Generic;
using Microsoft.Extensions.Logging;

using Microsoft.Extensions.Logging;
using System.Collections.Generic;

namespace Core;

Expand Down Expand Up @@ -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;
}

Expand Down
6 changes: 4 additions & 2 deletions Core/Addon/AddonConfig.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System.IO;
using Newtonsoft.Json;

using System.IO;

using static Newtonsoft.Json.JsonConvert;
using Newtonsoft.Json;

namespace Core;

Expand Down
8 changes: 4 additions & 4 deletions Core/Addon/PlayerReader.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 5 additions & 3 deletions Core/Addon/SpellBookReader.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions Core/AddonComponent/SchoolMask.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using Newtonsoft.Json;

using Newtonsoft.Json;
using System;

namespace Core;

Expand Down
4 changes: 2 additions & 2 deletions Core/AddonComponent/UnitClassification.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using Newtonsoft.Json;

using Newtonsoft.Json;
using System;

namespace Core;

Expand Down
10 changes: 5 additions & 5 deletions Core/AddonDataProvider/IAddonDataProvider.cs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
4 changes: 2 additions & 2 deletions Core/Bag/BagChangeTracker.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using Microsoft.Extensions.Logging;

using Microsoft.Extensions.Logging;
using System;

namespace Core;

Expand Down
4 changes: 2 additions & 2 deletions Core/Bag/BagItem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using SharedLib;

using SharedLib;
using System;

namespace Core;

Expand Down
20 changes: 13 additions & 7 deletions Core/BotController.cs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
6 changes: 3 additions & 3 deletions Core/Chat/ChatReader.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions Core/ClassConfig/KeyAction.cs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
1 change: 1 addition & 0 deletions Core/ClassConfig/KeyActions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.Extensions.Logging;

using System;

namespace Core;
Expand Down
1 change: 1 addition & 0 deletions Core/ClassConfig/KeyReader.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.Extensions.Logging;

using System;
using System.Collections.Generic;

Expand Down
7 changes: 5 additions & 2 deletions Core/ConfigBotController.cs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
11 changes: 7 additions & 4 deletions Core/Configurator/AddonConfigurator.cs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion Core/Cursor/ImageHashing.cs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
4 changes: 2 additions & 2 deletions Core/DataFrame/DataFrameConfig.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using SixLabors.ImageSharp;

using SixLabors.ImageSharp;
using System;

namespace Core;

Expand Down
6 changes: 4 additions & 2 deletions Core/DataFrame/DataFrameMeta.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System;
using Newtonsoft.Json;

using SixLabors.ImageSharp;
using Newtonsoft.Json;

using System;

namespace Core;

Expand Down
10 changes: 5 additions & 5 deletions Core/Database/AreaDB.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
6 changes: 3 additions & 3 deletions Core/Database/CreatureDB.cs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
8 changes: 4 additions & 4 deletions Core/Database/ItemDB.cs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
6 changes: 3 additions & 3 deletions Core/Database/SpellDB.cs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Loading

0 comments on commit ee1dfdc

Please sign in to comment.