Warn about empty gumps in production

This commit is contained in:
Guflly 2026-08-08 00:39:55 -07:00
parent 58a8a4725a
commit fd4c32bec4

View file

@ -24,9 +24,7 @@ namespace Server.Gumps;
public abstract class BaseGump
{
private static readonly byte[] _packetBuffer = GC.AllocateUninitializedArray<byte>(0x10000);
#if DEBUG
private static readonly ILogger _logger = LogFactory.GetLogger(typeof(BaseGump));
#endif
private static Serial nextSerial = (Serial)1;
public int TypeID { get; protected set; }
@ -61,12 +59,10 @@ public abstract class BaseGump
var writer = new SpanWriter(_packetBuffer);
Compile(ref writer);
#if DEBUG
if (!HasVisualElements)
{
_logger.Warning("Sending empty gump {GumpType}", GetType().FullName);
}
#endif
ns.Send(writer.Span);