feat: Splits Server in Core and Application (#1806)

> [!Note]
> **Developer Note**
> Now developers will only need to build/run the Application project instead of everything.
> When adding new projects, make sure to: 
> 1. Add a reference to that project in the Application project.
> 2. Add the dll file to the Distribution/Data/assemblies.json file

### Summary
- Adds an application project
- Consolidates process restarts to use `Core.Kill(true)`
- Removes some old messaging, for example processor optimization
- Fixes missing build cleanup
This commit is contained in:
Kamron Batman 2024-05-30 23:34:03 -07:00 • committed by GitHub
parent e85c56ec2d
commit 60a3a6f501
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
43 changed files with 572 additions and 585 deletions

View file

@ -3,17 +3,17 @@ using Server.Tests;
using Server.Tests.Network;
using Xunit;
namespace UOContent.Tests
namespace UOContent.Tests;
public class WeaponAbilityPacketTests
{
public class WeaponAbilityPacketTests
[Theory]
[InlineData(0, true)]
[InlineData(0, false)]
[InlineData(100, true)]
[InlineData(1000, false)]
public void TestSpecialAbility(int abilityId, bool active)
{
[Theory]
[InlineData(0, true)]
[InlineData(0, false)]
[InlineData(100, true)]
[InlineData(1000, false)]
public void TestSpecialAbility(int abilityId, bool active)
{
var expected = new ToggleSpecialAbility(abilityId, active).Compile();
var ns = PacketTestUtilities.CreateTestNetState();
@ -23,9 +23,9 @@ namespace UOContent.Tests
AssertThat.Equal(result, expected);
}
[Fact]
public void TestClearAbility()
{
[Fact]
public void TestClearAbility()
{
var expected = new ClearWeaponAbility().Compile();
var ns = PacketTestUtilities.CreateTestNetState();
@ -34,5 +34,4 @@ namespace UOContent.Tests
var result = ns.SendPipe.Reader.AvailableToRead();
AssertThat.Equal(result, expected);
}
}
}
}

View file

@ -1,11 +1,11 @@
using Server.Network;
namespace UOContent.Tests
namespace UOContent.Tests;
public sealed class ToggleSpecialAbility : Packet
{
public sealed class ToggleSpecialAbility : Packet
public ToggleSpecialAbility(int abilityID, bool active) : base(0xBF)
{
public ToggleSpecialAbility(int abilityID, bool active) : base(0xBF)
{
EnsureCapacity(7);
Stream.Write((short)0x25);
@ -13,17 +13,16 @@ namespace UOContent.Tests
Stream.Write((short)abilityID);
Stream.Write(active);
}
}
}
public sealed class ClearWeaponAbility : Packet
public sealed class ClearWeaponAbility : Packet
{
public static readonly Packet Instance = SetStatic(new ClearWeaponAbility());
public ClearWeaponAbility() : base(0xBF)
{
public static readonly Packet Instance = SetStatic(new ClearWeaponAbility());
public ClearWeaponAbility() : base(0xBF)
{
EnsureCapacity(5);
Stream.Write((short)0x21);
}
}
}
}