Server.Items.CraftResources.GetName C# (CSharp) Method

GetName() public static method

Returns the CraftResourceInfo.Name property of 'resource' -or- an empty string if the resource specified was invalid.
public static GetName ( CraftResource resource ) : string
resource CraftResource
return string
		public static string GetName( CraftResource resource )
		{
			CraftResourceInfo info = GetInfo( resource );

			return ( info == null ? String.Empty : info.Name );
		}

Usage Example

Ejemplo n.º 1
0
        public override void OnSingleClick(Mobile from)
        {
            LabelToExpansion(from);

            string v = " ";

            if (!CraftResources.IsStandard(Resource))
            {
                int num = CraftResources.GetLocalizationNumber(Resource);

                if (num > 0)
                {
                    v = String.Format("#{0}", num);
                }
                else
                {
                    v = CraftResources.GetName(Resource);
                }
            }

            LabelTo(from, 1061119, v);               // ~1_LEATHER_TYPE~ runic sewing kit

            if (ShowUsesRemaining)
            {
                DisplayDurabilityTo(from);
            }
        }
All Usage Examples Of Server.Items.CraftResources::GetName