Exemplo n.º 1
0
        public void OnLeave(Mobile m)
        {
            m_Mobiles.Remove(m);

            if (m_Clients != null && m.NetState != null)
            {
                m_Clients.Remove(m.NetState);

                if (m_Clients.Count == 0)
                {
                    m_Clients = null;
                }
            }

            if (m.Player)
            {
                m_Players.Remove(m);

                if (m_Players.Count == 0)
                {
                    m_Owner.DeactivateSectors(m_X, m_Y);
                    m_Players = null;
                }
            }

            if (m_Mobiles.Count == 0)
            {
                m_Mobiles = null;
            }
        }
Exemplo n.º 2
0
        public void OnLeave(Mobile mob)
        {
            Remove(ref m_Mobiles, mob);

            if (mob.NetState != null)
            {
                // if netstate isn't null they are either a player or a player-controlled monster (pseudoseer)
                Remove(ref m_Clients, mob.NetState);
                if (m_Players != null)
                {
                    Remove(ref m_Players, mob);

                    if (m_Players == null)
                    {
                        m_Owner.DeactivateSectors(m_X, m_Y);
                    }
                }
            }

            /*if ( mob.Player && m_Players != null ) {
             *      Remove( ref m_Players, mob );
             *
             *      if ( m_Players == null ) {
             *              m_Owner.DeactivateSectors( m_X, m_Y );
             *      }
             * }*/
        }
Exemplo n.º 3
0
        public void OnLeave(Mobile mob)
        {
            Remove(ref m_Mobiles, mob);

            if (mob.NetState != null)
            {
                Remove(ref m_Clients, mob.NetState);
            }

            if (mob.Player && m_Players != null)
            {
                Remove(ref m_Players, mob);

                if (m_Players == null)
                {
                    m_Owner.DeactivateSectors(m_X, m_Y);
                }
            }
        }