本文整理汇总了C#中Server.Item.SendPropertiesTo方法的典型用法代码示例。如果您正苦于以下问题:C# Item.SendPropertiesTo方法的具体用法?C# Item.SendPropertiesTo怎么用?C# Item.SendPropertiesTo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Item
的用法示例。
在下文中一共展示了Item.SendPropertiesTo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckTrade
public override bool CheckTrade( Mobile to, Item item, SecureTradeContainer cont, bool message, bool checkItems, int plusItems, int plusWeight )
{
int msgNum = 0;
if ( cont == null )
{
if ( to.Holding != null )
msgNum = 1062727; // You cannot trade with someone who is dragging something.
else if ( this.HasTrade )
msgNum = 1062781; // You are already trading with someone else!
else if ( to.HasTrade )
msgNum = 1062779; // That person is already involved in a trade
}
if ( msgNum == 0 )
{
if ( cont != null )
{
plusItems += cont.TotalItems;
plusWeight += cont.TotalWeight;
}
if ( this.Backpack == null || !this.Backpack.CheckHold( this, item, false, checkItems, plusItems, plusWeight ) )
msgNum = 1004040; // You would not be able to hold this if the trade failed.
else if ( to.Backpack == null || !to.Backpack.CheckHold( to, item, false, checkItems, plusItems, plusWeight ) )
msgNum = 1004039; // The recipient of this trade would not be able to carry this.
else
msgNum = CheckContentForTrade( item );
}
if ( msgNum != 0 )
{
if ( message )
this.SendLocalizedMessage( msgNum );
return false;
}
item.SendPropertiesTo( to );
return true;
}