> [!Important] > **Developer Note** > This code change will **completely move gumps out of the core** ### Summary - Adds `GetGumps()` convenience which exposes methods to Find/Close/Send multiple gumps. This helper is a performance improvement by eliminating the Dictionary<Player, List> lookup for gumps.
28 lines
735 B
C#
28 lines
735 B
C#
using Server.Gumps;
|
|
using Server.Mobiles;
|
|
using Server.SkillHandlers;
|
|
using Server.Tests;
|
|
using Server.Tests.Network;
|
|
using Xunit;
|
|
|
|
namespace UOContent.Tests;
|
|
|
|
public class TrackingGumpTests : IClassFixture<ServerFixture>
|
|
{
|
|
[Fact]
|
|
// Regression test used to identify an issue with AddItem compilation of the packet
|
|
public void TestTrackingGump()
|
|
{
|
|
var pm = new PlayerMobile();
|
|
pm.Skills.Tracking.BaseFixedPoint = 1000;
|
|
var g = new TrackWhatGump(pm);
|
|
|
|
var ns = PacketTestUtilities.CreateTestNetState();
|
|
|
|
var expected = g.Compile(ns).Compile();
|
|
ns.SendGump(g);
|
|
|
|
var result = ns.SendPipe.Reader.AvailableToRead();
|
|
AssertThat.Equal(result, expected);
|
|
}
|
|
}
|