本文整理汇总了C#中Server.Items.Bandage.MoveToWorld方法的典型用法代码示例。如果您正苦于以下问题:C# Bandage.MoveToWorld方法的具体用法?C# Bandage.MoveToWorld怎么用?C# Bandage.MoveToWorld使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Items.Bandage
的用法示例。
在下文中一共展示了Bandage.MoveToWorld方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GiveRewards
public override void GiveRewards()
{
//Random gold amount to add
BankCheck gold = new BankCheck( Utility.RandomMinMax( 200, 300 ) );
if( !Owner.AddToBackpack( gold ) )
{
gold.MoveToWorld(Owner.Location,Owner.Map);
}
//Adding Quest Reward Token(s)
for(int x = 0; x < 1; x++)
{
RandomTalisman talisman = new RandomTalisman();
if(!Owner.AddToBackpack( talisman ) )
{
talisman.MoveToWorld(Owner.Location,Owner.Map);
}
}
Item bonusitem;
bonusitem = new Bandage( 10 );
//Adding Bonus Item #1
if(!Owner.AddToBackpack( bonusitem ) )
{
bonusitem.MoveToWorld(Owner.Location,Owner.Map);
}
Item item;
//Add Reward Item #1
item = new AdventurersMachete();
if( item is BaseWeapon )
BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, Utility.RandomMinMax( 1,4 ), 10, 50 );
if( item is BaseArmor )
BaseRunicTool.ApplyAttributesTo((BaseArmor)item, Utility.RandomMinMax( 1,4 ), 10, 50 );
if( item is BaseJewel )
BaseRunicTool.ApplyAttributesTo((BaseJewel)item, Utility.RandomMinMax( 1,4 ), 10, 50 );
if( item is BaseHat )
BaseRunicTool.ApplyAttributesTo((BaseHat)item, Utility.RandomMinMax( 1,4 ), 10, 50 );
if(!Owner.AddToBackpack( item ) )
{
item.MoveToWorld(Owner.Location,Owner.Map);
}
base.GiveRewards();
}
示例2: MessageLocalized
/*public override void OnSingleClick( Mobile from )
{
int number = (Amount == 1) ? 1049124 : 1049123;
from.Send( new MessageLocalized( Serial, ItemID, MessageType.Regular, 0x3B2, 3, number, "", Amount.ToString() ) );
}*/
public bool Scissor( Mobile from, Scissors scissors )
{
if ( Deleted || !from.CanSee( this ) ) return false;
Consume();
Item bandage = new Bandage();
bandage.Hue = Hue;
if (!from.PlaceInBackpack(bandage))
bandage.MoveToWorld(from.Location, from.Map);
//base.ScissorHelper( from, new Bandage(), 1 );
return true;
}