Ejemplo n.º 1
0
        /// <summary>
        /// The guest accepted the game
        /// </summary>
        /// <param name="guest">The player accepting the game</param>
        public void AcceptGame(Mobile guest)
        {
            if (Owner == null)
            {
                guest.SendMessage(0x40, "Your partner canceled the game");
                return;
            }

            m_GameStart = DateTime.Now;
            m_Timer.OnGameStart();

            m_Status = GameStatus.WhiteToMove;

            Guest = guest;

            Owner.CloseGump(typeof(Arya.Chess.StartGameGump));

            m_Board = new BChessboard(m_Black, m_White, m_Z, m_Bounds, this, m_Parent.ChessSet, m_Parent.WhiteHue, m_Parent.BlackHue, m_Parent.WhiteMinorHue, m_Parent.BlackMinorHue, m_Parent.OverrideMinorHue);

            m_MoveTime = DateTime.Now;

            // Create the region
            m_Region = new ChessRegion(m_Parent.Map, this, m_AllowSpectators, m_Bounds, m_Z);
            m_Region.Register();

            SendAllGumps(null, null);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// The guest accepted the game
        /// </summary>
        /// <param name="guest">The player accepting the game</param>
        public void AcceptGame(Mobile guest)
        {
            if (guest == null)
            {
                return;
            }

            if (Owner == null)
            {
                guest.SendMessage(0x40, "Your partner canceled the game");
                return;
            }

            if (m_Timer == null)
            {
                return;
            }

            m_GameStart = DateTime.Now;

            m_Timer.OnGameStart();

            m_Status = GameStatus.WhiteToMove;

            Guest = guest;

            Owner.CloseGump(typeof(Arya.Chess.StartGameGump));

            m_Board = new BChessboard(m_Black, m_White, m_Z, m_Bounds, this, m_Parent.ChessSet, m_Parent.WhiteHue, m_Parent.BlackHue, m_Parent.WhiteMinorHue, m_Parent.BlackMinorHue, m_Parent.OverrideMinorHue);

            m_MoveTime = DateTime.Now;

            Rectangle3D m_NewBounds = Server.Region.ConvertTo3D(m_Bounds);

            Point3D start = m_NewBounds.Start;
            Point3D end   = m_NewBounds.End;

            start.Z = m_Z - 5;
            end.Z   = m_Z + 5;

            m_NewBounds = new Rectangle3D(start, end);

            // Create the region
            m_Region = new ChessRegion(m_Parent.Map, this, m_AllowSpectators, m_Parent.SafeZone, m_NewBounds, m_Z);
            m_Region.Register();

            SendAllGumps(null, null);
        }
Ejemplo n.º 3
0
		/// <summary>
		/// The guest accepted the game
		/// </summary>
		/// <param name="guest">The player accepting the game</param>
		public void AcceptGame( Mobile guest )
		{
            if ( guest == null )
                return;

			if ( Owner == null )
			{
				guest.SendMessage( 0x40, "Your partner canceled the game" );
				return;
			}

            if (m_Timer == null)
                return;

			m_GameStart = DateTime.Now;

    	    m_Timer.OnGameStart();

			m_Status = GameStatus.WhiteToMove;

			Guest = guest;

			Owner.CloseGump( typeof( Arya.Chess.StartGameGump ) );

			m_Board = new BChessboard( m_Black, m_White, m_Z, m_Bounds, this, m_Parent.ChessSet, m_Parent.WhiteHue, m_Parent.BlackHue, m_Parent.WhiteMinorHue, m_Parent.BlackMinorHue, m_Parent.OverrideMinorHue );

			m_MoveTime = DateTime.Now;

            Rectangle3D m_NewBounds = Server.Region.ConvertTo3D(m_Bounds);

		    Point3D start = m_NewBounds.Start;
		    Point3D end = m_NewBounds.End;

            start.Z = m_Z - 5;
            end.Z = m_Z + 5;

            m_NewBounds = new Rectangle3D(start, end);

			// Create the region
            m_Region = new ChessRegion(m_Parent.Map, this, m_AllowSpectators, m_Parent.SafeZone, m_NewBounds, m_Z);
			m_Region.Register();

			SendAllGumps( null, null );
		}
Ejemplo n.º 4
0
		/// <summary>
		/// The guest accepted the game
		/// </summary>
		/// <param name="guest">The player accepting the game</param>
		public void AcceptGame( Mobile guest )
		{
			if ( Owner == null )
			{
				guest.SendMessage( 0x40, "Your partner canceled the game" );
				return;
			}

			m_GameStart = DateTime.Now;
			m_Timer.OnGameStart();

			m_Status = GameStatus.WhiteToMove;

			Guest = guest;

			Owner.CloseGump( typeof( Arya.Chess.StartGameGump ) );

			m_Board = new BChessboard( m_Black, m_White, m_Z, m_Bounds, this, m_Parent.ChessSet, m_Parent.WhiteHue, m_Parent.BlackHue, m_Parent.WhiteMinorHue, m_Parent.BlackMinorHue, m_Parent.OverrideMinorHue );

			m_MoveTime = DateTime.Now;

			// Create the region
			m_Region = new ChessRegion( m_Parent.Map, this, m_AllowSpectators, m_Bounds, m_Z );
			m_Region.Register();

			SendAllGumps( null, null );
		}