本文整理汇总了C#中Server.Items.Container.AddItem方法的典型用法代码示例。如果您正苦于以下问题:C# Container.AddItem方法的具体用法?C# Container.AddItem怎么用?C# Container.AddItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Items.Container
的用法示例。
在下文中一共展示了Container.AddItem方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnDeath
public override void OnDeath(Container c)
{
base.OnDeath(c);
double rand = Utility.RandomDouble();
if (0.0020 > rand)
c.AddItem(new KrakenStatue());
else if (0.0030 > rand)
c.AddItem(new Fountainofyouth());
else if (0.0040 > rand)
c.AddItem(new BlackPearlShip());
else if (0.0055 > rand)
c.AddItem(new Netofthedead());
else if (0.0060 > rand)
c.AddItem(new PirateCap());
else if (0.0065 > rand)
c.AddItem(new BlackPearlOars());
else if (0.0070 > rand)
c.AddItem(new GhostShipAnchor());
else if (0.0080 > rand)
c.AddItem(new DavyJonesOar());
else if (0.0085 > rand)
c.AddItem(new PirateCoffin());
else if (0.0090 > rand)
c.AddItem(new Pulley());
else if (0.0095 > rand)
c.AddItem(new Hook());
else if (0.01 > rand)
c.AddItem(new SlipKnot());
else if (0.02 > rand)
c.AddItem(new MessageInABottle());
}
示例2: OnDeath
public override void OnDeath(Container c)
{
switch (Utility.Random(15))
{
//case 0: c.AddItem(new TokenCheck(25)); break; //Remove if not using Tokens
case 1: c.AddItem(new LetterGeneral()); break; //Last Item Requested.
case 2: c.AddItem(new LetterHome()); break; //Not requested but gives additional reward
}
base.OnDeath(c);
}
示例3: OnDeath
public override void OnDeath(Container c)
{
base.OnDeath( c );
double rand = Utility.RandomDouble();
if ( 0.008 > rand ) //Small Web
c.AddItem( new SmallWebEast() );
else if ( 0.008 > rand ) //Small Web
c.AddItem( new SmallWebSouth() );
}
示例4: OnDeath
public override void OnDeath(Container c)
{
base.OnDeath( c );
double rand = Utility.RandomDouble();
if ( 0.0020 > rand )
c.AddItem( new BloodyBandage(2) );
else if ( 0.030 > rand )
c.AddItem( new BloodyBandage() );
}
示例5: OnDeath
public override void OnDeath( Container c )
{
base.OnDeath(c);
if ( Utility.RandomBool() )
c.AddItem( ScrollofTranscendence.CreateRandom(30, 30) );
if ( Utility.RandomBool() )
c.AddItem( new TatteredAncientScroll() );
if ( Utility.RandomBool() )
c.AddItem( new UntransTome() );
if ( Utility.RandomBool() )
c.AddItem( new SpiderCarapace() );
if ( Utility.RandomDouble() < 0.01 )
DistributeRandomArtifact( this, m_Artifact );
// distribute quest items for the 'Green with Envy' quest given by Vernix
List<DamageStore> rights = BaseCreature.GetLootingRights( this.DamageEntries, this.HitsMax );
for ( int i = rights.Count - 1; i >= 0; --i )
{
DamageStore ds = rights[i];
if ( !ds.m_HasRight )
rights.RemoveAt( i );
}
// for each with looting rights... give an eye of navrey if they have the quest
foreach ( DamageStore d in rights )
{
PlayerMobile pm = d.m_Mobile as PlayerMobile;
if ( null!= pm )
{
foreach ( BaseQuest quest in pm.Quests )
{
if ( quest is GreenWithEnvyQuest )
{
Container pack = pm.Backpack;
Item item = new EyeOfNavrey();
if ( pack == null || !pack.TryDropItem( pm, item, false ) )
pm.BankBox.DropItem( item );
pm.SendLocalizedMessage( 1095155 ); // As Navrey Night-Eyes dies, you find and claim one of her eyes as proof of her demise.
break;
}
}
}
}
}
示例6: OnDeath
public override void OnDeath(Container c)
{
base.OnDeath(c);
if (Core.ML && Utility.RandomDouble() <= 0.25)
c.AddItem(Loot.Construct(typeof(MapFragment)));
}
示例7: OnDeath
public override void OnDeath( Container c )
{
if ( Utility.Random( 18 ) < 1 )
c.AddItem( new PurpleBall() );
base.OnDeath( c );
}
示例8: OnDeath
public override void OnDeath( Container c )
{
base.OnDeath( c );
if ( m_CanHatch && 0.01 > Utility.RandomDouble() ) //Egg Case
c.AddItem( new EggCase() );
}
示例9: DisRobe
private static void DisRobe( Mobile m_from, Container cont, Layer layer )
{
if ( m_from.FindItemOnLayer( layer ) != null )
{
Item item = m_from.FindItemOnLayer( layer );
cont.AddItem( item );
}
}
示例10: OnDeath
public override void OnDeath(Container c)
{
switch (Utility.Random(2))
{
//case 0: c.AddItem(new TokenCheck(25)); break; //Remove if not using Tokens
case 1: c.AddItem(new SpecialLeather()); break; //6th Item Requested
}
base.OnDeath(c);
}
示例11: OnDeath
public override void OnDeath(Container c)
{
switch (Utility.Random(2))
{
// case 0: c.AddItem(new TokenCheck(25)); break; //Remove if not using token
case 1: c.AddItem(new TrainSupplies()); break; //1st Item requested.
}
base.OnDeath(c);
}
示例12: OnDeath
public override void OnDeath(Container c)
{
switch (Utility.Random(2))
{
//case 0: c.AddItem(new TokenCheck(25)); break; //Remove if not using tokens
case 1: c.AddItem(new DarkBone()); break; //3rd item requested
}
base.OnDeath(c);
}
示例13: OnAfterDeath
protected override void OnAfterDeath( Container c )
{
base.OnAfterDeath( c );
c.AddItem( new Engines.MLQuests.GrobusFur() );
if (1000 > Utility.Random(100000))
{
c.DropItem(SetItemsHelper.GetRandomSetItem());
}
}
示例14: OnDeath
public override void OnDeath(Container c)
{
base.OnDeath(c);
if (Utility.RandomBool())
c.AddItem(ScrollofTranscendence.CreateRandom(30, 30));
if (Utility.RandomBool())
c.AddItem(new TatteredAncientScroll());
if (Utility.RandomBool())
c.AddItem(new UntransTome());
if (Utility.RandomBool())
c.AddItem(new SpiderCarapace());
// add special drops to backpack here
if (Utility.RandomDouble() < 0.025)
c.AddItem(new Tangle1());
if (Utility.RandomDouble() < 0.025)
c.AddItem(new EyeOfNavery());
if (Utility.RandomDouble() < 0.01)
DistributeArtifact(DemonKnight.FindRandomPlayer(this), new NightEyes());
}
示例15: OnDeath
public override void OnDeath(Container c)
{
// No loot !
foreach (Item i in c.Items)
{
i.Delete();
}
// fun?
if (Utility.Random(25) == 10)
{
Item apple = new Apple();
apple.Name = "Pomme qui tua Blanche-Neige";
c.AddItem(apple);
}
base.OnDeath(c);
}