コード例 #1
0
ファイル: Sector.cs プロジェクト: cookiehhh/Cshape
        public void OnEnter(Mobile m)
        {
            if (m_Mobiles == null)
            {
                m_Mobiles = new List <Mobile>();
            }

            m_Mobiles.Add(m);

            if (m.NetState != null)
            {
                if (m_Clients == null)
                {
                    m_Clients = new List <NetState>();
                }

                m_Clients.Add(m.NetState);
            }

            if (m.Player)
            {
                if (m_Players == null)
                {
                    m_Players = new List <Mobile>();
                    m_Owner.ActivateSectors(m_X, m_Y);
                }

                m_Players.Add(m);
            }
        }
コード例 #2
0
        public void OnEnter(Mobile mob)
        {
            Add(ref m_Mobiles, mob);

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

                Add(ref m_Players, mob);
            }

            /*if (mob.Player || mob.NetState != null)
             * {
             *                  if ( m_Players == null ) {
             *                          m_Owner.ActivateSectors( m_X, m_Y );
             *                  }
             *
             *                  Add( ref m_Players, mob );
             *          }*/
        }
コード例 #3
0
ファイル: Sector.cs プロジェクト: twiztedpsycho1/JustUO
        public void OnEnter(Mobile mob)
        {
            Add(ref m_Mobiles, mob);

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

            if (mob.Player)
            {
                if (m_Players == null)
                {
                    m_Owner.ActivateSectors(m_X, m_Y);
                }

                Add(ref m_Players, mob);
            }
        }