當前位置: 首頁>>代碼示例>>C#>>正文


C# BagOfNecroReagents.Delete方法代碼示例

本文整理匯總了C#中Server.Items.BagOfNecroReagents.Delete方法的典型用法代碼示例。如果您正苦於以下問題:C# BagOfNecroReagents.Delete方法的具體用法?C# BagOfNecroReagents.Delete怎麽用?C# BagOfNecroReagents.Delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Server.Items.BagOfNecroReagents的用法示例。


在下文中一共展示了BagOfNecroReagents.Delete方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: PackBag

		public void PackBag( Mobile from )
		{
			BagOfNecroReagents bag = new BagOfNecroReagents( AmountOfRegs );
			bag.Hue = this.Hue;
			
			if ( !from.AddToBackpack( bag ) )
				bag.Delete();
		}
開發者ID:ITLongwell,項目名稱:aedilis2server,代碼行數:8,代碼來源:NecroRegStone.cs

示例2: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			Container pack = from.Backpack;
			
			if ( pack != null && pack.ConsumeTotal( typeof( Gold ), 3200) )
			{
			BagOfNecroReagents necBag = new BagOfNecroReagents( 40 );

			if ( !from.AddToBackpack( necBag ) )
				necBag.Delete();
		}
			else
			{
				from.SendMessage( 0XAD, "You need at least 3200gp in your backpack to use this." );
			}
		}
開發者ID:greeduomacro,項目名稱:dragonknights-uo,代碼行數:16,代碼來源:necrostone.cs

示例3: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			Container pack = from.Backpack;
			if ( pack.ConsumeTotal( typeof( Gold ), 1200 ) )
			{
			BagOfNecroReagents regBag = new BagOfNecroReagents( 50 );

			if ( !from.AddToBackpack( regBag ) )
				regBag.Delete();
			}
			else
			{
			from.SendMessage( "You do not have enough money.");
			}



		}
開發者ID:FreeReign,項目名稱:realmofdarkness,代碼行數:18,代碼來源:NecroRegStone.cs

示例4: OnDoubleClick

        public override void OnDoubleClick( Mobile from )
        {
            Type[] m_Reagents;
            m_Reagents = new Type[5];
            m_Reagents[0] =	Reagent.NoxCrystal;
            m_Reagents[1] =	Reagent.GraveDust;
            m_Reagents[2] =	Reagent.PigIron;
            m_Reagents[3] =	Reagent.BatWing;
            m_Reagents[4] =	Reagent.DaemonBlood;

            int[] m_Amounts;
            m_Amounts = new int[5];
            if (!(m_Amount > 0))
                m_Amount = 30;
            for ( int i = 0; i < 5; ++i )
                m_Amounts[i] = m_Amount;

             			BagOfNecroReagents regBag = new BagOfNecroReagents( m_Amount );
            if ((from.BankBox != null) && (from.BankBox.ConsumeTotal(m_Reagents, m_Amounts) == -1))
            {
                if ( !from.AddToBackpack( regBag ) )
                    regBag.Delete();
            } else from.SendMessage("You do not have enough reagents in your bank.");
        }
開發者ID:kamronbatman,項目名稱:Defiance-AOS-Pre-2012,代碼行數:24,代碼來源:NecroRegWithdrawStone.cs


注:本文中的Server.Items.BagOfNecroReagents.Delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。