本文整理汇总了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() ) );
}
示例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 );
}
}
}