本文整理汇总了C#中Item.Dye方法的典型用法代码示例。如果您正苦于以下问题:C# Item.Dye方法的具体用法?C# Item.Dye怎么用?C# Item.Dye使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Item
的用法示例。
在下文中一共展示了Item.Dye方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Dye
public override bool Dye( Mobile from, Item item )
{
if ( !item.Movable )
from.SendLocalizedMessage( 1049779 ); // You cannot dye statuettes that are locked down.
else if ( item.Dye( from, this ) )
{
from.PlaySound( 0x23E );
return true;
}
return false;
}
示例2: Dye
public override bool Dye( Mobile from, Item item )
{
if ( !item.Movable )
from.SendLocalizedMessage( 1080395 ); // You may not dye metal items which are locked down.
else if ( item.Parent is Mobile )
from.SendLocalizedMessage( 500861 ); // Can't Dye clothing that is being worn.
else if ( item.Dye( from, this ) )
{
from.PlaySound( 0x23E );
return true;
}
return false;
}
示例3: Dye
public override bool Dye( Mobile from, Item item )
{
if ( !item.Movable )
from.SendMessage( "You cannot dye spellbooks which are locked down." );
else if ( item.Parent is Mobile )
from.SendMessage( "You cannot dye spellbooks that are being worn." );
else if ( item.Dye( from, this ) )
{
from.PlaySound( 0x23E );
return true;
}
else
TextDefinition.SendMessageTo( from, FailMessage );
return false;
}
示例4: Dye
public virtual bool Dye(Mobile from, Item item)
{
if (item.Parent is Mobile)
{
from.SendMessage("You decided not to dye this while it is worn."); // Can't Dye clothing that is being worn.
}
else if (item.Dye(from, this))
{
from.PlaySound(0x23E);
return true;
}
else
{
TextDefinition.SendMessageTo(from, FailMessage);
}
return false;
}
示例5: Dye
public override bool Dye( Mobile from, Item item )
{
if ( !item.Movable )
from.SendLocalizedMessage( 1042419 ); // You may not dye leather items which are locked down.
else if ( item.Parent is Mobile )
from.SendLocalizedMessage( 500861 ); // Can't Dye clothing that is being worn.
else if (!(item is BaseArmor) && !(item is BaseLeather))
{
from.SendMessage("This is not a piece of leather or leather armor!");
return false;
}
else if ( item.Dye( from, this ) )
{
from.PlaySound( 0x23E );
return true;
}
return false;
}
示例6: Dye
public override bool Dye( Mobile from, Item item )
{
bool okay = ( item.IsChildOf( from.Backpack ) );
if ( !okay )
{
if ( item.RootParent == null )
{
BaseHouse house = BaseHouse.FindHouseAt( item );
if ( house == null || ( !house.IsLockedDown( item ) && !house.IsSecure( item ) ) )
from.SendLocalizedMessage( 501022 ); // Furniture must be locked down to paint it.
else if ( !house.IsCoOwner( from ) )
from.SendLocalizedMessage( 501023 ); // You must be the owner to use this item.
else
okay = true;
}
else
from.SendLocalizedMessage( 1048135 ); // The furniture must be in your backpack to be painted.
}
if ( okay && item.Dye( from, this ) )
{
from.PlaySound( 0x23E );
return true;
}
return false;
}