feat: Adds Next/Prev for future link list support (#1546)
This commit is contained in:
parent
fbd194339a
commit
c2d6578955
6 changed files with 493 additions and 5 deletions
|
|
@ -23,6 +23,7 @@ using System.Network;
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using Server.Accounting;
|
||||
using Server.Collections;
|
||||
using Server.Diagnostics;
|
||||
using Server.Gumps;
|
||||
using Server.HuePickers;
|
||||
|
|
@ -37,7 +38,7 @@ public delegate void NetStateCreatedCallback(NetState ns);
|
|||
public delegate void DecodePacket(Span<byte> buffer, ref int length);
|
||||
public delegate int EncodePacket(ReadOnlySpan<byte> inputBuffer, Span<byte> outputBuffer);
|
||||
|
||||
public partial class NetState : IComparable<NetState>
|
||||
public partial class NetState : IComparable<NetState>, IValueLinkListNode<NetState>
|
||||
{
|
||||
private static readonly ILogger logger = LogFactory.GetLogger(typeof(NetState));
|
||||
|
||||
|
|
@ -155,6 +156,11 @@ public partial class NetState : IComparable<NetState>
|
|||
CreatedCallback?.Invoke(this);
|
||||
}
|
||||
|
||||
// Sectors
|
||||
public NetState Next { get; set; }
|
||||
public NetState Previous { get; set; }
|
||||
public bool OnLinkList { get; set; }
|
||||
|
||||
// Only use this for debugging. This will make your server very slow!
|
||||
public bool PacketLogging
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue