当前位置: 首页>>代码示例>>C#>>正文


C# BankCheck.Delete方法代码示例

本文整理汇总了C#中Server.Items.BankCheck.Delete方法的典型用法代码示例。如果您正苦于以下问题:C# BankCheck.Delete方法的具体用法?C# BankCheck.Delete怎么用?C# BankCheck.Delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Server.Items.BankCheck的用法示例。


在下文中一共展示了BankCheck.Delete方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			BankBox box = from.BankBox;

			if ( box != null && IsChildOf( box ) )
			{
				PlayerMobile pm = from as PlayerMobile;

				base.OnDoubleClick( from );
				
				BankCheck check;

				if( this.Amount == 1 )
				{
					check = new BankCheck( 1000000 );
					
					this.Delete();

					if ( box.TryDropItem( pm, check, false ) )
					{
						pm.SendMessage("You return your gold bar to the bank and receive a 1,000,000 check.");
					}
					else
					{
						check.Delete();
						pm.AddToBackpack( new BankCheck( 1000000 ) );
						pm.SendMessage("You return your gold bar to the bank and receive a 1,000,000 check.");
					}
				}
				else if( this.Amount >= 2 )
					{
					check = new BankCheck( 1000000 );
                                
					if ( box.TryDropItem( pm, check, false ) )
					{
						this.Amount -= 1;
						pm.SendMessage("You return your gold bar to the bank and receive a 1,000,000 check.");
					}
					else
					{
						check.Delete();
						pm.SendMessage("There is not enough room in your bank box for the check.");
					}
				}
			}
			else
			{
				from.SendLocalizedMessage( 1047026 ); // That must be in your bank box to use it.
			}
		}
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:50,代码来源:GoldBar.cs

示例2: OnSpeech


//.........这里部分代码省略.........
                { 
                        BankBox box = e.Mobile.BankBox; 

                       	if ( box == null || !box.ConsumeTotal( typeof( Gold ), amount ) ) 
                { 
                       	this.Say( 500384 ); // Ah, art thou trying to fool me? Thou hast not so much gold! 
                } 
                else 
               	{ 
                        e.Mobile.AddToBackpack( new Gold( amount ) ); 

                   	this.Say( 1010005 ); // Thou hast withdrawn gold from thy account. 
              	} 
   	}
} 

                     	break; 
              	} 
                  	case 0x0001: // *balance* 
              	{ 
                     	e.Handled = true; 

                     	BankBox box = e.Mobile.BankBox; 

                     	if ( box != null ) 
              	{ 
                        this.Say( String.Format("Thy current bank balance is {0} gold.", box.TotalGold.ToString() ) ); 
              	} 

                     	break; 
               	} 
                  	case 0x0002: // *bank* 
          	{ 
                     	e.Handled = true; 

                     	BankBox box = e.Mobile.BankBox; 

                     	if ( box != null ) 
                        box.Open(); 

                     	break; 
               	} 
                  	case 0x0003: // *check* 
              	{ 
                     	e.Handled = true; 

                   	string[] split = e.Speech.Split( ' ' ); 

                     	if ( split.Length >= 2 ) 
                { 
                        int amount; 

                        try 
          	{ 
                        amount = Convert.ToInt32( split[1] ); 
               	} 
                        catch 
               	{ 
                       	break; 
                } 

                        if ( amount < 5000 ) 
                { 
                      	this.Say( 1010006 ); // We cannot create checks for such a paltry amount of gold! 
             	} 
                       	else if ( amount > 1000000 ) 
           	{ 
                       	this.Say( 1010007 ); // Our policies prevent us from creating checks worth that much! 
              	} 
               	else 
             	{ 
                       	BankCheck check = new BankCheck( amount ); 

                       	BankBox box = e.Mobile.BankBox; 

                     	if ( box == null || !box.TryDropItem( e.Mobile, check, false ) ) 
            	{ 
                       	this.Say( 500386 ); // There's not enough room in your bankbox for the check! 
                      	check.Delete(); 
             	} 
                       	else if ( !box.ConsumeTotal( typeof( Gold ), amount ) ) 
             	{ 
                       	this.Say( 500384 ); // Ah, art thou trying to fool me? Thou hast not so much gold! 
                       	check.Delete(); 
                } 
                else 
                { 
                       	this.Say( String.Format("Into your bank box I have placed a check in the amount of: {0}",  amount.ToString() ) ); 
             	} 
     	} 
} 

                     	break; 
                  	} 
               	} 
  	} 
} 

         		base.OnSpeech( e ); 
      		} 
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:101,代码来源:BankCrystal.cs

示例3: OnSpeech


//.........这里部分代码省略.........

                                    if ( box == null || !box.ConsumeTotal( typeof( Copper ), amount ) )
                                    {
                                        this.Say( "Ah, art thou trying to fool me? Thou hast not so much copper!" );
                                    }
                                    else
                                    {
                                        e.Mobile.AddToBackpack( new Copper( amount ) );

                                        this.Say( "Thou hast withdrawn copper from thy account." );
                                    }
                                }
                            }

                            break;
                        }
                        case 0x0001: // *balance*
                        {
                            e.Handled = true;

                            BankBox box = e.Mobile.BankBox;

                            if ( box != null )
                            {
                                this.Say( "Thy current bank balance is " + box.TotalGold.ToString() + " copper." );
                            }

                            break;
                        }
                        case 0x0002: // *bank*
                        {
                            e.Handled = true;

                            BankBox box = e.Mobile.BankBox;

                            PlayerMobile pm = e.Mobile as PlayerMobile;

                            if ( box != null )
                                box.Open();

                            break;
                        }
                        case 0x0003: // *check*
                        {
                            e.Handled = true;

                            string[] split = e.Speech.Split( ' ' );

                            if ( split.Length >= 2 )
                            {
                                int amount;

                                try
                                {
                                    amount = Convert.ToInt32( split[1] );
                                }
                                catch
                                {
                                    break;
                                }

                                if ( amount < 5000 )
                                {
                                    this.Say( "We cannot create checks for such a paltry amount of copper!" ); //
                                }
                                else if ( amount > 1000000 )
                                {
                                    this.Say( 1010007 ); // Our policies prevent us from creating checks worth that much!
                                }
                                else
                                {
                                    BankCheck check = new BankCheck( amount );

                                    BankBox box = e.Mobile.BankBox;

                                    if ( box == null || !box.TryDropItem( e.Mobile, check, false ) )
                                    {
                                        this.Say( 500386 ); // There's not enough room in your bankbox for the check!
                                        check.Delete();
                                    }
                                    else if ( !box.ConsumeTotal( typeof( Copper ), amount ) )
                                    {
                                        this.Say( "Ah, art thou trying to fool me? Thou hast not so much copper!" ); //
                                        check.Delete();
                                    }
                                    else
                                    {
                                        this.Say( 1042673, AffixType.Append, amount.ToString(), "" ); // Into your bank box I have placed a check in the amount of:
                                    }
                                }
                            }

                            break;
                        }
                    }
                }
            }

            base.OnSpeech( e );
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:101,代码来源:Banker.cs

示例4: HandleSpeech

	    public static void HandleSpeech(Mobile vendor, SpeechEventArgs e)
	    {
			if (!e.Handled && e.Mobile.InRange(vendor, 12))
			{
				foreach (var keyword in e.Keywords)
				{
					switch (keyword)
					{
						case 0x0000: // *withdraw*
							{
								e.Handled = true;

								if (e.Mobile.Criminal)
								{
									// I will not do business with a criminal!
									vendor.Say(500389);
									break;
								}

								var split = e.Speech.Split(' ');

								if (split.Length >= 2)
								{
									int amount;

									var pack = e.Mobile.Backpack;

									if (!int.TryParse(split[1], out amount))
									{
										break;
									}

									if ((!Core.ML && amount > 5000) || (Core.ML && amount > 60000))
									{
										// Thou canst not withdraw so much at one time!
										vendor.Say(500381);
									}
									else if (pack == null || pack.Deleted || !(pack.TotalWeight < pack.MaxWeight) ||
											 !(pack.TotalItems < pack.MaxItems))
									{
										// Your backpack can't hold anything else.
										vendor.Say(1048147);
									}
									else if (amount > 0)
									{
										var box = e.Mobile.FindBankNoCreate();

										if (box == null || !Withdraw(e.Mobile, amount))
										{
											// Ah, art thou trying to fool me? Thou hast not so much gold!
											vendor.Say(500384);
										}
										else
										{
											pack.DropItem(new Gold(amount));

											// Thou hast withdrawn gold from thy account.
											vendor.Say(1010005);
										}
									}
								}
							}
							break;
						case 0x0001: // *balance*
							{
								e.Handled = true;

								if (e.Mobile.Criminal)
								{
									// I will not do business with a criminal!
									vendor.Say(500389);
									break;
								}

								if (AccountGold.Enabled && e.Mobile.Account != null)
								{
									vendor.Say(
										"Thy current bank balance is {0:#,0} platinum and {1:#,0} gold.",
										e.Mobile.Account.TotalPlat,
										e.Mobile.Account.TotalGold);
								}
								else
								{
									// Thy current bank balance is ~1_AMOUNT~ gold.
									vendor.Say(1042759, GetBalance(e.Mobile).ToString("#,0"));
								}
							}
							break;
						case 0x0002: // *bank*
							{
								e.Handled = true;

								if (e.Mobile.Criminal)
								{
									// Thou art a criminal and cannot access thy bank box.
									vendor.Say(500378);
									break;
								}

								e.Mobile.BankBox.Open();
//.........这里部分代码省略.........
开发者ID:aj9251,项目名称:ServUO,代码行数:101,代码来源:Banker.cs

示例5: GiveGold

        /// <summary>
        /// award coins to the player
        /// </summary>
        /// <param name="m">player to give coins too</param>
        /// <param name="tourneywinner">is this the tourney winner</param>
        public void GiveGold(Mobile m, bool tourneywinner)
        {
            //set up coin amount based on round and if they are the tourney winner
            int total = tourneywinner ? m_CoinsPerRound * m_CurrentRound + m_CoinsWinner : m_CoinsPerRound * m_CurrentRound;

            //create a floating set of coins
            BankCheck check = new BankCheck( total );

            //if the players pack is full, delete the floating coins
            if (!m.AddToBackpack(check))
            {
                check.Delete();
            }
        }
开发者ID:greeduomacro,项目名称:DimensionsNewAge,代码行数:19,代码来源:PvPStone.cs

示例6: OnSpeech

		public override void OnSpeech( SpeechEventArgs e )
		{
			if ( !e.Handled && e.Mobile.InRange( this.Location, 12 ) )
			{
				for ( int i = 0; i < e.Keywords.Length; ++i )
				{
					int keyword = e.Keywords[i];

					switch ( keyword )
					{
						case 0x0000: // *withdraw*
						{
							e.Handled = true;

							if ( e.Mobile.Criminal )
							{
								this.Say( 500389 ); // I will not do business with a criminal!
								break;
							}

							string[] split = e.Speech.Split( ' ' );

							if ( split.Length >= 2 )
							{
								int amount;

								Container pack = e.Mobile.Backpack;

                                if ( !int.TryParse( split[1], out amount ) )
                                    break;

								if ( (!Core.ML && amount > 5000) || (Core.ML && amount > 60000) )
								{
									this.Say( 500381 ); // Thou canst not withdraw so much at one time!
								}
								else if (pack == null || pack.Deleted || !(pack.TotalWeight < pack.MaxWeight) || !(pack.TotalItems < pack.MaxItems))
								{
									this.Say(1048147); // Your backpack can't hold anything else.
								}
								else if ( amount > 0 )
								{
									BankBox box = e.Mobile.FindBankNoCreate();

									if ( box == null || !box.ConsumeTotal( typeof( Gold ), amount ) )
									{
										this.Say( 500384 ); // Ah, art thou trying to fool me? Thou hast not so much gold!
									}
									else
									{
										pack.DropItem(new Gold(amount));

										this.Say( 1010005 ); // Thou hast withdrawn gold from thy account.
									}
								}
							}

							break;
						}
						case 0x0001: // *balance*
						{
							e.Handled = true;

							if ( e.Mobile.Criminal )
							{
								this.Say( 500389 ); // I will not do business with a criminal!
								break;
							}

							BankBox box = e.Mobile.FindBankNoCreate();

							if ( box != null )
								this.Say( 1042759, box.TotalGold.ToString() ); // Thy current bank balance is ~1_AMOUNT~ gold.
							else
								this.Say( 1042759, "0" ); // Thy current bank balance is ~1_AMOUNT~ gold.

							break;
						}
						case 0x0002: // *bank*
						{
							e.Handled = true;

							if ( e.Mobile.Criminal )
							{
								this.Say( 500378 ); // Thou art a criminal and cannot access thy bank box.
								break;
							}

							e.Mobile.BankBox.Open();

							break;
						}
						case 0x0003: // *check*
						{
							e.Handled = true;

							if ( e.Mobile.Criminal )
							{
								this.Say( 500389 ); // I will not do business with a criminal!
								break;
							}
//.........这里部分代码省略.........
开发者ID:romeov007,项目名称:imagine-uo,代码行数:101,代码来源:Banker.cs

示例7: OnSpeech

		public override void OnSpeech(SpeechEventArgs e)
		{
			Mobile m = e.Mobile;

			if (XmlScript.HasTrigger(this, TriggerName.onSpeech) &&
				UberScriptTriggers.Trigger(this, e.Mobile, TriggerName.onSpeech, null, e.Speech))
			{
				return;
			}

			if (!e.Handled && m.InRange(Location, 12))
			{
				string speech = e.Speech.Trim().ToLower();

				if (e.HasKeyword(0x00)) // *withdraw*
				{
					e.Handled = true;

					if (!CheckVendorAccess(m))
					{
						Say(500389); // I will not do business with a criminal!
					}
					else
					{
						string[] split = e.Speech.Split(' ');

						if (split.Length >= 2)
						{
							int amount;

							Container pack = m.Backpack;

							if (Int32.TryParse(split[1], out amount))
							{
								if (amount > 60000)
								{
									Say(500381); // Thou canst not withdraw so much at one time!
								}
								else if (amount > 0)
								{
									BankBox box = m.FindBankNoCreate();

									if (box == null || !WithdrawCredit(m, TypeOfCurrency, amount))
									{
										Say("Ah, art thou trying to fool me? Thou hast not so much {0}!", TypeOfCurrency.Name);
									}
									else
									{
										Item currency = TypeOfCurrency.CreateInstanceSafe<Item>();

										currency.Stackable = true;
										currency.Amount = amount;

										if (pack != null && !pack.Deleted && pack.TryDropItem(m, currency, false))
										{
											Say("Thou hast withdrawn {0} from thy account.", TypeOfCurrency.Name);
											//Say(1010005); // Thou hast withdrawn gold from thy account.
										}
										else
										{
											currency.Delete();

											box.Credit += (ulong)amount;

											Say(1048147); // Your backpack can't hold anything else.
										}
									}
								}
							}
						}
					}
				}
				else if (e.HasKeyword(0x01)) // *balance*
				{
					e.Handled = true;

					if (!CheckVendorAccess(m))
					{
						Say(500389); // I will not do business with a criminal!
					}
					else
					{
						BankBox box = m.FindBankNoCreate();

						if (box != null)
						{
							Say("Thy current bank balance is {0:#,0} {1}.", (ulong)GetBalance(m, TypeOfCurrency) + box.Credit, TypeOfCurrency.Name);
						}
						else
						{
							Say("Thy current bank balance is 0 {0}.", TypeOfCurrency.Name);
						}
					}
				}
				else if (e.HasKeyword(0x02)) // *bank*
				{
					e.Handled = true;

					if (!CheckVendorAccess(m))
					{
//.........这里部分代码省略.........
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:101,代码来源:Banker.cs

示例8: OnSpeech


//.........这里部分代码省略.........
								if (e.Mobile is PlayerMobile)
								{
									PlayerMobile pm = e.Mobile as PlayerMobile;

									if (DateTime.Now - pm.LastStoleAt < TimeSpan.FromMinutes(2))
									{
										this.Say(500378); // Thou art a criminal and cannot access thy bank box.
										break;
									}

									//check that we're not actively involved in a fight:
                                    bool bBreak = false;
									for (int a = 0; a < pm.Aggressed.Count; a++)
									{
										AggressorInfo info = (AggressorInfo)pm.Aggressed[a];
                                        if (!info.Expired)
                                        {
                                            if (info.Attacker == pm && info.Defender is PlayerMobile)
                                            {
                                                this.Say("You seem to be busy to bank, come back when you're not fighting.");
                                                bBreak = true;
                                                break;
                                            }
                                        }
									}
                                    if (bBreak) break;
									
								}
							}
							BankBox box = e.Mobile.BankBox;

							if ( box != null )
								box.Open();

							break;
						}
						case 0x0003: // *check*
						{
							e.Handled = true;

							if ( e.Mobile.Criminal )
							{
								this.Say( 500389 ); // I will not do business with a criminal!
								break;
							}

							string[] split = e.Speech.Split( ' ' );

							if ( split.Length >= 2 )
							{
								int amount;

								try
								{
									amount = Convert.ToInt32( split[1] );
								}
								catch
								{
									break;
								}

								if ( amount < 5000 )
								{
									this.Say( 1010006 ); // We cannot create checks for such a paltry amount of gold!
								}
								else if ( amount > 1000000 )
								{
									this.Say( 1010007 ); // Our policies prevent us from creating checks worth that much!
								}
								else
								{
									BankCheck check = new BankCheck( amount );

									BankBox box = e.Mobile.BankBox;

									if ( box == null || !box.TryDropItem( e.Mobile, check, false ) )
									{
										this.Say( 500386 ); // There's not enough room in your bankbox for the check!
										check.Delete();
									}
									else if ( !box.ConsumeTotal( typeof( Gold ), amount ) )
									{
										this.Say( 500384 ); // Ah, art thou trying to fool me? Thou hast not so much gold!
										check.Delete();
									}
									else
									{
										this.Say( 1042673, AffixType.Append, amount.ToString(), "" ); // Into your bank box I have placed a check in the amount of:
									}
								}
							}

							break;
						}
					}
				}
			}

			base.OnSpeech( e );
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:101,代码来源:Banker.cs

示例9: CashCheck

		public static void CashCheck(Mobile from, BankCheck check)
		{
			BankBox box = from.BankBox;

			if (box != null)
			{
				int deposited = 0;
				int toAdd = check.Worth;

				check.Delete();
				Gold gold;

				while (toAdd > 60000)
				{
					gold = new Gold(60000);

					if (box.TryDropItem(from, gold, false))
					{
						toAdd -= 60000;
						deposited += 60000;
					}
					else
					{
						gold.Delete();

						from.AddToBackpack(new BankCheck(toAdd));
						toAdd = 0;

						break;
					}
				}

				if (toAdd > 0)
				{
					gold = new Gold(toAdd);

					if (box.TryDropItem(from, gold, false))
					{
						deposited += toAdd;
					}
					else
					{
						gold.Delete();

						from.AddToBackpack(new BankCheck(toAdd));
					}
				}
			}
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:49,代码来源:Banker.cs

示例10: OnSpeech


//.........这里部分代码省略.........
                            e.Handled = true;

                            if ( e.Mobile.Criminal && !(this is CriminalBanker))
                            {
                                this.Say( 500389 ); // I will not do business with a criminal!
                                break;
                            }

                            //Added by Blady - Gold + Checks will be displayed in the Lost Lands.
                            if (SpellHelper.IsFeluccaT2A(e.Mobile.Map, e.Mobile.Location) || ( e.Mobile.Region != null && e.Mobile.Region.IsPartOf( "Khaldun" ) ) )
                            {
                                this.Say( 1042759, GetBalance(e.Mobile).ToString() ); // Thy current bank balance is ~1_AMOUNT~ gold.
                                break;
                            }

                            BankBox box = e.Mobile.FindBankNoCreate();
                            if ( box != null )
                                this.Say( 1042759, box.TotalGold.ToString() ); // Thy current bank balance is ~1_AMOUNT~ gold.
                            else
                                this.Say( 1042759, "0" ); // Thy current bank balance is ~1_AMOUNT~ gold.

                            break;
                        }
                        case 0x0002: // *bank*
                        {
                            e.Handled = true;

                            if (SpellHelper.IsFeluccaT2A(e.Mobile.Map, e.Mobile.Location) || ( e.Mobile.Region != null && e.Mobile.Region.IsPartOf( "Khaldun" ) ) )
                            {
                                this.Say("You do not have access to your bank box here. You should say \"balance\", \"withdraw\" or \"deposit\"");
                                break;
                            }
                            if ( e.Mobile.Criminal && !(this is CriminalBanker) )
                            {
                                this.Say( 500378 ); // Thou art a criminal and cannot access thy bank box.
                                break;
                            }

                            e.Mobile.BankBox.Open();

                            break;
                        }
                        case 0x0003: // *check*
                        {
                            e.Handled = true;

                            if ( e.Mobile.Criminal && !(this is CriminalBanker))
                            {
                                this.Say( 500389 ); // I will not do business with a criminal!
                                break;
                            }

                            string[] split = e.Speech.Split( ' ' );

                            if ( split.Length >= 2 )
                            {
                                int amount;

                                if ( !int.TryParse( split[1], out amount ) )
                                    break;

                                if ( amount < 5000 )
                                {
                                    this.Say( 1010006 ); // We cannot create checks for such a paltry amount of gold!
                                }
                                else if ( amount > 1000000 )
                                {
                                    this.Say( 1010007 ); // Our policies prevent us from creating checks worth that much!
                                }
                                else
                                {
                                    BankCheck check = new BankCheck( amount );

                                    BankBox box = e.Mobile.BankBox;

                                    if ( !box.TryDropItem( e.Mobile, check, false ) )
                                    {
                                        this.Say( 500386 ); // There's not enough room in your bankbox for the check!
                                        check.Delete();
                                    }
                                    else if ( !box.ConsumeTotal( typeof( Gold ), amount ) )
                                    {
                                        this.Say( 500384 ); // Ah, art thou trying to fool me? Thou hast not so much gold!
                                        check.Delete();
                                    }
                                    else
                                    {
                                        this.Say( 1042673, AffixType.Append, amount.ToString(), "" ); // Into your bank box I have placed a check in the amount of:
                                    }
                                }
                            }

                            break;
                        }
                    }
                }
            }

            base.OnSpeech( e );
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:101,代码来源:Banker.cs

示例11: OnSpeech


//.........这里部分代码省略.........

                            break;
                        }
                        case 0x0001: // *balance*
                        {
                            e.Handled = true;

                            if (e.Mobile.Criminal || murderer)
                            {
                                this.Say( 500389 ); // I will not do business with a criminal!
                                break;
                            }

                            BankBox box = e.Mobile.FindBankNoCreate();

                            if ( box != null )
                                this.Say( 1042759, box.TotalGold.ToString() ); // Thy current bank balance is ~1_AMOUNT~ gold.
                            else
                                this.Say( 1042759, "0" ); // Thy current bank balance is ~1_AMOUNT~ gold.

                            break;
                        }
                        case 0x0002: // *bank*
                        {
                            e.Handled = true;

                            if (e.Mobile.Criminal || murderer)
                            {
                                this.Say( 500378 ); // Thou art a criminal and cannot access thy bank box.
                                break;
                            }

                            e.Mobile.BankBox.Open();

                            break;
                        }
                        case 0x0003: // *check*
                        {
                            e.Handled = true;

                            if (e.Mobile.Criminal || murderer)
                            {
                                this.Say( 500389 ); // I will not do business with a criminal!
                                break;
                            }

                            string[] split = e.Speech.Split( ' ' );

                            if ( split.Length >= 2 )
                            {
                                int amount;

                                try
                                {
                                    amount = Convert.ToInt32( split[1] );
                                }
                                catch
                                {
                                    break;
                                }

                                if ( amount < 5000 )
                                {
                                    this.Say( 1010006 ); // We cannot create checks for such a paltry amount of gold!
                                }
                                else if ( amount > 1000000 )
                                {
                                    this.Say( 1010007 ); // Our policies prevent us from creating checks worth that much!
                                }
                                else
                                {
                                    BankCheck check = new BankCheck( amount );

                                    BankBox box = e.Mobile.BankBox;

                                    if ( !box.TryDropItem( e.Mobile, check, false ) )
                                    {
                                        this.Say( 500386 ); // There's not enough room in your bankbox for the check!
                                        check.Delete();
                                    }
                                    else if ( !box.ConsumeTotal( typeof( Gold ), amount ) )
                                    {
                                        this.Say( 500384 ); // Ah, art thou trying to fool me? Thou hast not so much gold!
                                        check.Delete();
                                    }
                                    else
                                    {
                                        this.Say( 1042673, AffixType.Append, amount.ToString(), "" ); // Into your bank box I have placed a check in the amount of:
                                    }
                                }
                            }

                            break;
                        }
                    }
                }
            }

            base.OnSpeech( e );
        }
开发者ID:greeduomacro,项目名称:divinity,代码行数:101,代码来源:Banker.cs


注:本文中的Server.Items.BankCheck.Delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。