Fixes more casting
This commit is contained in:
parent
61937d9c97
commit
e77d695684
91 changed files with 512 additions and 908 deletions
|
|
@ -177,10 +177,10 @@ namespace Server.Gumps
|
|||
object child = node.Children[index];
|
||||
string name = "";
|
||||
|
||||
if ( child is ParentNode )
|
||||
name = ((ParentNode)child).Name;
|
||||
else if ( child is ChildNode )
|
||||
name = ((ChildNode)child).Name;
|
||||
if ( child is ParentNode parentNode )
|
||||
name = parentNode.Name;
|
||||
else if ( child is ChildNode childNode )
|
||||
name = childNode.Name;
|
||||
|
||||
AddImageTiled( x, y, EntryWidth, EntryHeight, EntryGumpID );
|
||||
AddLabelCropped( x + TextOffsetX, y, EntryWidth - TextOffsetX, EntryHeight, TextHue, name );
|
||||
|
|
@ -229,16 +229,10 @@ namespace Server.Gumps
|
|||
{
|
||||
object o = m_Node.Children[index];
|
||||
|
||||
if ( o is ParentNode )
|
||||
{
|
||||
from.SendGump( new GoGump( 0, from, m_Tree, (ParentNode)o ) );
|
||||
}
|
||||
if ( o is ParentNode node )
|
||||
from.SendGump( new GoGump( 0, from, m_Tree, node ) );
|
||||
else
|
||||
{
|
||||
ChildNode n = (ChildNode)o;
|
||||
|
||||
from.MoveToWorld( n.Location, m_Tree.Map );
|
||||
}
|
||||
from.MoveToWorld(((ChildNode)o).Location, m_Tree.Map );
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue