public DryDockResult CheckDryDock( Mobile from )
{
if ( CheckDecay() )
return DryDockResult.Decaying;
if ( !from.Alive )
return DryDockResult.Dead;
Container pack = from.Backpack;
if ( (m_SPlank == null || !Key.ContainsKey( pack, m_SPlank.KeyValue )) && (m_PPlank == null || !Key.ContainsKey( pack, m_PPlank.KeyValue )) )
return DryDockResult.NoKey;
if ( !m_Anchored )
return DryDockResult.NotAnchored;
if ( m_Hold != null && m_Hold.Items.Count > 0 )
return DryDockResult.Hold;
Map map = Map;
if ( map == null || map == Map.Internal )
return DryDockResult.Items;
List<IEntity> ents = GetMovingEntities();
if ( ents.Count >= 1 )
return ( ents[0] is Mobile ) ? DryDockResult.Mobiles : DryDockResult.Items;
return DryDockResult.Valid;
}