Exemplo n.º 1
0
		public override void OnDoubleClick(Mobile from)
		{
			if (from == null || from.Deleted || !(from is PlayerMobile))
				return;

			// just in case a bombplacer escapes the game arena...
			if (m_Game == null || m_Game.RegionControler == null ||
				m_Game.RegionControler.MyRegion != from.Region)
			{
				this.Delete();
				return;
			}

			if (!m_Game.Running)
			{
				from.SendMessage("The game has not started yet.");
				return;
			}

			if (m_LastBombPlacement + m_PlacementDelay < DateTime.Now ||
				m_CurrentNumberOfBombs < m_MaxNumberOfBombs)
			{
				BMPlacedBomb bomb = new BMPlacedBomb((PlayerMobile)from, this);
				bomb.MoveToWorld(from.Location, from.Map);
				m_LastBombPlacement = DateTime.Now;
				m_CurrentNumberOfBombs++;
				from.SendMessage("You placed a bomb.");
			}
			else
			{
				from.SendMessage("The bomb isnt ready yet.");
			}
		}
Exemplo n.º 2
0
		public BMbombOnMoveDamager(BMPlacedBomb placedBomb) : base(7194)
		{
			if (placedBomb == null)
				return;

			Visible = false;
			m_PlacedBomb = placedBomb;
			Timer.DelayCall(TimeSpan.FromSeconds(1.2), new TimerCallback(DeleteCallback));
		}