Fixes casting checks
This commit is contained in:
parent
7ea00fbf4f
commit
03dd5f1926
431 changed files with 5616 additions and 6250 deletions
|
|
@ -51,7 +51,7 @@ namespace Server.Factions
|
|||
for ( int i = 0; i < members.Count; ++i )
|
||||
{
|
||||
PlayerState ps = members[i];
|
||||
|
||||
|
||||
if ( ps.IsActive )
|
||||
{
|
||||
ps.IsActive = false;
|
||||
|
|
@ -219,7 +219,7 @@ namespace Server.Factions
|
|||
}
|
||||
|
||||
m_Faction.State = this;
|
||||
|
||||
|
||||
m_Faction.ZeroRankOffset = m_Members.Count;
|
||||
m_Members.Sort();
|
||||
|
||||
|
|
@ -254,9 +254,7 @@ namespace Server.Factions
|
|||
|
||||
for ( int i = 0; i < factionTrapCount; ++i )
|
||||
{
|
||||
BaseFactionTrap trap = reader.ReadItem() as BaseFactionTrap;
|
||||
|
||||
if ( trap != null && !trap.CheckDecay() )
|
||||
if ( reader.ReadItem() is BaseFactionTrap trap && !trap.CheckDecay() )
|
||||
m_FactionTraps.Add( trap );
|
||||
}
|
||||
}
|
||||
|
|
@ -309,4 +307,4 @@ namespace Server.Factions
|
|||
writer.Write( (Item) m_FactionTraps[i] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue