本文整理匯總了C#中Server.Items.Item.Consume方法的典型用法代碼示例。如果您正苦於以下問題:C# Item.Consume方法的具體用法?C# Item.Consume怎麽用?C# Item.Consume使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Server.Items.Item
的用法示例。
在下文中一共展示了Item.Consume方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: OnDragDrop
public override bool OnDragDrop( Mobile from, Item dropped )
{
if ( dropped is BlankScroll && UzeraanTurmoilQuest.HasLostScrollOfPower( from ) )
{
FocusTo( from );
Item scroll = new SchmendrickScrollOfPower();
if ( !from.PlaceInBackpack( scroll ) )
{
scroll.Delete();
from.SendLocalizedMessage( 1046260 ); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
return false;
}
else
{
dropped.Consume();
from.SendLocalizedMessage( 1049346 ); // Schmendrick scribbles on the scroll for a few moments and hands you the finished product.
return dropped.Deleted;
}
}
return base.OnDragDrop( from, dropped );
}