Fixes sequential checks
This commit is contained in:
parent
83dcf536d8
commit
42d0b6271f
67 changed files with 99 additions and 99 deletions
|
|
@ -183,7 +183,7 @@ namespace Server
|
|||
|
||||
public override bool Equals( object o )
|
||||
{
|
||||
if ( o == null || !(o is Body) ) return false;
|
||||
if ( !(o is Body) ) return false;
|
||||
|
||||
return ((Body)o).m_BodyID == m_BodyID;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ namespace Server.Items
|
|||
|
||||
public override int GetTotal(TotalType type)
|
||||
{
|
||||
if (AccountGold.Enabled && Owner != null && Owner.Account != null && type == TotalType.Gold)
|
||||
if (AccountGold.Enabled && Owner?.Account != null && type == TotalType.Gold)
|
||||
{
|
||||
return Owner.Account.TotalGold;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ namespace Server
|
|||
{
|
||||
if (UseEditGump && IsAccessibleTo(from))
|
||||
{
|
||||
if (Editor == null || Editor.Check == null || Editor.Check.Deleted)
|
||||
if (Editor?.Check == null || Editor.Check.Deleted)
|
||||
{
|
||||
Editor = new EditGump(from, this);
|
||||
Editor.Send();
|
||||
|
|
@ -125,7 +125,7 @@ namespace Server
|
|||
{
|
||||
var c = GetSecureTradeCont();
|
||||
|
||||
if (c == null || c.Trade == null)
|
||||
if (c?.Trade == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ namespace Server
|
|||
|
||||
public static IEnumerable<NetState> SelectClients(Sector s, Rectangle2D bounds)
|
||||
{
|
||||
return s.Clients.Where(o => o != null && o.Mobile != null && !o.Mobile.Deleted && bounds.Contains(o.Mobile));
|
||||
return s.Clients.Where(o => o?.Mobile != null && !o.Mobile.Deleted && bounds.Contains(o.Mobile));
|
||||
}
|
||||
|
||||
public static IEnumerable<IEntity> SelectEntities(Sector s, Rectangle2D bounds)
|
||||
|
|
|
|||
|
|
@ -1610,7 +1610,7 @@ namespace Server.Network
|
|||
bool rightClick = pvSrc.ReadBoolean();
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
if ( from != null && from.QuestArrow != null )
|
||||
if ( @from?.QuestArrow != null )
|
||||
from.QuestArrow.OnClick( rightClick );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue