public void Purchase_Callback( Mobile from, bool okay, object state )
{
if ( Deleted || !from.CheckAlive() || HasEntered( from ) || IsAtIPLimit( from ) )
return;
Account acc = from.Account as Account;
if ( acc == null )
return;
if ( okay )
{
Container bank = from.FindBankNoCreate();
if ( m_TicketPrice == 0 || ( from.Backpack != null && from.Backpack.ConsumeTotal( typeof( Gold ), m_TicketPrice ) ) || ( bank != null && bank.ConsumeTotal( typeof( Gold ), m_TicketPrice ) ) )
{
m_Entries.Add( new RaffleEntry( from ) );
from.SendMessage( MessageHue, "You have successfully entered the plot's raffle." );
}
else
{
from.SendMessage( MessageHue, "You do not have the {0} required to enter the raffle.", FormatPrice() );
}
}
else
{
from.SendMessage( MessageHue, "You have chosen not to enter the raffle." );
}
}