Ejemplo n.º 1
0
		/// <summary>
		/// The pending period has timed out and the auction must end unsuccesfully
		/// </summary>
		public void PendingTimeOut()
		{
			AuctionSystem.Pending.Remove( this );

			m_OwnerPendency = AuctionPendency.NotAccepted;
			m_BuyerPendency = AuctionPendency.NotAccepted;
			m_OwnerMessage = AuctionMessage.None;
			m_BuyerMessage = AuctionMessage.None;

			AuctionCheck item = new AuctionItemCheck( this, AuctionResult.PendingTimedOut );
			AuctionCheck gold = new AuctionGoldCheck( this, AuctionResult.PendingTimedOut );

			if ( item != null )
				GiveItemTo( m_Owner, item );
			GiveItemTo( HighestBid.Mobile, gold );

			// Over, this auction no longer exists
			AuctionLog.WriteEnd( this, AuctionResult.PendingTimedOut, null, null );
		}
Ejemplo n.º 2
0
		/// <summary>
		/// Defines what kind of message the buyer should receive. Doesn't send any messages.
		/// </summary>
		public void DoBuyerMessage()
		{
			if ( HighestBid.Mobile == null || HighestBid.Mobile.Account == null )
			{
				// Buyer deleted the character, accept the auction by default
				m_BuyerPendency = AuctionPendency.Accepted;
			}
			else if ( ! IsValid() )
			{
				// Send the buyer a message about missing items in the auction
				m_BuyerMessage = AuctionMessage.Response;
				m_BuyerPendency = AuctionPendency.Pending;
			}
			else if ( !ReserveMet )
			{
				// Assume the buyer will buy even if the reserve hasn't been met
				m_BuyerPendency = AuctionPendency.Accepted;
				// Send the buyer a message to inform them of the reserve issue
				m_BuyerMessage = AuctionMessage.Information;
			}
		}
Ejemplo n.º 3
0
		/// <summary>
		/// Confirms an information message
		/// </summary>
		/// <param name="owner">True if the message was sent to the owner, false if to the buyer</param>
		public void ConfirmInformationMessage( bool owner )
		{
			if ( owner )
			{
				// Owner
				m_OwnerMessage = AuctionMessage.None; // Don't resent
			}
			else
			{
				// Buyer
				m_BuyerMessage = AuctionMessage.None;
			}
		}
Ejemplo n.º 4
0
		/// <summary>
		/// Defines what kind of message the auction owner should receive. Doesn't send any messages.
		/// </summary>
		public void DoOwnerMessage()
		{
			if ( m_Owner == null || m_Owner.Account == null )
			{
				// If owner deleted the character, accept the auction by default
				m_OwnerPendency = AuctionPendency.Accepted;
			}
			else if ( !IsValid() && ReserveMet )
			{
				// Assume the owner will sell even if invalid when reserve is met
				m_OwnerPendency = AuctionPendency.Accepted;
			}
			else if ( !ReserveMet )
			{
				m_OwnerPendency = AuctionPendency.Pending;
				m_OwnerMessage = AuctionMessage.Response; // This is always reserve not met for the owner
			}
			else if ( !IsValid() )
			{
				m_OwnerPendency = AuctionPendency.Accepted;
				m_OwnerMessage = AuctionMessage.Information; // This is always about validty for the owner
			}
		}