fix: Removes support for v4 Client and old gump packet. (#1739)
### Summary * Removes old gump packet support * Removes support for v4 clients * Removes `Unpack` flag and assumes it is always true. * Removes StringToBuffer since this is built into .NET now. > [!Note] > View the file changes with white space off: https://github.com/modernuo/ModernUO/pull/1739/files?diff=split&w=1
This commit is contained in:
parent
98d31bc707
commit
9cd84ba3d6
14 changed files with 1015 additions and 1191 deletions
|
|
@ -5,28 +5,24 @@ using Server.Tests;
|
|||
using Server.Tests.Network;
|
||||
using Xunit;
|
||||
|
||||
namespace UOContent.Tests
|
||||
namespace UOContent.Tests;
|
||||
|
||||
public class TrackingGumpTests : IClassFixture<ServerFixture>
|
||||
{
|
||||
public class TrackingGumpTests : IClassFixture<ServerFixture>
|
||||
[Fact]
|
||||
// Regression test used to identify an issue with AddItem compilation of the packet
|
||||
public void TestTrackingGump()
|
||||
{
|
||||
[Theory]
|
||||
[InlineData(ProtocolChanges.None)]
|
||||
[InlineData(ProtocolChanges.Unpack)]
|
||||
// Regression test used to identify an issue with AddItem compilation of the packet
|
||||
public void TestTrackingGump(ProtocolChanges changes)
|
||||
{
|
||||
var pm = new PlayerMobile();
|
||||
pm.Skills.Tracking.BaseFixedPoint = 1000;
|
||||
var g = new TrackWhatGump(pm);
|
||||
var pm = new PlayerMobile();
|
||||
pm.Skills.Tracking.BaseFixedPoint = 1000;
|
||||
var g = new TrackWhatGump(pm);
|
||||
|
||||
var ns = PacketTestUtilities.CreateTestNetState();
|
||||
ns.ProtocolChanges = changes;
|
||||
var ns = PacketTestUtilities.CreateTestNetState();
|
||||
|
||||
var expected = g.Compile(ns).Compile();
|
||||
ns.SendDisplayGump(g, out var switches, out var entries);
|
||||
var expected = g.Compile(ns).Compile();
|
||||
ns.SendDisplayGump(g, out var switches, out var entries);
|
||||
|
||||
var result = ns.SendPipe.Reader.AvailableToRead();
|
||||
AssertThat.Equal(result, expected);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue