本文整理汇总了C#中Server.Items.Container类的典型用法代码示例。如果您正苦于以下问题:C# Container类的具体用法?C# Container怎么用?C# Container使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Container类属于Server.Items命名空间,在下文中一共展示了Container类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Fill
public static void Fill( Container c, int itemCount, double talismanChance )
{
c.Hue = Utility.RandomNondyedHue();
int done = 0;
if ( Utility.RandomDouble() < talismanChance )
{
c.DropItem( new RandomTalisman() );
++done;
}
for ( ; done < itemCount; ++done )
{
Item loot = null;
switch ( Utility.Random( 5 ) )
{
case 0: loot = Loot.RandomWeapon( false, true ); break;
case 1: loot = Loot.RandomArmor( false, true ); break;
case 2: loot = Loot.RandomRangedWeapon( false, true ); break;
case 3: loot = Loot.RandomJewelry(); break;
case 4: loot = Loot.RandomHat( false ); break;
}
if ( loot == null )
continue;
Enhance( loot );
c.DropItem( loot );
}
}
示例2: OnDeath
public override void OnDeath( Container c )
{
if ( Utility.Random( 250 ) < 1 )
c.DropItem( new SpiderWeb() );
base.OnDeath( c );
}
示例3: OnDeath
public override void OnDeath(Container c)
{
base.OnDeath(c);
if (Utility.RandomDouble() < 0.5)
c.DropItem(new VoidOrb());
}
示例4: OnDeath
public override void OnDeath( Container c )
{
if ( Utility.Random( 18 ) < 1 )
c.AddItem( new PurpleBall() );
base.OnDeath( c );
}
示例5: OnDeath
public override void OnDeath(Container c)
{
base.OnDeath(c);
if (Utility.RandomDouble() < 0.2)
c.DropItem(new SerpentFangKey());
}
示例6: OnDeath
public override void OnDeath(Container c)
{
if (Utility.RandomDouble() <= 0.1)
{
c.DropItem(new BlindingAnkh());
}
if (Utility.RandomDouble() <= 0.01)
{
c.DropItem(new DaemonBlood{Hue = 33, Name = "Daemon Ichor"});
}
if (Utility.RandomDouble() <= 0.001)
{
if (Utility.RandomBool())
{
c.DropItem(new BloodSpear {Hue = 33});
}
else
{
c.DropItem(new BloodFork { Hue = 33 });
}
}
base.OnDeath(c);
}
示例7: OnDeath
public override void OnDeath( Container c )
{
base.OnDeath( c );
if ( Utility.RandomDouble() < 0.1 )
c.DropItem( new PrimitiveFetish() );
}
示例8: OnKill
public override void OnKill( BaseCreature creature, Container corpse )
{
if ( creature is CursedSoul )
{
if ( m_CursedSoulsKilled == 0 )
System.AddConversation( new GainKarmaConversation( true ) );
m_CursedSoulsKilled++;
// Cursed Souls killed: ~1_COUNT~
System.From.SendLocalizedMessage( 1063038, m_CursedSoulsKilled.ToString() );
}
else if ( creature is YoungRonin )
{
if ( m_YoungRoninKilled == 0 )
System.AddConversation( new GainKarmaConversation( false ) );
m_YoungRoninKilled++;
// Young Ronin killed: ~1_COUNT~
System.From.SendLocalizedMessage( 1063039, m_YoungRoninKilled.ToString() );
}
CurProgress = Math.Max( m_CursedSoulsKilled, m_YoungRoninKilled );
}
示例9: OnDeath
public override void OnDeath( Container c )
{
if( this.m_GoldOnDeath > 0 )
c.DropItem( new Gold( this.m_GoldOnDeath ) );
base.OnDeath( c );
}
示例10: OnDeath
public override void OnDeath(Container c)
{
base.OnDeath(c);
Region reg = Region.Find(c.GetWorldLocation(), c.Map);
if (0.25 > Utility.RandomDouble() && reg.Name == "Fairy Dragon Lair")
{
switch (Utility.Random(2))
{
case 0: c.DropItem(new EssenceDiligence()); break;
case 1: c.DropItem(new FaeryDust()); break;
}
}
if (Utility.RandomDouble() <= 0.25)
{
switch (Utility.Random(2))
{
case 0:
c.DropItem(new FeyWings());
break;
case 1:
c.DropItem(new FairyDragonWing());
break;
}
}
if (Utility.RandomDouble() < 0.10)
{
c.DropItem(new DraconicOrb());
}
}
示例11: OnDeath
public override void OnDeath( Container c )
{
base.OnDeath( c );
/*
c.DropItem( new LardOfParoxysmus() );
switch ( Utility.Random( 3 ) )
{
case 0: c.DropItem( new ParoxysmusDinner() ); break;
case 1: c.DropItem( new ParoxysmusCorrodedStein() ); break;
case 2: c.DropItem( new StringOfPartsOfParoxysmusVictims() ); break;
}
if ( Utility.RandomDouble() < 0.6 )
c.DropItem( new ParrotItem() );
if ( Utility.RandomBool() )
c.DropItem( new SweatOfParoxysmus() );
if ( Utility.RandomDouble() < 0.05 )
c.DropItem( new ParoxysmusSwampDragonStatuette() );
if ( Utility.RandomDouble() < 0.05 )
c.DropItem( new ScepterOfTheChief() );
if ( Utility.RandomDouble() < 0.025 )
c.DropItem( new CrimsonCincture() );
*/
}
示例12: Target
public void Target( Container item )
{
if ( CheckSequence() )
{
SpellHelper.Turn( Caster, item );
object root = item.RootParent;
if ( !item.IsAccessibleTo( Caster ) )
{
item.OnDoubleClickNotAccessible( Caster );
}
else if ( !item.CheckItemUse( Caster, item ) )
{
}
else if ( root != null && root is Mobile && root != Caster )
{
item.OnSnoop( Caster );
}
else if ( item is Corpse && !((Corpse)item).CheckLoot( Caster, null ) )
{
}
else if ( Caster.Region.OnDoubleClick( Caster, item ) )
{
Effects.SendLocationParticles( EffectItem.Create( item.Location, item.Map, EffectItem.DefaultDuration ), 0x376A, 9, 32, 5022 );
Effects.PlaySound( item.Location, item.Map, 0x1F5 );
item.DisplayTo( Caster );
item.OnItemUsed( Caster, item );
}
}
FinishSequence();
}
示例13: OnDeath
public override void OnDeath( Container c )
{
base.OnDeath( c );
if ( Utility.RandomDouble() < 0.3 )
c.DropItem( new TigerClawKey() );
}
示例14: OnDeath
public override void OnDeath( Container c )
{
if ( Utility.Random( 10 ) < 1 )
c.DropItem( new SnowDrop( Utility.RandomMinMax( 1, 3 ) ) );
base.OnDeath( c );
}
示例15: OnDeath
public override void OnDeath( Container c )
{
base.OnDeath( c );
if ( Utility.RandomDouble() < 0.4 )
c.DropItem( new ScatteredCrystals() );
}