本文整理汇总了C#中Server.Items.Bag.MoveToWorld方法的典型用法代码示例。如果您正苦于以下问题:C# Bag.MoveToWorld方法的具体用法?C# Bag.MoveToWorld怎么用?C# Bag.MoveToWorld使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Items.Bag
的用法示例。
在下文中一共展示了Bag.MoveToWorld方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GiveRewardTo
// /*
// public static void GiveRewardTo( PlayerMobile player )
// {
// player.PlaceInBackpack( new RewardBag() );
// //Item reward = new PowderOfTemperament();
// //player.PlaceInBackpack( reward );
// /*
// //if( Utility.RandomDouble() < 0.95 )
// //{
// player.PlaceInBackpack( new RewardBag() );
// //player.PlaceInBackpack( new BallOfSummoning() );
// //player.PlaceInBackpack( new MidasTouch() );
// //PackItem( new BallOfSummoning() );
// //}
// */
// Map map = player.Map;
// DemonKnight daemon = new DemonKnight();
//
// daemon.MoveToWorld( player.Location, map );
// }*/
public static void GiveRewardTo( PlayerMobile player )
{
Map map = player.Map;
Bag rewardBag = new Bag();
rewardBag.Hue = Utility.RandomDyedHue();
LootPackEntry.AddRandomLoot(rewardBag, 5, 600, 5, 5, 50, 100);
rewardBag.DropItem(new BankCheck( 5000 ));
if (0.08 > Utility.RandomDouble())
rewardBag.DropItem(new TreasureMap(6, Map.Felucca));
else
rewardBag.DropItem(new TreasureMap(Utility.RandomMinMax(3, 5), Map.Felucca));
//Add arty
if (0.1 > Utility.RandomDouble())
{
int rnd = Utility.Random(4);
switch (rnd)
{
case 0: rewardBag.DropItem(new YetisPads()); break; //Yetis pads
case 1: rewardBag.DropItem(new Necronomicon()); break;
case 2: rewardBag.DropItem(new Behemoth()); break;
case 3: rewardBag.DropItem(new DragonClenchingClaws()); break;
//case 4: rewardBag.DropItem(CreatePaladinArmor(typeof(PlateGorget), "Platemail Gorget", Utility.Random(5))); break;
}
if (0.80 > Utility.RandomDouble())
{
rewardBag.DropItem(new MidasTouch());
}
}
else if (0.80 > Utility.RandomDouble())
{
rewardBag.DropItem(new MidasTouch());
}
//player.PlaceInBackpack( rewardBag );
//if(!player.KarmaLocked)
//player.Karma = Math.Min(15000, player.Karma + 1500);
//player.SendMessage( "Reward bag has been placed in your backpack." );
if (player.PlaceInBackpack(rewardBag))
{
//obj.Complete();
player.SendMessage( "Reward bag has been placed in your backpack." );
if (!player.KarmaLocked)
player.Karma = Math.Min(15000, player.Karma + 1500);
}
else
{
if (!player.KarmaLocked)
player.Karma = Math.Min(15000, player.Karma + 1500);
player.SendMessage( "Your backpack if full, reward is on the ground." );
rewardBag.MoveToWorld( player.Location, map );
}
}