Пример #1
0
        public void Delete()
        {
            Active = false;

            if (m_Region != null)
            {
                m_Region.Unregister();
            }

            m_Region = null;
        }
Пример #2
0
        public void Delete()
        {
            this.Active = false;

            if (this.m_Region != null)
            {
                this.m_Region.Unregister();
            }

            this.m_Region = null;
        }
Пример #3
0
		public Arena( GenericReader reader )
		{
			int version = reader.ReadEncodedInt();

			switch ( version )
			{
				case 7:
				{
					m_IsGuarded = reader.ReadBool();

					goto case 6;
				}
				case 6:
				{
					m_Ladder = reader.ReadItem() as LadderController;

					goto case 5;
				}
				case 5:
				{
					m_Tournament = reader.ReadItem() as TournamentController;
					m_Announcer = reader.ReadMobile();

					goto case 4;
				}
				case 4:
				{
					m_Name = reader.ReadString();

					goto case 3;
				}
				case 3:
				{
					m_Zone = reader.ReadRect2D();

					goto case 2;
				}
				case 2:
				{
					m_GateIn = reader.ReadPoint3D();
					m_GateOut = reader.ReadPoint3D();
					m_Teleporter = reader.ReadItem();

					goto case 1;
				}
				case 1:
				{
					m_Players = reader.ReadStrongMobileList();

					goto case 0;
				}
				case 0:
				{
					m_Facet = reader.ReadMap();
					m_Bounds = reader.ReadRect2D();
					m_Outside = reader.ReadPoint3D();
					m_Wall = reader.ReadPoint3D();

					if ( version == 0 )
					{
						reader.ReadBool();
						m_Players = new List<Mobile>();
					}

					m_Active = reader.ReadBool();
					m_Points = new ArenaStartPoints( reader );

					if ( m_Active )
					{
						m_Arenas.Add( this );
						m_Arenas.Sort();
					}

					break;
				}
			}

			if ( m_Zone.Start != Point2D.Zero && m_Zone.End != Point2D.Zero && m_Facet != null )
				m_Region = new SafeZone( m_Zone, m_Outside, m_Facet, m_IsGuarded );

			if ( IsOccupied )
				Timer.DelayCall( TimeSpan.FromSeconds( 2.0 ), new TimerCallback( Evict ) );

			if ( m_Tournament != null )
				Timer.DelayCall( TimeSpan.Zero, new TimerCallback( AttachToTournament_Sandbox ) );
		}
Пример #4
0
		public void Delete()
		{
			 Active = false;

			 if ( m_Region != null )
				 m_Region.Unregister();

			 m_Region = null;
		}
Пример #5
0
        public Arena(GenericReader reader)
        {
            int version = reader.ReadEncodedInt();

            switch (version)
            {
            case 6:
            {
                m_Ladder = reader.ReadItem() as LadderController;

                goto case 5;
            }

            case 5:
            {
                m_Tournament = reader.ReadItem() as TournamentController;
                m_Announcer  = reader.ReadMobile();

                goto case 4;
            }

            case 4:
            {
                m_Name = reader.ReadString();

                goto case 3;
            }

            case 3:
            {
                m_Zone = reader.ReadRect2D();

                goto case 2;
            }

            case 2:
            {
                m_GateIn     = reader.ReadPoint3D();
                m_GateOut    = reader.ReadPoint3D();
                m_Teleporter = reader.ReadItem();

                goto case 1;
            }

            case 1:
            {
                m_Players = reader.ReadMobileList();

                goto case 0;
            }

            case 0:
            {
                m_Facet   = reader.ReadMap();
                m_Bounds  = reader.ReadRect2D();
                m_Outside = reader.ReadPoint3D();
                m_Wall    = reader.ReadPoint3D();

                if (version == 0)
                {
                    reader.ReadBool();
                    m_Players = new ArrayList();
                }

                m_Active = reader.ReadBool();
                m_Points = new ArenaStartPoints(reader);

                if (m_Active)
                {
                    m_Arenas.Add(this);
                    m_Arenas.Sort();
                }

                break;
            }
            }

            if (m_Zone.Start != Point2D.Zero && m_Zone.End != Point2D.Zero && m_Facet != null)
            {
                m_Region = new SafeZone(m_Zone, m_Outside, m_Facet);
            }

            if (IsOccupied)
            {
                Timer.DelayCall(TimeSpan.FromSeconds(2.0), new TimerCallback(Evict));
            }

            if (m_Tournament != null)
            {
                Timer.DelayCall(TimeSpan.Zero, new TimerCallback(AttachToTournament_Sandbox));
            }
        }
Пример #6
0
        public void Delete()
        {
            this.Active = false;

            if (this.m_Region != null)
                this.m_Region.Unregister();

            this.m_Region = null;
        }