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


C# Item.Dye方法代码示例

本文整理汇总了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;
 }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:11,代码来源:StatuetteDyeTub.cs

示例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;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:14,代码来源:RewardMetalDyeTub.cs

示例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;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:16,代码来源:SpellbookDyeTub.cs

示例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;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:18,代码来源:BaseDyeTub.cs

示例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;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:19,代码来源:LeatherDyeTub.cs

示例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;
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:28,代码来源:FurnitureDyeTub.cs


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