fix: Removes redundant code in GumpSystem (#1921)

This commit is contained in:
Stefano Merotta 2024-08-10 19:20:34 +02:00 • committed by GitHub
parent 76bdc7ac02
commit aa68d96807
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 25 deletions

View file

@ -24,6 +24,7 @@ namespace Server.Gumps;
public readonly ref struct NetStateGumps
{
private const int GumpCap = 512;
private static readonly ILogger _logger = LogFactory.GetLogger(typeof(NetStateGumps));
private readonly List<BaseGump> _gumps;
@ -102,7 +103,7 @@ public readonly ref struct NetStateGumps
}
}
if (_gumps.Count >= GumpSystem.GumpCap)
if (_gumps.Count >= GumpCap)
{
_logger.Information("Exceeded gump cap, disconnecting...");
_state.Disconnect("Exceeded gump cap.");