• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Items.LockableContainer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Target

        public void Target( LockableContainer targ )
        {
            if ( Multis.BaseHouse.CheckLockedDownOrSecured( targ ) )
            {
                // You cannot cast this on a locked down item.
                Caster.LocalOverheadMessage( MessageType.Regular, 0x22, 501761 );
            }
            else if ( targ.Locked || targ.LockLevel == 0 || targ is ParagonChest )
            {
                // Target must be an unlocked chest.
                Caster.SendLocalizedMessage( 501762 );
            }
            else if ( CheckSequence() )
            {
                SpellHelper.Turn( Caster, targ );

                Point3D loc = targ.GetWorldLocation();

                Effects.SendLocationParticles(
                    EffectItem.Create( loc, targ.Map, EffectItem.DefaultDuration ),
                    0x376A, 9, 32, 5020 );

                Effects.PlaySound( loc, targ.Map, 0x1FA );

                // The chest is now locked!
                Caster.LocalOverheadMessage( MessageType.Regular, 0x3B2, 501763 );

                targ.LockLevel = -255; // signal magic lock
                targ.Locked = true;
            }

            FinishSequence();
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:33,代码来源:MagicLock.cs


示例2: Target

        public void Target( LockableContainer targ )
        {
            if ( targ.Locked || targ.LockLevel == 0 || targ.MaxLockLevel == 0 )
            {
                Caster.SendLocalizedMessage( 501762 ); // Target must be an unlocked chest.
            }
            else if ( targ.MaxLockLevel > 65 )
            {
                Caster.SendAsciiMessage( "This chest cannot be magically locked." );
            }
            else if ( CheckSequence() )
            {
                SpellHelper.Turn( Caster, targ );

                Point3D loc = targ.GetWorldLocation();

                Effects.SendLocationParticles(
                    EffectItem.Create( loc, targ.Map, EffectItem.DefaultDuration ),
                    0x376A, 9, 32, 5020 );

                Effects.PlaySound( loc, targ.Map, 0x1FA );

                // The chest is now locked!
                Caster.LocalOverheadMessage( MessageType.Regular, 0x3B2, 501763 );

                targ.LockLevel = -255; // signal magic lock
                targ.Locked = true;
            }

            FinishSequence();
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:31,代码来源:MagicLock.cs


示例3: Target

		public void Target( LockableContainer targ )
		{
			if ( Multis.BaseHouse.CheckSecured( targ ) )
			{
				// You cannot cast this on a secure item.
				Caster.SendLocalizedMessage( 503098 );
			}
			else if ( CheckSequence() )
			{
				SpellHelper.Turn( Caster, targ );

				Point3D loc = targ.GetWorldLocation();

				Effects.SendLocationParticles(
					EffectItem.Create( loc, targ.Map, EffectItem.DefaultDuration ),
					0x376A, 9, 32, 5024 );

				Effects.PlaySound( loc, targ.Map, 0x1FF );

				if ( targ.Locked && targ.LockLevel != 0 )
				{
					double magery = Caster.Skills[SkillName.Magery].Value;
					int level = (int)(magery * 0.8) - 4;

					if ( targ.LockLevel == -255 )
					{
						targ.Locked = false;
						FinishSequence();
						return;
					}
					if ( level >= targ.RequiredSkill && !(targ is TreasureMapChest && ((TreasureMapChest)targ).Level > 2) )
					{
						targ.Locked = false;

						

						if ( targ.LockLevel == 0 )
							targ.LockLevel = -1;
					}
					else
					{
						// My spell does not seem to have an effect on that lock.
						Caster.LocalOverheadMessage( MessageType.Regular, 0x3B2, 503099 );
					}
				}
				else
				{
					// That did not need to be unlocked.
					Caster.LocalOverheadMessage( MessageType.Regular, 0x3B2, 503101 );
				}
			}

			FinishSequence();
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:54,代码来源:Unlock.cs


示例4: Target

        public void Target( LockableContainer targ )
        {
            if ( CheckSequence() )
            {
                SpellHelper.Turn( Caster, targ );

                Point3D loc = targ.GetWorldLocation();

                Effects.SendLocationParticles(
                    EffectItem.Create( loc, targ.Map, EffectItem.DefaultDuration ),
                    0x376A, 9, 32, 5024 );

                Effects.PlaySound( loc, targ.Map, 0x1FF );

                if ( targ.Locked )
                {
                    if ( targ.LockLevel != 0 && ( targ.LockLevel == -255 || ( targ.MaxLockLevel <= 50 && Caster.Skills[SkillName.Magery].Value > targ.RequiredSkill ) ) )
                    {
                        targ.Locked = false;

                        if ( targ.LockLevel == -255 )
                        {
                            targ.LockLevel = targ.MaxLockLevel - 30;

                            if ( targ.RequiredSkill < targ.LockLevel )
                                targ.LockLevel = targ.RequiredSkill;

                            if ( targ.LockLevel < 1 )
                                targ.LockLevel = 1;
                        }
                    }
                    else
                    {
                        // My spell does not seem to have an effect on that lock.
                        Caster.LocalOverheadMessage( MessageType.Regular, 0x3B2, 503099 );
                    }
                }
                else
                {
                    // That did not need to be unlocked.
                    Caster.LocalOverheadMessage( MessageType.Regular, 0x3B2, 503101 );
                }
            }

            FinishSequence();
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:46,代码来源:Unlock.cs


示例5: Fill

		public static void Fill(LockableContainer cont, int level, Expansion e)
		{
			cont.Movable = false;
			cont.Locked = true;
			int numberItems;

			if (level == 0)
			{
				cont.LockLevel = 0; // Can't be unlocked

				cont.DropItem(new Gold(Utility.RandomMinMax(25, 50))); // reduced from 50 100

				if (Utility.RandomDouble() < 0.75)
				{
					cont.DropItem(new TreasureMap(0, Map.Felucca));
				}
			}
			else
			{
				cont.TrapType = TrapType.ExplosionTrap;
				cont.TrapPower = level * 25;
				cont.TrapLevel = level;

				switch (level)
				{
					case 1:
						cont.RequiredSkill = 36;
						break;
					case 2:
						cont.RequiredSkill = 76;
						break;
					case 3:
						cont.RequiredSkill = 84;
						break;
					case 4:
						cont.RequiredSkill = 92;
						break;
					case 5:
						cont.RequiredSkill = 95;
						break;
					case 6:
						cont.RequiredSkill = 95;
						break;
				}

				cont.LockLevel = cont.RequiredSkill - 10;
				cont.MaxLockLevel = cont.RequiredSkill + 40;

				cont.DropItem(new Gold(level * 1000, level * 2000));

				for (int i = 0; i < level * 5; ++i)
				{
					cont.DropItem(Loot.RandomScroll(0, 63, SpellbookType.Regular));
				}

				if (e >= Expansion.SE)
				{
					switch (level)
					{
						case 1:
							numberItems = 2;
							break;
						case 2:
							numberItems = 4;
							break;
						case 3:
							numberItems = 7;
							break;
						case 4:
							numberItems = 10;
							break;
						case 5:
							numberItems = 20;
							break;
						case 6:
							numberItems = 30;
							break;
						default:
							numberItems = 0;
							break;
					}
				}
				else
				{
					numberItems = level * 6;
				}

				for (int i = 0; i < numberItems; ++i)
				{
					Item item = Loot.RandomArmorOrShieldOrWeapon();

					if (item is BaseWeapon)
					{
						var weapon = (BaseWeapon)item;

						int damageLevel = PseudoSeerStone.GetDamageLevel(level);

						if (PseudoSeerStone.HighestDamageLevelSpawn < damageLevel)
						{
							if (damageLevel == 5 && PseudoSeerStone.ReplaceVanqWithSkillScrolls)
//.........这里部分代码省略.........
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:101,代码来源:TreasureMapChest.cs


示例6: Verify

        private int Verify( LockableContainer container )
        {
            if (container == null || container.KeyValue == 0)
            {
                From.SendAsciiMessage("You can only trap lockable chests.");
                return 1005638; // You can only trap lockable chests.
            }
            if (From.Map != container.Map || !From.InRange(container.GetWorldLocation(), 2))
            {
                int OldHue = From.SpeechHue;
                From.SpeechHue = 0;
                From.SayTo(From, true, "I can't reach that.");
                From.SpeechHue = OldHue;
                return 500446; // That is too far away.
            }
            if (!container.Movable)
            {
                return 502944; // You cannot trap this item because it is locked down.
            }
            if (!container.IsAccessibleTo(From))
            {
                From.SendAsciiMessage("That belongs to someone else.");
                return 502946; // That belongs to someone else.
            }
            if (container.Locked)
            {
                From.SendAsciiMessage("You can only trap an unlocked object.");
                return 502943; // You can only trap an unlocked object.
            }
            if (container.TrapType != TrapType.None)
            {
                From.SendAsciiMessage("You can only place one trap on an object at a time.");
                return 502945; // You can only place one trap on an object at a time.
            }

            return 0;
        }
开发者ID:Godkong,项目名称:RunUO,代码行数:37,代码来源:DefTinkering.cs


示例7: Fill

 public static void Fill( LockableContainer cont, int level )
 {
 }
开发者ID:Godkong,项目名称:Origins,代码行数:3,代码来源:TreasureMapChest.cs


示例8: Fill

		public static void Fill( LockableContainer cont, int level )
		{
			cont.Movable = false;
            cont.TrapType = Utility.RandomBool() ? TrapType.PoisonTrap : TrapType.ExplosionTrap;
			cont.TrapPower = level * 25;
			cont.Locked = true;

			switch ( level )
			{
					// Adam: add level 0 (trainer chests)
				case 0: cont.RequiredSkill = Utility.RandomMinMax (30, 37) ; break;
				case 1: cont.RequiredSkill = 36; break;
				case 2: cont.RequiredSkill = 76; break;
				case 3: cont.RequiredSkill = 84; break;
				case 4: cont.RequiredSkill = 92; break;
				case 5: cont.RequiredSkill = 100; break;
			}

			cont.LockLevel = cont.RequiredSkill - 10;
			cont.MaxLockLevel = cont.RequiredSkill + 40;

			// adam: change treasure map chest loot MIN-MAX so as to decrease daily take home
			if (level != 0)
				cont.DropItem( 
					new Gold( Utility.RandomMinMax( 
						(int)(((double)((level * 1000) / 3)) * .75), // min is 75% of MAX
						(level * 1000) / 3 ) ) );

            // skin tone creme for level 4 & 5 chests
            if (Utility.RandomDouble() < 0.05 && level > 3)
            {
                cont.DropItem(new SkinHueCreme());
            }

			// adam: scrolls * 3 and not 5
			for ( int i = 0; i < level * 3; ++i )
			{
				int minCircle = level;
				int maxCircle = (level + 3);
				PackScroll( cont, minCircle, maxCircle );
			}

			// plus "level chances" for magic jewelry & clothing
			switch (level)
			{
				case 0:	// Adam: trainer chest
				case 1:	// none
					break;	
				case 2:
					PackMagicItem( cont, 1, 1, 0.05 );
					break;
				case 3:
					PackMagicItem( cont, 1, 2, 0.10 );
					PackMagicItem( cont, 1, 2, 0.05 );
					break;
				case 4:
					PackMagicItem( cont, 2, 3, 0.10 );
					PackMagicItem( cont, 2, 3, 0.05 );
					PackMagicItem( cont, 2, 3, 0.02 );
					break;
				case 5:
                    PackMagicItem(cont, 3, 3, 0.10);
                    PackMagicItem(cont, 3, 3, 0.05);
                    PackMagicItem(cont, 3, 3, 0.02);
					break;
			}

			// TreasureMap( int level, Map map
			//	5% chance to get a treasure map
			//  Changed chance for tmap to 1%
			if (level != 0)
				if (Utility.RandomDouble() < 0.01)
				{
					int mlevel = level;

					//	20% chance to get a treasure map one level better than the level of this chest
					if (Utility.RandomDouble() < 0.20)
						mlevel += (level < 5) ? 1 : 0;	// bump up the map level by one

					TreasureMap map = new TreasureMap (mlevel, Map.Felucca);
					cont.DropItem( map );				// drop it baby!
				}

			// if You're doing a level 3, 4, or 5 chest you have a 1.5%, 2%, or 2.5% chance to get a monster statue
			double chance = 0.00 + (((double)level) * 0.005);
			if ( (level > 3) && (Utility.RandomDouble() < chance) )
			{
				int ndx = level - 3;
				MonsterStatuette mx =
					new MonsterStatuette(m_monsters[ndx][Utility.Random(m_monsters[ndx].Length)]);
				mx.LootType = LootType.Regular;					// not blessed
				cont.DropItem( mx );							// drop it baby!
			}

			TreasureMapChest.PackRegs(cont, level * 10);
			TreasureMapChest.PackGems(cont, level * 5);

		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:98,代码来源:DungeonTreasureChest.cs


示例9: Fill

		public static void Fill( LockableContainer cont, int level )
		{
			cont.Movable = false;
			cont.Locked = true;

			if( level == 0 )
			{
				cont.LockLevel = 0; // Can't be unlocked

				if( Utility.RandomDouble() < 0.75 )
					cont.DropItem( new TreasureMap( 0, Map.Backtrol ) );
			}
			else
			{
				cont.TrapType = TrapType.ExplosionTrap;
				cont.TrapPower = level * 25;
				cont.TrapLevel = level;

				switch( level )
				{
					case 1: cont.RequiredSkill = 36; break;
					case 2: cont.RequiredSkill = 76; break;
					case 3: cont.RequiredSkill = 84; break;
					case 4: cont.RequiredSkill = 92; break;
					case 5: cont.RequiredSkill = 100; break;
					case 6: cont.RequiredSkill = 100; break;
				}

				cont.LockLevel = cont.RequiredSkill - 10;
				cont.MaxLockLevel = cont.RequiredSkill + 40;

				for( int i = 0; i < level * 5; ++i )
					cont.DropItem( Loot.RandomScroll( 0, 63, SpellbookType.Regular ) );

				for( int i = 0; i < level * 6; ++i )
				{
					Item item;

					if( Core.AOS )
						item = Loot.RandomArmorOrShieldOrWeaponOrJewelry();
					else
						item = Loot.RandomArmorOrShieldOrWeapon();

					if( item is BaseWeapon )
					{
						BaseWeapon weapon = (BaseWeapon)item;

						if( Core.SE )
						{
							int attributeCount;
							int min, max;

							GetRandomAOSStats( out attributeCount, out min, out max );

							BaseRunicTool.ApplyAttributesTo( weapon, attributeCount, min, max );
						}
						else
						{
							weapon.DamageLevel = (WeaponDamageLevel)Utility.Random( 6 );
							weapon.AccuracyLevel = (WeaponAccuracyLevel)Utility.Random( 6 );
							weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random( 6 );
						}

						cont.DropItem( item );
					}
					else if( item is BaseArmor )
					{
						BaseArmor armor = (BaseArmor)item;

						if( Core.SE )
						{
							int attributeCount;
							int min, max;

							GetRandomAOSStats( out attributeCount, out min, out max );

							BaseRunicTool.ApplyAttributesTo( armor, attributeCount, min, max );
						}
						else
						{
							armor.ProtectionLevel = (ArmorProtectionLevel)Utility.Random( 6 );
							armor.Durability = (ArmorDurabilityLevel)Utility.Random( 6 );
						}

						cont.DropItem( item );
					}
					else if( item is BaseHat )
					{
						BaseHat hat = (BaseHat)item;

						if( Core.SE )
						{
							int attributeCount;
							int min, max;

							GetRandomAOSStats( out attributeCount, out min, out  max );

							BaseRunicTool.ApplyAttributesTo( hat, attributeCount, min, max );
						}

//.........这里部分代码省略.........
开发者ID:greeduomacro,项目名称:hubroot,代码行数:101,代码来源:TreasureMapChest.cs


示例10: PackMagicItem

		public static void PackMagicItem( LockableContainer cont, int minLevel, int maxLevel, double chance )
		{
			if (chance <= Utility.RandomDouble())
				return;

			Item item = Loot.RandomClothingOrJewelry();

			if ( item == null )
				return;

			if ( item is BaseClothing )
				((BaseClothing)item).SetRandomMagicEffect( minLevel, maxLevel );
			else if ( item is BaseJewel )
				((BaseJewel)item).SetRandomMagicEffect( minLevel, maxLevel );

			cont.DropItem( item );
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:17,代码来源:KinRansomChest.cs


示例11: Deserialize

		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			int version = reader.ReadInt();

			switch (version)
			{
				case 2:
					{
						m_Chest = reader.ReadItem<LockableContainer>();
						m_Crate = reader.ReadItem<LockableContainer>();
						m_Filled = reader.ReadBool();
					}
					goto case 1;
				case 1:
					m_Prisoner = reader.ReadMobile<BaseCreature>();
					goto case 0;
				case 0:
					break;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:22,代码来源:OrcCamp.cs


示例12: Fill

        public static void Fill(LockableContainer cont, int level)
        {
            cont.Movable = false;
            cont.Locked = true;

            cont.TrapType = TrapType.ExplosionTrap;
            cont.TrapPower = level * 25;

            switch ( level )
            {
                case 0: cont.RequiredSkill = 1; break;
                case 1: cont.RequiredSkill = 36; break;
                case 2: cont.RequiredSkill = 76; break;
                case 3: cont.RequiredSkill = 84; break;
                case 4: cont.RequiredSkill = 92; break;
                case 5: cont.RequiredSkill = 100; break;
            }

            cont.LockLevel = cont.RequiredSkill - 10;
            cont.MaxLockLevel = cont.RequiredSkill + 40;

            double maskChance = 0.1 * level;

            if ( Utility.RandomDouble() < maskChance )
            {
                Item mask = null;
                switch ( Utility.Random( 4 ) )
                {
                    case 0: mask = new OrcishKinMask(); break;
                    case 1: mask = new TribalMask(); break;
                    case 2: mask = new DeerMask(); break;
                    case 3:
                    default:mask = new BearMask(); break;
                }

                cont.DropItem( mask );
            }

            //int gold = 1000 * level;
            //cont.DropItem( new Gold( gold ) );

            for ( int i = 0; i < level * 5; ++i )
                cont.DropItem( Loot.RandomScroll( 0, 63, SpellbookType.Regular ) );

            /*for (int i = 0; i < level * 2; i++)
            {
                cont.DropItem(new Gold(Utility.RandomMinMax(100, 600)));

                // this give magic weapons over 25% of the time with a 15% chance for a vanq even at level 1. That is insane.
                Item item = Loot.RandomArmorOrShieldOrWeapon();

                if (item is BaseWeapon)
                {
                    BaseWeapon weapon = (BaseWeapon)item;

                    weapon.DamageLevel = (WeaponDamageLevel)Utility.Random(6);
                    weapon.AccuracyLevel = (WeaponAccuracyLevel)Utility.Random(6);
                    weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random(6);

                    cont.DropItem(item);
                }
                else if (item is BaseArmor)
                {
                    BaseArmor armor = (BaseArmor)item;

                    armor.ProtectionLevel = (ArmorProtectionLevel)Utility.Random(6);
                    armor.Durability = (ArmorDurabilityLevel)Utility.Random(6);

                    cont.DropItem(item);
                }
            }*/

            for ( int i = 0; i < level; ++i )
            {
                // This is much more sane.
                LootPack.OldSuperBoss.Generate( cont );
            }

            int reagents;
            if ( level == 0 )
                reagents = 12;
            else
                reagents = level * 3;

            for ( int i = 0; i < reagents; i++ )
            {
                Item item = Loot.RandomPossibleReagent();
                item.Amount = Utility.RandomMinMax( 20, 60 );
                cont.DropItem( item );
            }

            int gems;
            if ( level == 0 )
                gems = 2;
            else
                gems = level * 3;

            for ( int i = 0; i < gems; i++ )
            {
                Item item = Loot.RandomGem();
//.........这里部分代码省略.........
开发者ID:greeduomacro,项目名称:divinity,代码行数:101,代码来源:TreasureMapChest.cs


示例13: Acquire

		private bool Acquire( object target, out int message )
		{
			LockableContainer container = target as LockableContainer;

			message = Verify( container );

			if ( message > 0 )
			{
				return false;
			}
			else
			{
				m_Container = container;
				return true;
			}
		}
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:16,代码来源:DefTinkering.cs


示例14: PackScroll

		private static void PackScroll( LockableContainer cont, int circle )
		{
			int min = (circle - 1) * 8;

			cont.DropItem( Loot.RandomScroll( min, min + 7, SpellbookType.Regular ) );
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:6,代码来源:TreasureMapChest.cs


示例15: Fill

		public static void Fill( LockableContainer cont, int level )
		{
			cont.Movable = false;
			cont.TrapEnabled = false;
			cont.Locked = false;

			int bandies = CoreAI.SpiritDepotBandies;
			int ghpots = CoreAI.SpiritDepotGHPots;
			int regs = CoreAI.SpiritDepotReagents;
			int trpots = CoreAI.SpiritDepotTRPots;

			Item item = null;

			// add a couple lesser explosion potions
			//	these are for batteling hiders in the cave and not for damage
			for( int ix=0; ix < 2; ix++ )
			{
				item = new LesserExplosionPotion();
				cont.DropItem(item);
			}

			// add bandages
			item = new Bandage(bandies);
			cont.DropItem(item);

			// add greater heal potions
			for( int ix=0; ix < ghpots; ix++ )
			{
				item = new GreaterHealPotion();
				cont.DropItem(item);
			}

			// add total refresh potions
			for( int ix=0; ix < trpots; ix++ )
			{
				item = new TotalRefreshPotion();
				cont.DropItem(item);
			}
			// drop reagents
			cont.DropItem( new BagOfReagents( regs ) );

			// drop res scroll
			cont.DropItem( new ResurrectionScroll() ); 

			return;
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:46,代码来源:SupplyDepotChest.cs


示例16: AddThemeLoot

		private static void AddThemeLoot (LockableContainer cont, int level, ChestThemeType type)
		{
			MonsterStatuette mx = null;

			//switch to add in theme treasures
			switch ( type )
			{
				case ChestThemeType.Solen:
				{

					//drop are special weapon
					QuarterStaff special = new QuarterStaff();
					special.Name = "Chitanous Staff";
					cont.DropItem(Loot.ImbueWeaponOrArmor(special, 6, 0, true));

					//go into dropping normal loot

					int onlyonedrop = Utility.RandomMinMax(0,1);

					if(onlyonedrop ==0 )cont.DropItem(new Seed(PlantType.Hedge,0,false)); //new solen seed
					if(onlyonedrop ==1 )cont.DropItem(new WaterBucket() ); //new waterbucket

					if (Utility.RandomDouble() <= 0.30 ) //30% chance to drop a statue
					{
						int whichone = Utility.RandomMinMax(0,1);
						if(whichone == 0)mx = new MonsterStatuette (m_Monster[0]);
						if(whichone == 1)mx = new MonsterStatuette (m_Monster[1]);
						mx.LootType = LootType.Regular;		// not blessed
						cont.DropItem( mx );			// drop it baby!
					}
					break;
				}

				case ChestThemeType.Brigand:
				{
					//drop are special weapon
					Katana special = new Katana();
					special.Name = "Bandit's Blade";
					cont.DropItem(Loot.ImbueWeaponOrArmor(special, 6, 0, true));

					int onlyonedrop = Utility.RandomMinMax(0,1);

					if(onlyonedrop ==0 )cont.DropItem(new Brazier(true)); //new movable brazier
					if(onlyonedrop ==1 )cont.DropItem(new DecorativeBow(Utility.RandomMinMax(0,3))); //random decorative bow type

					for ( int i = 0; i < level * 5; ++i )
					{
						cont.DropItem (new PowderOfTranslocation() );  //drop powder of translocation
					}

					if (Utility.RandomDouble() <= 0.30 ) //30% chance to drop a statue
					{
						int whichone = Utility.RandomMinMax(0,1);
						if(whichone == 0)mx = new MonsterStatuette (m_Monster[2]);
						if(whichone == 1)mx = new MonsterStatuette (m_Monster[3]);
						mx.LootType = LootType.Regular;		// not blessed
						cont.DropItem( mx );			// drop it baby!
					}
					break;
				}

				case ChestThemeType.Savage:
				{
					//drop are special weapon
					ShortSpear special = new ShortSpear();
					special.Name = "Ornate Ritual Spear";
					cont.DropItem(Loot.ImbueWeaponOrArmor(special, 6, 0, true));

					int rug = Utility.RandomMinMax(0,1);
					int onlyonedrop = Utility.RandomMinMax(0,1);

					if(onlyonedrop ==0 )cont.DropItem(new SkullPole() ); //new skull pole

					if(onlyonedrop ==1 )
					{
						if(rug == 0) cont.DropItem(new BrownBearRugEastDeed() ); //new rug east
						if(rug == 1) cont.DropItem(new BrownBearRugSouthDeed() ); //new rug south
					}

					if (Utility.RandomDouble() <= .30 ) //30% chance to drop a statue
					{
						int whichone = Utility.RandomMinMax(0,1);
						if(whichone == 0)mx = new MonsterStatuette (m_Monster[4]);
						if(whichone == 1)mx = new MonsterStatuette (m_Monster[5]);
						mx.LootType = LootType.Regular;			// not blessed
						cont.DropItem( mx );				// drop it baby!
					}
					break;
				}

				case ChestThemeType.Undead:
				{
					Halberd special = new Halberd();
					special.Name = "Soul Reaver";
					cont.DropItem(Loot.ImbueWeaponOrArmor(special, 6, 0, true));

					int onlyonedrop = Utility.RandomMinMax(0,1);
					if(onlyonedrop ==0 )cont.DropItem(new BoneContainer(Utility.RandomMinMax(0,2))); //new bone container 3 differnt types 0-2
					int stone = Utility.RandomMinMax(0,3); // get random gravestone type to drop

//.........这里部分代码省略.........
开发者ID:zerodowned,项目名称:angelisland,代码行数:101,代码来源:TreasureMapChest.cs


示例17: PackRegs

		public static void PackRegs(LockableContainer cont, int count)
		{
			ClearAmounts( TreasureMapChest.m_Regs );

			for ( int i = 0; i < count; ++i )
				m_Regs[Utility.Random( TreasureMapChest.m_Regs.Length )]++;

			AddItems( cont, TreasureMapChest.m_Regs, TreasureMapChest.m_RegTypes );
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:9,代码来源:TreasureMapChest.cs


示例18: Fill

		public static void Fill( LockableContainer cont, int level, bool IsThemed, ChestThemeType type )
		{
			cont.Movable = false;

			// the speial Overland Treasure Hunter NPC 'unlocks' the chest for you!
			if (TreasureTheme.IsOverlandTheme(type) == false)
			{
                cont.TrapType = Utility.RandomBool() ? TrapType.PoisonTrap : TrapType.ExplosionTrap;
				cont.TrapPower = level * 25;
				cont.Locked = true;
			}

			switch ( level )
			{
				case 1: cont.RequiredSkill = 36; break;
				case 2: cont.RequiredSkill = 76; break;
				case 3: cont.RequiredSkill = 84; break;
				case 4: cont.RequiredSkill = 92; break;
				case 5: cont.RequiredSkill = 100; break;
			}

			cont.LockLevel = cont.RequiredSkill - 10;
			cont.MaxLockLevel = cont.RequiredSkill + 40;

			// add theme loot
			AddThemeLoot(cont, level, type);

			// now for the gold
		    cont.DropItem( new Gold( level * 1000 ) );

			//if not a undead or pirate chest add scrolls
			if(type !=ChestThemeType.Pirate || type != ChestThemeType.Undead)
			{
				// adam: Changed to drop scrolls appropriatre for the level.
				for ( int i = 0; i < level * 5; ++i )
				{
					int minCircle = level;
					int maxCircle = (level + 3);
					PackScroll( cont, minCircle, maxCircle );
				}

			}

			// magic armor and weapons
			int count = MagicArmsThrottle(level);		// calc amount of magic armor and weapons to drop
			if (IsThemed == true) count /= 2;			// adam: Less loot if a themed chest because they get other goodies.
			for ( int i = 0; i < count; ++i )
			{
				Item item;
				item = Loot.RandomArmorOrShieldOrWeapon();
				item = Loot.ImbueWeaponOrArmor (item, level, 0.05, false);

				// erl: SDrop chance
				// ..
				if( Server.Engines.SDrop.SDropTest( item, CoreAI.EScrollChance ) )
				{
					// Drop a scroll instead
					EnchantedScroll escroll = Loot.GenEScroll((object) item);

					// Delete the original item
					item.Delete();

					// Re-reference item to escroll and continue
					item = (Item) escroll;
				}
				// ..

				cont.DropItem( item );
			}

			PackRegs(cont, level * 20);
			PackGems(cont, level * 10);
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:73,代码来源:TreasureMapChest.cs


示例19: Fill

        public static void Fill(LockableContainer cont, int luck, int level, bool isSos)
        {
			// Apply Felucca luck bonus
			if (cont.Map == Map.Felucca)
				luck += Mobiles.RandomItemGenerator.FeluccaLuckBonus;

            cont.Movable = false;
            cont.Locked = true;
            int numberItems;

            if (level == 0)
            {
                cont.LockLevel = 0; // Can't be unlocked

                cont.DropItem(new Gold(Utility.RandomMinMax(50, 100)));

                if (Utility.RandomDouble() < 0.75)
                    cont.DropItem(new TreasureMap(0, Map.Trammel));
            }
            else
            {
                cont.TrapType = TrapType.ExplosionTrap;
                cont.TrapPower = level * 25;
                cont.TrapLevel = level;

                switch (level)
                {
                    case 1:
                        cont.RequiredSkill = 5;
                        break;
                    case 2:
                        cont.RequiredSkill = 45;
                        break;
                    case 3:
                        cont.RequiredSkill = 65;
                        break;
                    case 4:
                        cont.RequiredSkill = 75;
                        break;
                    case 5:
                        cont.RequiredSkill = 75;
                        break;
                    case 6:
                        cont.RequiredSkill = 80;
                        break;
					case 7:
                        cont.RequiredSkill = 80;
                        break;
                }

                cont.LockLevel = cont.RequiredSkill - 10;
                cont.MaxLockLevel = cont.RequiredSkill + 40;

                cont.DropItem(new Gold(level * 5000));

                for (int i = 0; i < level * 5; ++i)
                    cont.DropItem(Loot.RandomScroll(0, 63, SpellbookType.Regular));

				double propsScale = 1.0;
                if (Core.SE)
                {
                    switch (level)
                    {
                        case 1:
                            numberItems = 32;
							propsScale = 0.5625;
                            break;
                        case 2:
                            numberItems = 40;
							propsScale = 0.6875;
                            break;
                        case 3:
                            numberItems = 48;
							propsScale = 0.875;
                            break;
                        case 4:
                            numberItems = 56;
                            break;
                        case 5:
                            numberItems = 64;
                            break;
                        case 6:
                            numberItems = 72;
                            break;
                        case 7:
                            numberItems = 80;
                            break;
                        default:
                            numberItems = 0;
                            break;
                    }
                }
                else
                    numberItems = level * 6;

                for (int i = 0; i < numberItems; ++i)
                {
                    Item item;

                    if (Core.AOS)
//.........这里部分代码省略.........
开发者ID:mcarriere,项目名称:ServUO,代码行数:101,代码来源:TreasureMapChest.cs


示例20: ContainerRelockTimer

 public ContainerRelockTimer(LockableContainer target)
     : base(TimeSpan.FromSeconds(60))
 {
     this.target = target;
 }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:5,代码来源:ContainerRelockTimer.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Items.MapItem类代码示例发布时间:2022-05-26
下一篇:
C# Items.LeatherGloves类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap