feat: Adds Next/Prev for future link list support (#1546)

This commit is contained in:
Kamron Batman 2023-10-14 19:43:10 -07:00 • committed by GitHub
parent fbd194339a
commit c2d6578955
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 493 additions and 5 deletions

View file

@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Server.Accounting;
using Server.Collections;
using Server.ContextMenus;
using Server.Guilds;
using Server.Gumps;
@ -180,7 +181,7 @@ public delegate int AOSStatusHandler(Mobile from, int index);
/// <summary>
/// Base class representing players, npcs, and creatures.
/// </summary>
public partial class Mobile : IHued, IComparable<Mobile>, ISpawnable, IObjectPropertyListEntity
public partial class Mobile : IHued, IComparable<Mobile>, ISpawnable, IObjectPropertyListEntity, IValueLinkListNode<Mobile>
{
// Allow four warmode changes in 0.5 seconds, any more will be delay for two seconds
private const int WarmodeCatchCount = 4;
@ -362,6 +363,11 @@ public partial class Mobile : IHued, IComparable<Mobile>, ISpawnable, IObjectPro
DamageEntries = new List<DamageEntry>();
}
// Sectors
public Mobile Next { get; set; }
public Mobile Previous { get; set; }
public bool OnLinkList { get; set; }
public static bool DragEffects { get; set; } = true;
[CommandProperty(AccessLevel.GameMaster)]