Exemple #1
0
        public override void OnExit(PvPRegion region, Mobile m)
        {
            base.OnExit(region, m);

            if (!(region is PvPBattleRegion))
            {
                return;
            }

            if (Crystal != null && !Crystal.Deleted && Crystal.Carrier == m)
            {
                Crystal.Reset();
            }
        }
 public PvPStone() : base(0xEDC)
 {
     Name                    = "PvP Stone Event Stone";
     Movable                 = false;
     Visible                 = true;
     m_EventRate             = TimeSpan.FromHours(6.0);
     m_StartLocation         = new Point3D(0, 0, 0);
     m_LostLocation          = new Point3D(0, 0, 0);
     m_DuelLocation1         = new Point3D(0, 0, 0);
     m_DuelLocation2         = new Point3D(0, 0, 0);
     m_LastEvent             = DateTime.Now;
     m_DuelingArea           = new Rectangle2D(0, 0, 0, 0);
     m_StageingArea          = new Rectangle2D(0, 0, 0, 0);
     m_ViewingArea           = new Rectangle2D(0, 0, 0, 0);
     m_CurrentBroadCastTicks = 0;
     m_Running               = false;
     m_AcceptingPlayers      = false;
     m_MapLocation           = Map.Felucca;
     m_CurrentRound          = 0;
     m_TotalParticipants     = 0;
     m_DuelList              = new List <Mobile>();
     m_CurrentDuelers        = new List <Mobile>();
     m_BroadcastHue          = 269;
     m_BroadcastList         = new List <Mobile>();
     m_WallMidPoint          = new Point3D(0, 0, 0);
     m_WallExtendWidth       = 3;
     m_WallNorthToSouth      = true;
     m_WallList              = new List <Item>();
     m_WallID                = 0x0081;
     m_WallHue               = 0;
     m_CountDown             = 0;
     m_CoinsPerRound         = 2;
     m_CoinsWinner           = 10;
     m_RestartTimer          = new InternalTimer(this, TimeSpan.FromSeconds(1.0));
     m_TimerEnabled          = false;
     m_LastReset             = DateTime.Now;
     Rectangle2D[] m_Rects = new Rectangle2D[] { m_DuelingArea };
     PvPRegion         = new PvPRegion(this, "The Pit", this.Map, m_Rects);
     m_Rects           = new Rectangle2D[] { m_ViewingArea };
     SpectatorRegion   = new PvPStagingRegion(this, "Spectators", this.Map, m_Rects);
     m_Rects           = new Rectangle2D[] { m_StageingArea };
     ParticipateRegion = new PvPStagingRegion(this, "Gladiators", this.Map, m_Rects);
     UpdateRegions(false);
     m_MinimumDuelers = 4;
 }
        /// <summary>
        /// Update the regions so everything works as it should.
        /// </summary>
        /// <param name="Unregister"></param>
        public void UpdateRegions(bool Unregister)
        {
            if (Unregister)
            {
                PvPRegion.Unregister();
                SpectatorRegion.Unregister();
                ParticipateRegion.Unregister();
            }
            Rectangle2D[] m_Rects = new Rectangle2D[] { m_DuelingArea };
            PvPRegion         = new PvPRegion(this, "The Pit", this.Map, m_Rects);
            m_Rects           = new Rectangle2D[] { m_ViewingArea };
            SpectatorRegion   = new PvPStagingRegion(this, "Spectators", this.Map, m_Rects);
            m_Rects           = new Rectangle2D[] { m_StageingArea };
            ParticipateRegion = new PvPStagingRegion(this, "Gladiators", this.Map, m_Rects);

            PvPRegion.Register();
            SpectatorRegion.Register();
            ParticipateRegion.Register();
        }
Exemple #4
0
		public override void OnExit(PvPRegion region, Mobile m)
		{
			base.OnExit(region, m);

			if (!(region is PvPBattleRegion))
			{
				return;
			}

			if (Crystal != null && !Crystal.Deleted && Crystal.Carrier == m)
			{
				Crystal.Reset();
			}
		}