Fixes implicit ternary expressions

This commit is contained in:
Kamron Batman 2018-09-14 14:56:48 -07:00
parent c85b0a740c
commit ff26dfa375
345 changed files with 1905 additions and 2336 deletions

View file

@ -71,8 +71,7 @@ namespace Server.Mobiles
}
}
List<MLQuest> result = new List<MLQuest>();
result.Add( m_MLQuest );
List<MLQuest> result = new List<MLQuest> { m_MLQuest };
return result;
}
@ -105,7 +104,7 @@ namespace Server.Mobiles
[CommandProperty(AccessLevel.GameMaster)]
public string Destination
{
get => m_Destination == null ? null : m_Destination.Name;
get => m_Destination?.Name;
set { m_DestinationString = value; m_Destination = EDI.Find(value); }
}
@ -220,7 +219,8 @@ namespace Server.Mobiles
Say("I am looking to go to {0}, will you take me?", (dest.Name == "Ocllo" && m.Map == Map.Trammel) ? "Haven" : dest.Name);
return true;
}
else if (escorter == m)
if (escorter == m)
{
Say("Lead on! Payment will be made when we arrive in {0}.", (dest.Name == "Ocllo" && m.Map == Map.Trammel) ? "Haven" : dest.Name);
return true;
@ -252,14 +252,15 @@ namespace Server.Mobiles
Say("I see you already have an escort.");
return false;
}
else if (m is PlayerMobile && (((PlayerMobile)m).LastEscortTime + EscortDelay) >= DateTime.UtcNow)
if (m is PlayerMobile && (((PlayerMobile)m).LastEscortTime + EscortDelay) >= DateTime.UtcNow)
{
int minutes = (int)Math.Ceiling(((((PlayerMobile)m).LastEscortTime + EscortDelay) - DateTime.UtcNow).TotalMinutes);
Say("You must rest {0} minute{1} before we set out on this journey.", minutes, minutes == 1 ? "" : "s");
return false;
}
else if (SetControlMaster(m))
if (SetControlMaster(m))
{
m_LastSeenEscorter = DateTime.UtcNow;
@ -391,11 +392,9 @@ namespace Server.Mobiles
Timer.DelayCall(TimeSpan.FromSeconds(5.0), Delete);
return null;
}
else
{
ControlOrder = OrderType.Stay;
return master;
}
ControlOrder = OrderType.Stay;
return master;
}
if (ControlOrder != OrderType.Follow)
@ -585,8 +584,7 @@ namespace Server.Mobiles
{
if (!Core.ML)
return m_TownNames;
else
return m_MLTownNames;
return m_MLTownNames;
}
public virtual string PickRandomDestination()