本文整理汇总了C#中Server.Items.Container类的典型用法代码示例。如果您正苦于以下问题:C# Container类的具体用法?C# Container怎么用?C# Container使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Container类属于Server.Items命名空间,在下文中一共展示了Container类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 );
}
}
开发者ID:nathanvy,项目名称:runuo,代码行数:32,代码来源:RewardBags.cs
示例2: OnDeath
public override void OnDeath( Container c )
{
if ( Utility.Random( 250 ) < 1 )
c.DropItem( new SpiderWeb() );
base.OnDeath( c );
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:7,代码来源:FireRat.cs
示例3: OnDeath
public override void OnDeath(Container c)
{
base.OnDeath(c);
if (Utility.RandomDouble() < 0.5)
c.DropItem(new VoidOrb());
}
开发者ID:aj9251,项目名称:ServUO,代码行数:7,代码来源:Relanord.cs
示例4: OnDeath
public override void OnDeath( Container c )
{
if ( Utility.Random( 18 ) < 1 )
c.AddItem( new PurpleBall() );
base.OnDeath( c );
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:7,代码来源:NewbornLich.cs
示例5: OnDeath
public override void OnDeath(Container c)
{
base.OnDeath(c);
if (Utility.RandomDouble() < 0.2)
c.DropItem(new SerpentFangKey());
}
开发者ID:m309,项目名称:ForkUO,代码行数:7,代码来源:SerpentsFangHighExecutioner.cs
示例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);
}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:25,代码来源:AsylumGuardian.cs
示例7: OnDeath
public override void OnDeath( Container c )
{
base.OnDeath( c );
if ( Utility.RandomDouble() < 0.1 )
c.DropItem( new PrimitiveFetish() );
}
开发者ID:jackuoll,项目名称:Pre-AOS-RunUO,代码行数:7,代码来源:Troglodyte.cs
示例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 );
}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:25,代码来源:Objectives.cs
示例9: OnDeath
public override void OnDeath( Container c )
{
if( this.m_GoldOnDeath > 0 )
c.DropItem( new Gold( this.m_GoldOnDeath ) );
base.OnDeath( c );
}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:7,代码来源:BaseHire.cs
示例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());
}
}
开发者ID:Tukaramdas,项目名称:ServUO-EC-Test-Fork,代码行数:33,代码来源:FairyDragon.cs
示例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() );
*/
}
开发者ID:ITLongwell,项目名称:runuo-nerun-distro,代码行数:29,代码来源:ChiefParoxysmus.cs
示例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();
}
开发者ID:Godkong,项目名称:Origins,代码行数:34,代码来源:Telekinesis.cs
示例13: OnDeath
public override void OnDeath( Container c )
{
base.OnDeath( c );
if ( Utility.RandomDouble() < 0.3 )
c.DropItem( new TigerClawKey() );
}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:7,代码来源:TigersClawMaster.cs
示例14: OnDeath
public override void OnDeath( Container c )
{
if ( Utility.Random( 10 ) < 1 )
c.DropItem( new SnowDrop( Utility.RandomMinMax( 1, 3 ) ) );
base.OnDeath( c );
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:7,代码来源:ConfusedFairy.cs
示例15: OnDeath
public override void OnDeath( Container c )
{
base.OnDeath( c );
if ( Utility.RandomDouble() < 0.4 )
c.DropItem( new ScatteredCrystals() );
}
开发者ID:Ziden,项目名称:ServUO-EC-Test-Fork,代码行数:7,代码来源:CrystalDaemon.cs
示例16: OnDeath
public override void OnDeath( Container c )
{
if ( Utility.Random( 120 ) < 1 )
c.DropItem( new RaindeerStatue() );
base.OnDeath( c );
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:7,代码来源:Raindeer.cs
示例17: OnDeath
public override void OnDeath( Container c )
{
if ( Utility.Random( 250 ) < 1 )
c.DropItem( new BloodWispStatue() );
base.OnDeath( c );
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:7,代码来源:BloodWisp.cs
示例18: OnDeath
public override void OnDeath( Container c )
{
base.OnDeath( c );
if ( Paragon.ChestChance > Utility.RandomDouble() )
c.DropItem( new ParagonChest( Name, TreasureMapLevel ) );
}
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:7,代码来源:MasterTheophilus.cs
示例19: OnDeath
public override void OnDeath(Container c)
{
base.OnDeath(c);
if (Utility.RandomDouble() < 0.3)
c.DropItem(new DragonFlameKey());
}
开发者ID:m309,项目名称:ForkUO,代码行数:7,代码来源:DragonsFlameGrandMage.cs
示例20: OnDeath
public override void OnDeath(Container c)
{
base.OnDeath(c);
if (Core.ML && Utility.RandomDouble() <= 0.25)
c.AddItem(Loot.Construct(typeof(MapFragment)));
}
开发者ID:Crome696,项目名称:ServUO,代码行数:7,代码来源:EvilWanderingHealer.cs
注:本文中的Server.Items.Container类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论