本文整理匯總了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();
}
示例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." );
}
}
示例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.");
}
}
示例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.");
}