fix: Migrates RunebookGump to DynamicGump (#1915)

This commit is contained in:
Guyute 2024-08-09 21:39:36 -04:00 • committed by GitHub
parent 0ce58deefb
commit 873c25bbc5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 370 additions and 450 deletions

View file

@ -73,7 +73,7 @@ public partial class Runebook : Item, ISecurable, ICraftable
[CommandProperty(AccessLevel.GameMaster)]
public DateTime NextUse { get; set; }
public List<Mobile> Openers { get; set; } = new();
public HashSet<Mobile> Openers { get; } = new();
public override int LabelNumber => 1041267; // runebook
@ -262,13 +262,18 @@ public partial class Runebook : Item, ISecurable, ICraftable
return;
}
from.CloseGump<RunebookGump>();
from.SendGump(new RunebookGump(from, this));
Openers.Add(from);
SendGumpTo(from);
}
}
public void SendGumpTo(Mobile from)
{
from.CloseGump<RunebookGump>();
from.SendGump(new RunebookGump(this));
Openers.Add(from);
}
public virtual void OnTravel()
{
if (!Core.SA)
@ -408,7 +413,7 @@ public partial class RunebookEntry
public RunebookEntry(
Runebook runebook,
Point3D loc = new(),
Point3D loc = default,
Map map = null,
string description = null,
BaseHouse house = null