Fixes more casting and other formatting issues.
This commit is contained in:
parent
03dd5f1926
commit
61937d9c97
67 changed files with 325 additions and 570 deletions
|
|
@ -315,7 +315,7 @@ namespace Server.Movement
|
|||
List<Mobile> mobsLeft = m_MobPools[1];
|
||||
List<Mobile> mobsRight = m_MobPools[2];
|
||||
|
||||
bool checkMobs = ( m is BaseCreature && !((BaseCreature)m).Controlled && ( xForward != m_Goal.X || yForward != m_Goal.Y ) );
|
||||
bool checkMobs = ( m is BaseCreature creature && !creature.Controlled && ( xForward != m_Goal.X || yForward != m_Goal.Y ) );
|
||||
|
||||
if ( checkDiagonals )
|
||||
{
|
||||
|
|
@ -589,4 +589,4 @@ namespace Server.Movement
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,9 +65,7 @@ namespace Server
|
|||
|
||||
public static void Path_OnTarget( Mobile from, object obj )
|
||||
{
|
||||
IPoint3D p = obj as IPoint3D;
|
||||
|
||||
if ( p == null )
|
||||
if ( !(obj is IPoint3D p) )
|
||||
return;
|
||||
|
||||
Spells.SpellHelper.GetSurfaceTop( ref p );
|
||||
|
|
@ -162,4 +160,4 @@ namespace Server
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ namespace Server
|
|||
|
||||
public Point3D GetGoalLocation()
|
||||
{
|
||||
if ( m_Goal is Item )
|
||||
return ((Item)m_Goal).GetWorldLocation();
|
||||
if ( m_Goal is Item item )
|
||||
return item.GetWorldLocation();
|
||||
|
||||
return new Point3D( m_Goal );
|
||||
}
|
||||
|
|
@ -201,4 +201,4 @@ namespace Server
|
|||
return Check( m_From.Location, goal, range );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue