本文整理汇总了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.");
}