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


C# BaseCreature.FindItemOnLayer方法代码示例

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


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

示例1: EquipItems

		private void EquipItems( BaseCreature bc )
		{
			bc.AddItem( new RingmailChest() );
			bc.AddItem( new RingmailLegs() );
			bc.AddItem( new RingmailArms() );
			bc.AddItem( new RingmailGloves() );
			bc.AddItem( new PlateGorget() );
			bc.AddItem( new LeatherCap() );

			switch( Utility.Random( 4 ) )
			{
				case 0: bc.AddItem( new Halberd() ); break;
				case 1: bc.AddItem( new Longsword() ); break;
				case 2: bc.AddItem( new VikingSword() ); break;
				case 3: bc.AddItem( new Broadsword() ); break;
			}

			if( bc.FindItemOnLayer( Layer.TwoHanded ) == null )
			{
				switch( Utility.Random( 4 ) )
				{
					case 0: bc.AddItem( new BronzeShield() ); break;
					case 1: bc.AddItem( new MetalKiteShield() ); break;
					case 2: bc.AddItem( new HeaterShield() ); break;
					case 3: bc.AddItem( new WoodenKiteShield() ); break;
				}
			}

			switch( Utility.Random( 3 ) )
			{
				case 0:
				case 1: bc.AddItem( new Boots() ); break;
				case 2: bc.AddItem( new ThighBoots() ); break;
			}

			if( Utility.RandomBool() )
				bc.AddItem( new Cloak( Utility.RandomDyedHue() ) );
		}
开发者ID:greeduomacro,项目名称:hubroot,代码行数:38,代码来源:MilitiaWarrior.cs

示例2: TryPackOpen

        public static void TryPackOpen( BaseCreature squire, Mobile from )
        {
            if ( squire.IsDeadPet )
                return;

            Item QuiverCheck = squire.FindItemOnLayer( Layer.Cloak );

            if( QuiverCheck is BaseQuiver )
            {
                Container item = (Container)QuiverCheck;

                if ( CheckAccess( squire, from ) )
                {
                    if ( item != null )
                    {
                        from.Use( item );
                        if( ((Squire)squire).m_SquireBeQuiet == false )
                        {
                            SquireDialog.DoSquireDialog( from, ((Squire)squire), SquireDialogTree.OpenQuiver, null, null );
                        }
                    }
                }
            }
            else
            {
                if( ((Squire)squire).m_SquireBeQuiet == false )
                {
                    SquireDialog.DoSquireDialog( from, ((Squire)squire), SquireDialogTree.NotAQuiver, null, null );
                }
            }
        }
开发者ID:Ziden,项目名称:ServUO-EC-Test-Fork,代码行数:31,代码来源:SquireFunctions.cs


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