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


C# Items.Bag类代码示例

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


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

示例1: ChristmasDonationBox

		public ChristmasDonationBox()
		{
			Weight = 1.0;
			//Hue = 38;
			Item item = null;
			Name = "christmas gift box";

			PlaceItemIn( 35, 30, (item = new RedStocking()) );
                        PlaceItemIn( 48, 30, (item = new RedStocking()) );
			PlaceItemIn( 35, 75, (item = new FreshGinger()) );
                        PlaceItemIn( 46, 63, (item = new FreshGinger()) );

                        PlaceItemIn( 80, 26, (item = new GingerbreadCookie()) );
                        PlaceItemIn( 80, 36, (item = new GingerbreadCookie()) );
                        PlaceItemIn( 80, 46, (item = new GingerbreadCookie()) );
                        PlaceItemIn( 80, 56, (item = new GingerbreadCookie()) );
                        PlaceItemIn( 80, 66, (item = new GingerbreadCookie()) );
                        PlaceItemIn( 80, 76, (item = new GingerbreadCookie()) );

                        PlaceItemIn( 146, 31, (item = new RedCandyCane()) );
                        PlaceItemIn( 146, 41, (item = new RedCandyCane()) );
                        PlaceItemIn( 146, 51, (item = new RedCandyCane()) );
                        PlaceItemIn( 146, 61, (item = new RedCandyCane()) );

                        BaseContainer cont;
			PlaceItemIn( 123, 55, (cont = new Bag()) );
			cont.Hue = 38;

			cont.PlaceItemIn( 131, 75, (item = new ChristmasHouseAddonDeed()) );
                        cont.PlaceItemIn( 131, 85, (item = new ChristmasCastleAddonDeed()) );


		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:33,代码来源:ChristmasDonationBox.cs

示例2: SurvivalPack

		public SurvivalPack()
		{
			Weight = 1.0;
			Hue = 1871;
			Item item = null;
			Name = "a survival pack";


			PlaceItemIn( 60, 131, (item = new SkillBall( 10 )) );
			item.Hue = 1871;
                        item.Name = "a +10 SkillBall - Works on skills 90.0 and below";

			PlaceItemIn( 110, 103, (item = new SkillBall( 50 )) );
			item.Hue = 1871;
                        item.Name = "a +50 SkillBall - Works on skills 50.0 and below";

			PlaceItemIn( 46, 65, (item = new SkillBall( 25 )) );
			item.Hue = 1871;
			item.Name = "a +25 SkillBall - Works on skills 75.0 and below";

			BaseContainer cont;
			PlaceItemIn( 131, 121, (cont = new Bag()) );
			cont.Hue = 2413;

			cont.PlaceItemIn( 29, 39, new SulfurousAsh(5000) );
			cont.PlaceItemIn( 29, 64, new Nightshade(5000) );
			cont.PlaceItemIn( 29, 89, new SpidersSilk(5000) );

			cont.PlaceItemIn( 60, 64, new Garlic(5000) );
			cont.PlaceItemIn( 60, 89, new Ginseng(5000) );

			cont.PlaceItemIn( 88, 39, new Bloodmoss(5000) );
			cont.PlaceItemIn( 88, 64, new BlackPearl(5000) );
			cont.PlaceItemIn( 88, 89, new MandrakeRoot(5000) );
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:35,代码来源:SurvivalPack.cs

示例3: GiveReward

        public bool GiveReward( Mobile to )
        {
            Bag bag = new Bag();

            bag.DropItem( new Gold( Utility.RandomMinMax( 1500, 2000 ) ) ); //Edit by Blady. Default was (500, 1000)

            if ( Utility.RandomBool() )
            {
                BaseWeapon weapon = Loot.RandomWeapon();

                if ( Core.AOS )
                {
                    BaseRunicTool.ApplyAttributesTo( weapon, (Utility.RandomMinMax(2,5)), 20, 80 ); //By Blady. Default: (3, 20, 30)
                }
                else
                {
                    weapon.DamageLevel = (WeaponDamageLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
                    weapon.AccuracyLevel = (WeaponAccuracyLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
                    weapon.DurabilityLevel = (WeaponDurabilityLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
                }

                bag.DropItem( weapon );
            }
            else
            {
                Item item;

                if ( Core.AOS )
                {
                    item = Loot.RandomArmorOrShieldOrJewelry();

                    if ( item is BaseArmor )
                        BaseRunicTool.ApplyAttributesTo( (BaseArmor)item, (Utility.RandomMinMax(2,5)), 20, 80 ); //By Blady. Default: (3, 20, 30)
                    else if ( item is BaseJewel )
                        BaseRunicTool.ApplyAttributesTo( (BaseJewel)item, (Utility.RandomMinMax(2,5)), 20, 80 ); //By Blady. Default: (3, 20, 30)
                }
                else
                {
                    BaseArmor armor = Loot.RandomArmorOrShield();
                    item = armor;

                    armor.ProtectionLevel = (ArmorProtectionLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
                    armor.Durability = (ArmorDurabilityLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
                }

                bag.DropItem( item );
            }

            bag.DropItem( new Obsidian() );

            if ( to.PlaceInBackpack( bag ) )
            {
                return true;
            }
            else
            {
                bag.Delete();
                return false;
            }
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:60,代码来源:ElwoodMcCarrin.cs

示例4: DungeonDonationBox

		public DungeonDonationBox()
		{
			Weight = 1.0;
			Hue = 1109;
			Item item = null;
			Name = "dungeon decoration chest";

			PlaceItemIn( 16, 51, (item = new BoneThrone()) );
                        PlaceItemIn( 16, 51, (item = new BoneThrone()) );
			PlaceItemIn( 58, 70, (item = new InscribedTombStone()) );
                        PlaceItemIn( 58, 70, (item = new InscribedTombStone()) );
                        PlaceItemIn( 58, 70, (item = new IronMaiden()) );

			PlaceItemIn( 44, 57, (new BoneTable()) );
                        PlaceItemIn( 44, 57, (new BoneTable()) );

                        BaseContainer cont;
			PlaceItemIn( 131, 121, (cont = new Bag()) );
			cont.Hue = 2413;

			cont.PlaceItemIn( 131, 75, (item = new OpenCoffinAddonDeed()) );
                        cont.PlaceItemIn( 131, 75, (item = new OpenCoffinAddonDeed()) );


			cont.PlaceItemIn( 140, 51, (item = new StoneCoffinAddonDeed()) );
                        cont.PlaceItemIn( 140, 51, (item = new StoneCoffinAddonDeed()) );


			cont.PlaceItemIn( 58, 83, (item = new ShadowAltarAddonDeed()) );
                        cont.PlaceItemIn( 58, 83, (item = new ShadowAltarAddonDeed()) );

                        cont.PlaceItemIn( 56, 50, (item = new BoneCouchAddonDeed()) );
                        cont.PlaceItemIn( 56, 50, (item = new BoneCouchAddonDeed()) );

		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:35,代码来源:DungeonDonationBox.cs

示例5: Wisp

        public Wisp()
            : base(AIType.AI_Mage, FightMode.Agressor, 10, 1, 0.45, 0.8)
        {
            Body = 58;
            Name = "a wisp";
            SetStr( 196, 225 );
            SetHits( 196, 225 );
            SetDex( 196, 225 );
            SetStam( 96, 125 );
            SetInt( 196, 225 );
            SetMana( 196, 225 );

            BaseSoundID = 466;
            SetSkill( SkillName.Tactics, 80 );
            SetSkill( SkillName.MagicResist, 80 );
            SetSkill( SkillName.Parry, 80 );
            SetSkill( SkillName.Magery, 80 );
            SetSkill( SkillName.Wrestling, 80 );

            VirtualArmor = 20;
            SetDamage( 15, 20 );

            Container cont = new Bag();
            PackItem( cont );

            LootPack.FilthyRich.Generate( this, cont );
            LootPack.FilthyRich.Generate( this, cont );
            LootPack.Rich.Generate( this, cont );
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:29,代码来源:Wisp.cs

示例6: BagOfMagicJewels

        public BagOfMagicJewels( int amount )
        {
            this.Name = "Bag Of Jewels";
            this.Hue = DimensionsNewAge.Scripts.HueItemConst.HueMagicColorRandom;

            Bag bagBracelet = new Bag();
            bagBracelet.DropItem(new BraceletAlchemy());
            bagBracelet.DropItem(new BraceletBlacksmithing());
            bagBracelet.DropItem(new BraceletMining());
            bagBracelet.DropItem(new BraceletBowcraft());
            bagBracelet.DropItem(new BraceletTaming());
            bagBracelet.DropItem(new BraceletLumberjacking());
            bagBracelet.DropItem(new BraceletSnooping());
            bagBracelet.DropItem(new BraceletTailoring());
            bagBracelet.DropItem(new BraceletPoisoning());
            bagBracelet.DropItem(new BraceletStealing());
            this.DropItem(bagBracelet);

            Bag bagNecklace = new Bag();
            bagNecklace.DropItem(new NecklaceFencing());
            bagNecklace.DropItem(new NecklaceMacefighting());
            bagNecklace.DropItem(new NecklaceSwordsmanship());
            bagNecklace.DropItem(new NecklaceArchery());
            bagNecklace.DropItem(new NecklaceTactics());
            bagNecklace.DropItem(new NecklaceWrestling());
            this.DropItem(bagNecklace);

            Bag bagRing = new Bag();
            bagRing.DropItem(new RingDexterity());
            bagRing.DropItem(new RingStrenght());
            bagRing.DropItem(new RingInteligence());
            bagRing.DropItem(new RingPower());
            this.DropItem(bagRing);
        }
开发者ID:greeduomacro,项目名称:DimensionsNewAge,代码行数:34,代码来源:BagOfMagicJewels.cs

示例7: GiveReward

        public bool GiveReward( Mobile to )
        {
            Bag bag = new Bag();

            bag.DropItem( new Gold( Utility.RandomMinMax( 500, 1000 ) ) );

            if ( Utility.RandomBool() )
            {
                BaseWeapon weapon = Loot.RandomWeapon();

                BaseRunicTool.ApplyAttributesTo( weapon, 2, 20, 30 );

                bag.DropItem( weapon );
            }
            else
            {
                Item item = Loot.RandomArmorOrShieldOrJewelry();

                if ( item is BaseArmor )
                    BaseRunicTool.ApplyAttributesTo( (BaseArmor) item, 2, 20, 30 );
                else if ( item is BaseJewel )
                    BaseRunicTool.ApplyAttributesTo( (BaseJewel) item, 2, 20, 30 );

                bag.DropItem( item );
            }

            bag.DropItem( new Obsidian() );

            return to.PlaceInBackpack( bag );
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:30,代码来源:ElwoodMcCarrin.cs

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

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

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

示例11: ComputeRewards

        public override ArrayList ComputeRewards()
        {
            ArrayList list = new ArrayList();

            Container cont = new Bag();

            int minProp = Level + 1;
            if (minProp > 3)
                minProp = 3;

            //EUtility.AddRandomLoot(cont, (Level + 1) * 3, (int)(Level * 300 + AmountMax / 20.0 * 300), ScaleTypes.PlayerLuck, minProp, 5, 10, 100);

            cont.DropItem(HuntBodUtility.GetSmallRewardItem(Level));

            list.Add(cont);

            return list;
        }
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:18,代码来源:SmallHuntBOD.cs

示例12: OnBeforeDeath

		public override bool OnBeforeDeath()
		{
			BoneMagi rm = new BoneMagi();
			rm.Team = this.Team;
			rm.Map = this.Map;
			rm.Location = this.Location;
			Effects.SendLocationEffect( Location,Map, 0x3709, 13, 0x3B2, 0 );

			Container bag = new Bag();

			switch ( Utility.Random( 9 ))
			{
				case 0: bag.DropItem( new Amber() ); break;
				case 1: bag.DropItem( new Amethyst() ); break;
				case 2: bag.DropItem( new Citrine() ); break;
				case 3: bag.DropItem( new Diamond() ); break;
				case 4: bag.DropItem( new Emerald() ); break;
				case 5: bag.DropItem( new Ruby() ); break;
				case 6: bag.DropItem( new Sapphire() ); break;
				case 7: bag.DropItem( new StarSapphire() ); break;
				case 8: bag.DropItem( new Tourmaline() ); break;
			}

			switch ( Utility.Random( 8 ))
			{
				case 0: bag.DropItem( new SpidersSilk( 3 ) ); break;
				case 1: bag.DropItem( new BlackPearl( 3 ) ); break;
				case 2: bag.DropItem( new Bloodmoss( 3 ) ); break;
				case 3: bag.DropItem( new Garlic( 3 ) ); break;
				case 4: bag.DropItem( new MandrakeRoot( 3 ) ); break;
				case 5: bag.DropItem( new Nightshade( 3 ) ); break;
				case 6: bag.DropItem( new SulfurousAsh( 3 ) ); break;
				case 7: bag.DropItem( new Ginseng( 3 ) ); break;
			}

			bag.DropItem( new Gold( 2000, 3500 ));
			rm.AddItem( bag );

			this.Delete();

			return false;
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:42,代码来源:Armond.cs

示例13: BagBetaTest

        public BagBetaTest()
        {
            Hue = 780;
            Name = "Bag BetaTeste";

            Bag bagGold = new Bag();
            bagGold.DropItem(new Gold(50000));
            bagGold.DropItem(new Gold(50000));
            bagGold.DropItem(new Gold(50000));
            bagGold.DropItem(new Gold(50000));
            bagGold.DropItem(new Gold(50000));
            bagGold.DropItem(new Gold(50000));
            bagGold.DropItem(new Gold(50000));
            bagGold.DropItem(new Gold(50000));
            bagGold.DropItem(new Gold(50000));
            bagGold.DropItem(new Gold(50000));
            this.DropItem(bagGold);

            this.DropItem(new BagOfOres(250));
            this.DropItem(new Server.Multis.Deeds.CastleDeed());
        }
开发者ID:greeduomacro,项目名称:DimensionsNewAge,代码行数:21,代码来源:BagBetaTest.cs

示例14: BagOfAssassinGear

		public BagOfAssassinGear() : base()
		{
			DropItem( new ACreedBelt() );
			DropItem( new ACreedBoneArms() );
			DropItem( new ACreedChainCoif() );
			DropItem( new ACreedJinBori() );
			DropItem( new ACreedKilt() );
			DropItem( new ACreedMempo() );
			DropItem( new ACreedShirt() );
			DropItem( new ACreedSkirt() );
			DropItem( new ACreedStuddedChest() );
			DropItem( new ACreedThighBoots() );
			DropItem( new ACreedLeafGloves() );
			DropItem( new ACreedSword() );

			Bag bag = new Bag();

			for ( int i = 0; i < 16; i++ )
			{
				bag.DropItem( new Dagger() );
			}

			SmokeBomb smoke = new SmokeBomb();
			smoke.Amount = 15;
			bag.DropItem( smoke );
			bag.DropItem( new GreaterHealPotion( 15 ) );
			DropItem( bag );


			bag = new Bag();

			for ( int i = 0; i < 34; i++ )
			{
				bag.DropItem( new UpgradeACreedGarbDeed() );
			}

			DropItem( bag );
		}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:38,代码来源:BagOfACreedGear.cs

示例15: PackBagofRecallRegs

		public Bag PackBagofRecallRegs( int amount )
		{
			Bag bag = new Bag();
			PackItem( bag );
			bag.DropItem( new BlackPearl   ( amount ) );
			bag.DropItem( new Bloodmoss    ( amount ) );
			bag.DropItem( new MandrakeRoot ( amount ) );
			return bag;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:9,代码来源:BaseCreature.cs


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