當前位置: 首頁>>代碼示例>>C#>>正文


C# Container.DropItem方法代碼示例

本文整理匯總了C#中Server.Items.Container.DropItem方法的典型用法代碼示例。如果您正苦於以下問題:C# Container.DropItem方法的具體用法?C# Container.DropItem怎麽用?C# Container.DropItem使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Server.Items.Container的用法示例。


在下文中一共展示了Container.DropItem方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: 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

示例2: OnDeath

        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (1.0 > Utility.RandomDouble() && reg.Name == "Crimson Veins")
            {
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new EssencePrecision());
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new DaemonClaw());
            }

            if (1.0 > Utility.RandomDouble() && reg.Name == "Fire Temple Ruins")
            {
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new EssenceOrder());
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new DaemonClaw());
            }
            if (1.0 > Utility.RandomDouble() && reg.Name == "Lava Caldera")
            {
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new EssencePassion());
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new DaemonClaw());
            }
        }
開發者ID:Crome696,項目名稱:ServUO,代碼行數:28,代碼來源:FireDaemon.cs

示例3: OnDeath

		public override void OnDeath( Container c )
		{
			base.OnDeath( c );	
			
			c.DropItem( new EyeOfTheTravesty() );
			c.DropItem( new OrdersFromMinax() );
			
			switch ( Utility.Random( 3 ) )
			{
				case 0: c.DropItem( new TravestysSushiPreparations() ); break;
				case 1: c.DropItem( new TravestysFineTeakwoodTray() ); break;
				case 2: c.DropItem( new TravestysCollectionOfShells() ); break;
			}
			
			if ( Utility.RandomDouble() < 0.6 )				
				c.DropItem( new ParrotItem() );
			
			if ( Utility.RandomDouble() < 0.1 )
				c.DropItem( new TragicRemainsOfTravesty() );
				
			if ( Utility.RandomDouble() < 0.05 )
				c.DropItem( new ImprisonedDog() );
				
			if ( Utility.RandomDouble() < 0.05 )
				c.DropItem( new MarkOfTravesty() );
				
			if ( Utility.RandomDouble() < 0.025 )
				c.DropItem( new CrimsonCincture() );
		}
開發者ID:brodock,項目名稱:genova-project,代碼行數:29,代碼來源:Travesty.cs

示例4: OnDeath

        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            if (Utility.RandomDouble() < 0.10)
            {
                switch (Utility.Random(2))
                {
                    case 0: c.DropItem(new EssenceDiligence()); break;

                    case 1: c.DropItem(new FairyDragonWing()); break;
                }

                if (Utility.RandomDouble() < 0.10)
                {
                    switch (Utility.Random(2))
                    {
                        case 0: c.DropItem(new DraconicOrbKey()); break;

                        case 1: c.DropItem(new UntransTome()); break;
                    }
                }

                if (Utility.RandomDouble() < 0.05)
                {
                   
                        c.DropItem(new AnimatedLegsoftheInsaneTinker()); 
                }
            }
        }
開發者ID:greeduomacro,項目名稱:cov-shard-svn-1,代碼行數:30,代碼來源:WyvernR.cs

示例5: OnDeath

        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            c.DropItem(new DragonBlood(6));
            c.DropItem(new GargishStoneArms());
        }
開發者ID:greeduomacro,項目名稱:cov-shard-svn-1,代碼行數:7,代碼來源:KepetchAmbusher.cs

示例6: 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

示例7: OnDeath

		public override void OnDeath(Container c)
		{
			base.OnDeath(c);

			if (Utility.RandomDouble() < 0.20)
			{
				switch (Utility.Random(4))
				{
					case 0:
						c.DropItem(new EssenceDiligence());
						break;
					case 1:
						c.DropItem(new FairyDragonWing());
						break;
					case 2:
						c.DropItem(new FaeryDust());
						break;
					case 3:
						c.DropItem(new FeyWings());
						break;
				}

				if (Utility.RandomDouble() < 0.30)
				{
					c.DropItem(new DraconicOrbKeyBlue());
				}
			}
		}
開發者ID:RobBrown88,項目名稱:ServUO,代碼行數:28,代碼來源:FairyDragon1.cs

示例8: OnDeath

		public override void OnDeath( Container c )
		{
			base.OnDeath( c );

            c.DropItem( new Gold(1500));
            c.DropItem( new Bandage(12));
        }
開發者ID:greeduomacro,項目名稱:unknown-shard-1,代碼行數:7,代碼來源:RatLord.cs

示例9: OnDeath

		public override void OnDeath( Container c )
		{
			if ( Utility.Random( 35 ) < 1 )
			{
				DecemberDeed deed = new DecemberDeed();
				deed.Hue = 2006;
				deed.Name = "a deed from the Grinch";
				deed.Movable = true;
				deed.Weight = 5.0;
				c.DropItem( deed );
			}

            		int cnt = 1;
            		if ( Utility.Random( 4 ) < 1 ) cnt++;
            		if ( Utility.Random( 5 ) < 1 ) cnt++;

            		for (int i = 0; i < cnt; ++i)
            		{
                		switch (Utility.Random(4))
                		{
                    			case 0: c.DropItem( new SpecialHairDye() ); break;
                    			case 1: c.DropItem( new SpecialBeardDye() ); break;
                    			case 2: c.DropItem( new ClothingBlessDeed() ); break;
                    			case 3: c.DropItem( new NameChangeDeed() ); break;
                		}
            		}
			base.OnDeath( c );
		}
開發者ID:kamronbatman,項目名稱:DefianceUO-Pre1.10,代碼行數:28,代碼來源:Grinch.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);

            if (Utility.RandomDouble() < 0.05)
            {
                switch (Utility.Random(2))
                {
                    case 0:
                        c.DropItem(new SlithTongue());
                        break;
                    case 1:
                        c.DropItem(new SlithEye());
                        break;
                }
            }

            if (Utility.RandomDouble() < 0.25)
            {
                switch (Utility.Random(2))
                {
                    case 0:
                        c.DropItem(new AncientPotteryFragments());
                        break;
                    case 1:
                        c.DropItem(new TatteredAncientScroll());
                        break;
                }
            }
        }
開發者ID:Crome696,項目名稱:ServUO,代碼行數:30,代碼來源:Slith.cs

示例12: OnDeath

		public override void OnDeath( Container c )
		{
			base.OnDeath( c );

			c.DropItem( new DiseasedBark() );
			c.DropItem( new EternallyCorruptTree() );

			int drop = Utility.Random( 2, 4 );

			for ( int i = 0; i < drop; i++ )
				c.DropItem( new MelisandesFermentedWine() );

			if ( Utility.RandomDouble() < 0.6 )
				c.DropItem( new ParrotItem() );

			if ( Utility.RandomDouble() < 0.2225 )
			{
				switch ( Utility.Random( 3 ) )
				{
					case 0: c.DropItem( new MelisandesHairDye() ); break;
					case 1: c.DropItem( new MelisandesCorrodedHatchet() ); break;
					case 2: c.DropItem( new AlbinoSquirrelImprisonedInCrystal() ); break;
				}
			}

			if ( Utility.RandomDouble() < 0.05 )
				c.DropItem( new MyrmidonLegs() );

			if ( Utility.RandomDouble() < 0.025 )
				c.DropItem( new CrimsonCincture() );
		}
開發者ID:greeduomacro,項目名稱:cov-shard-svn-1,代碼行數:31,代碼來源:LadyMelisande.cs

示例13: OnDeath

 public override void OnDeath(Container c)
 {
     base.OnDeath(c);
     var reg = Region.Find(c.GetWorldLocation(), c.Map);
     if (0.4 > Utility.RandomDouble() && reg.Name == "Ariel Writ Disaster")
         c.DropItem(new ArielHavenWritofMembership());
     c.DropItem(new BonePile());
 }
開發者ID:rokann,項目名稱:JustUO,代碼行數:8,代碼來源:RotWorm.cs

示例14: OnDeath

        public override void OnDeath(Container c)
        {
            base.OnDeath(c);	
			
                c.DropItem(new TigerClawKey());

            if (Utility.RandomDouble() < 0.5)
                c.DropItem(new TigerClawSectBadge());
        }
開發者ID:Crome696,項目名稱:ServUO,代碼行數:9,代碼來源:TigersClawMaster.cs

示例15: OnDeath

        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            c.DropItem(new SalivasFeather());

            if (Utility.RandomDouble() < 0.1)
                c.DropItem(new ParrotItem());
        }
開發者ID:rokann,項目名稱:JustUO,代碼行數:9,代碼來源:Saliva.cs


注:本文中的Server.Items.Container.DropItem方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。