当前位置: 首页>>代码示例>>C#>>正文


C# Bag.TryDropItem方法代码示例

本文整理汇总了C#中Server.Items.Bag.TryDropItem方法的典型用法代码示例。如果您正苦于以下问题:C# Bag.TryDropItem方法的具体用法?C# Bag.TryDropItem怎么用?C# Bag.TryDropItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Server.Items.Bag的用法示例。


在下文中一共展示了Bag.TryDropItem方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: JukaMage

        public JukaMage()
            : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            this.Name = "a juka mage";
            this.Body = 765;

            this.SetStr(201, 300);
            this.SetDex(71, 90);
            this.SetInt(451, 500);

            this.SetHits(121, 180);

            this.SetDamage(4, 10);

            this.SetDamageType(ResistanceType.Physical, 100);

            this.SetResistance(ResistanceType.Physical, 20, 30);
            this.SetResistance(ResistanceType.Fire, 35, 45);
            this.SetResistance(ResistanceType.Cold, 30, 40);
            this.SetResistance(ResistanceType.Poison, 10, 20);
            this.SetResistance(ResistanceType.Energy, 35, 45);

            this.SetSkill(SkillName.Anatomy, 80.1, 90.0);
            this.SetSkill(SkillName.EvalInt, 80.2, 100.0);
            this.SetSkill(SkillName.Magery, 99.1, 100.0);
            this.SetSkill(SkillName.Meditation, 80.2, 100.0);
            this.SetSkill(SkillName.MagicResist, 140.1, 150.0);
            this.SetSkill(SkillName.Tactics, 80.1, 90.0);
            this.SetSkill(SkillName.Wrestling, 80.1, 90.0);

            this.Fame = 15000;
            this.Karma = -15000;

            this.VirtualArmor = 16;

            Container bag = new Bag();

            int count = Utility.RandomMinMax(10, 20);

            for (int i = 0; i < count; ++i)
            {
                Item item = Loot.RandomReagent();

                if (item == null)
                    continue;

                if (!bag.TryDropItem(this, item, false))
                    item.Delete();
            }

            this.PackItem(bag);

            this.PackItem(new ArcaneGem());

            if (Core.ML && Utility.RandomDouble() < .33)
                this.PackItem(Engines.Plants.Seed.RandomPeculiarSeed(4));

            this.m_NextAbilityTime = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(2, 5));
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:59,代码来源:JukaMage.cs

示例2: OutlanderMage

        public OutlanderMage()
            : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name = "an outlander mage";
            Body = 770;
            Team = 2;

            SetStr(201, 300);
            SetDex(71, 90);
            SetInt(451, 500);

            SetHits(121, 180);

            SetDamage(4, 10);

            SetDamageType(ResistanceType.Physical, 100);

            SetResistance(ResistanceType.Physical, 20, 30);
            SetResistance(ResistanceType.Fire, 35, 45);
            SetResistance(ResistanceType.Cold, 30, 40);
            SetResistance(ResistanceType.Poison, 10, 20);
            SetResistance(ResistanceType.Energy, 35, 45);

            SetSkill(SkillName.Anatomy, 80.1, 90.0);
            SetSkill(SkillName.EvalInt, 80.2, 100.0);
            SetSkill(SkillName.Magery, 99.1, 100.0);
            SetSkill(SkillName.Meditation, 80.2, 100.0);
            SetSkill(SkillName.MagicResist, 140.1, 150.0);
            SetSkill(SkillName.Tactics, 80.1, 90.0);
            SetSkill(SkillName.Wrestling, 80.1, 90.0);

            Fame = 15000;
            Karma = -15000;

            VirtualArmor = 16;

            Container bag = new Bag();

            int count = Utility.RandomMinMax(10, 20);

            for (int i = 0; i < count; ++i)
            {
                Item item = Loot.RandomReagent();

                if (item == null)
                    continue;

                if (!bag.TryDropItem(this, item, false))
                    item.Delete();
            }

            PackItem(bag);
            PackItem(new OutlanderHead());
            PackItem(new ArcaneGem());

            m_NextAbilityTime = DateTime.Now + TimeSpan.FromSeconds(Utility.RandomMinMax(2, 5));
        }
开发者ID:greeduomacro,项目名称:annox,代码行数:57,代码来源:OutlanderMage.cs

示例3: JukaMage

		public JukaMage() : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = "a juka mage";
			Body = 765;

			SetStr( 201, 300 );
			SetDex( 71, 90 );
			SetInt( 451, 500 );

			SetHits( 121, 180 );

			SetDamage( 4, 10 );

			SetSkill( SkillName.Anatomy, 80.1, 90.0 );
			SetSkill( SkillName.EvalInt, 80.2, 100.0 );
			SetSkill( SkillName.Magery, 99.1, 100.0 );
			SetSkill( SkillName.Meditation, 80.2, 100.0 );
			SetSkill( SkillName.MagicResist, 140.1, 150.0 );
			SetSkill( SkillName.Tactics, 80.1, 90.0 );
			SetSkill( SkillName.Wrestling, 80.1, 90.0 );

			Fame = 15000;
			Karma = -15000;

			VirtualArmor = 16;

			Container bag = new Bag();

			int count = Utility.RandomMinMax( 10, 20 );

			for ( int i = 0; i < count; ++i )
			{
				Item item = Loot.RandomReagent();

				if ( item == null )
					continue;

				if ( !bag.TryDropItem( this, item, false ) )
					item.Delete();
			}

			PackItem( bag );

			PackItem( new ArcaneGem() );

			PackGold( 250, 400 );
			PackGem();
			PackScroll( 0, 6 );
			PackScroll( 0, 6 );
			PackArmor( 0, 4 );
			PackWeapon( 0, 3 );

			m_NextAbilityTime = DateTime.Now + TimeSpan.FromSeconds( Utility.RandomMinMax( 2, 5 ) );
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:54,代码来源:JukaMage.cs

示例4: MeerCaptain

		public MeerCaptain() : base( AIType.AI_Archer, FightMode.Evil, 10, 1, 0.2, 0.4 )
		{
			Body = 773;

			SetStr( 96, 110 );
			SetDex( 186, 200 );
			SetInt( 96, 110 );

			SetHits( 58, 66 );

			SetDamage( 5, 15 );

			

			
			
			
			
			

			SetSkill( SkillName.Archery, 90.1, 100.0 );
			SetSkill( SkillName.MagicResist, 91.0, 100.0 );
			SetSkill( SkillName.Swords, 90.1, 100.0 );
			SetSkill( SkillName.Tactics, 91.0, 100.0 );
			SetSkill( SkillName.Wrestling, 80.9, 89.9 );

			Fame = 2000;
			Karma = 5000;

			VirtualArmor = 28;

			Container pack = new Backpack();

			pack.DropItem( new Bolt( Utility.RandomMinMax( 10, 20 ) ) );
			pack.DropItem( new Bolt( Utility.RandomMinMax( 10, 20 ) ) );

			switch ( Utility.Random( 6 ) )
			{
				case 0: pack.DropItem( new Broadsword() ); break;
				case 1: pack.DropItem( new Cutlass() ); break;
				case 2: pack.DropItem( new Katana() ); break;
				case 3: pack.DropItem( new Longsword() ); break;
				case 4: pack.DropItem( new Scimitar() ); break;
				case 5: pack.DropItem( new VikingSword() ); break;
			}

			Container bag = new Bag();

			int count = Utility.RandomMinMax( 10, 20 );

			for ( int i = 0; i < count; ++i )
			{
				Item item = Loot.RandomReagent();

				if ( item == null )
					continue;

				if ( !bag.TryDropItem( this, item, false ) )
					item.Delete();
			}

			pack.DropItem( bag );

			AddItem( new Crossbow() );
			PackItem( pack );

			m_NextAbilityTime = DateTime.UtcNow + TimeSpan.FromSeconds( Utility.RandomMinMax( 2, 5 ) );
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:68,代码来源:MeerCaptain.cs

示例5: GenerateLoot

		public override void GenerateLoot()
		{
			Container pack = new Backpack();

			pack.DropItem( new Bolt( Utility.RandomMinMax( 10, 20 ) ) );
			pack.DropItem( new Bolt( Utility.RandomMinMax( 10, 20 ) ) );

			switch ( Utility.Random( 6 ) )
			{
				case 0: pack.DropItem( new Broadsword() ); break;
				case 1: pack.DropItem( new Cutlass() ); break;
				case 2: pack.DropItem( new Katana() ); break;
				case 3: pack.DropItem( new Longsword() ); break;
				case 4: pack.DropItem( new Scimitar() ); break;
				case 5: pack.DropItem( new VikingSword() ); break;
			}

			Container bag = new Bag();

			int count = Utility.RandomMinMax( 10, 20 );

			for ( int i = 0; i < count; ++i )
			{
				Item item = Loot.RandomReagent();

				if ( item == null )
					continue;

				if ( !bag.TryDropItem( this, item, false ) )
					item.Delete();
			}

			pack.DropItem( bag );

			PackGold( 25, 50 );
			PackItem( pack );
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:37,代码来源:MeerCaptain.cs

示例6: GenerateLoot

		public override void GenerateLoot()
		{
			Container bag = new Bag();

			int count = Utility.RandomMinMax( 10, 20 );

			for ( int i = 0; i < count; ++i )
			{
				Item item = Loot.RandomReagent();

				if ( item == null )
					continue;

				if ( !bag.TryDropItem( this, item, false ) )
					item.Delete();
			}

			PackItem( bag );

			PackItem( new ArcaneGem() );

			PackGold( 125, 175 );
			PackGem();
			PackScroll( 3, 6 );
			PackScroll( 3, 6 );
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:26,代码来源:JukaMage.cs


注:本文中的Server.Items.Bag.TryDropItem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。