Modernization Fixes & Updates to Default Values (#3)

This commit is contained in:
Kamron Batman 2018-10-28 00:33:16 -07:00 • committed by GitHub
parent 445eddff68
commit dcf64091b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
768 changed files with 10507 additions and 14196 deletions

View file

@ -67,7 +67,7 @@ namespace Server.Gumps
private GoGump(int page, Mobile from, LocationTree tree, ParentNode node) : base(50, 50)
{
from.CloseGump(typeof(GoGump));
from.CloseGump<GoGump>();
tree.LastBranch[from] = node;
@ -151,13 +151,8 @@ namespace Server.Gumps
x = BorderSize + OffsetSize;
y += EntryHeight + OffsetSize;
object child = node.Children[index];
string name = "";
if (child is ParentNode parentNode)
name = parentNode.Name;
else if (child is ChildNode childNode)
name = childNode.Name;
IGoNode child = node.Children[index];
string name = child.Name;
AddImageTiled(x, y, EntryWidth, EntryHeight, EntryGumpID);
AddLabelCropped(x + TextOffsetX, y, EntryWidth - TextOffsetX, EntryHeight, TextHue, name);
@ -228,7 +223,7 @@ namespace Server.Gumps
if (index >= 0 && index < m_Node.Children.Length)
{
object o = m_Node.Children[index];
IGoNode o = m_Node.Children[index];
if (o is ParentNode node)
from.SendGump(new GoGump(0, from, m_Tree, node));