chore: Code Cleanup (#1239)

This commit is contained in:
Kamron Batman 2022-11-10 22:49:25 -08:00 committed by GitHub
parent 4eee508358
commit 6426996f29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 6 additions and 15 deletions

View file

@ -1,5 +1,4 @@
using System;
using Xunit;
using Xunit;
namespace Server.Tests;

View file

@ -14,7 +14,6 @@
*************************************************************************/
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;

View file

@ -14,7 +14,6 @@
*************************************************************************/
using System;
using System.Buffers;
namespace Server;

View file

@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Server.Accounting;
using Server.Buffers;
using Server.Collections;
using Server.ContextMenus;
using Server.Guilds;
using Server.Gumps;

View file

@ -61,11 +61,7 @@ public static class IncomingTargetingPackets
// User pressed escape
t.Cancel(from, TargetCancelType.Canceled);
}
else if (t.TargetID != targetID)
{
// Sanity, prevent fake target
}
else
else if (t.TargetID == targetID)
{
object toTarget;

View file

@ -48,7 +48,10 @@ public static class OutgoingTargetPackets
public static void SendCancelTarget(this NetState ns) =>
ns?.Send(stackalloc byte[]
{
0x6C, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
0x6C, 0x0, 0x0, 0x0, 0x0,
0x0, 0x3, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0
});
public static void SendTargetReq(this NetState ns, Target t)

View file

@ -14,7 +14,6 @@
*************************************************************************/
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;

View file

@ -14,7 +14,6 @@
*************************************************************************/
using System;
using System.Threading;
using System.Threading.Tasks;
namespace Server;

View file

@ -20,7 +20,6 @@ using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;
using Server.Guilds;
using Server.Logging;

View file

@ -1,4 +1,3 @@
using System;
using Server.Mobiles;
namespace Server.Items