C# Class Server.Items.CraftResources

Mostrar archivo Open project: Grimoric/RunUO.T2A Class Usage Examples

Public Methods

Method Description
GetFromOreInfo ( OreInfo info ) : CraftResource

Returns the CraftResource value which represents 'info' -or- CraftResource.None if unable to convert.

GetFromOreInfo ( OreInfo info, ArmorMaterialType material ) : CraftResource

Returns the CraftResource value which represents 'info', using 'material' to help resolve leather OreInfo instances.

GetFromType ( Type resourceType ) : CraftResource

Returns the CraftResource value for which 'resourceType' uses -or- CraftResource.None if an unregistered type was specified.

GetHue ( CraftResource resource ) : int

Returns the CraftResourceInfo.Hue property of 'resource' -or- 0 if an invalid resource was specified.

GetIndex ( CraftResource resource ) : int

Returns the index of 'resource' in the seriest of resources for which it belongs.

GetInfo ( CraftResource resource ) : CraftResourceInfo

Returns a CraftResourceInfo instance describing 'resource' -or- null if an invalid resource was specified.

GetLocalizationNumber ( CraftResource resource ) : int

Returns the CraftResourceInfo.Number property of 'resource' -or- 0 if an invalid resource was specified.

GetName ( CraftResource resource ) : string

Returns the CraftResourceInfo.Name property of 'resource' -or- an empty string if the resource specified was invalid.

GetStart ( CraftResource resource ) : CraftResource

Returns the first CraftResource in the series of resources for which 'resource' belongs.

GetType ( CraftResource resource ) : CraftResourceType

Returns a CraftResourceType value indiciating the type of 'resource'.

IsStandard ( CraftResource resource ) : bool

Returns true if 'resource' is None, Iron, RegularLeather or RegularWood. False if otherwise.

RegisterType ( Type resourceType, CraftResource resource ) : void

Registers that 'resourceType' uses 'resource' so that it can later be queried by CraftResources.GetFromType

Method Details

GetFromOreInfo() public static method

Returns the CraftResource value which represents 'info' -or- CraftResource.None if unable to convert.
public static GetFromOreInfo ( OreInfo info ) : CraftResource
info OreInfo
return CraftResource

GetFromOreInfo() public static method

Returns the CraftResource value which represents 'info', using 'material' to help resolve leather OreInfo instances.
public static GetFromOreInfo ( OreInfo info, ArmorMaterialType material ) : CraftResource
info OreInfo
material ArmorMaterialType
return CraftResource

GetFromType() public static method

Returns the CraftResource value for which 'resourceType' uses -or- CraftResource.None if an unregistered type was specified.
public static GetFromType ( Type resourceType ) : CraftResource
resourceType System.Type
return CraftResource

GetHue() public static method

Returns the CraftResourceInfo.Hue property of 'resource' -or- 0 if an invalid resource was specified.
public static GetHue ( CraftResource resource ) : int
resource CraftResource
return int

GetIndex() public static method

Returns the index of 'resource' in the seriest of resources for which it belongs.
public static GetIndex ( CraftResource resource ) : int
resource CraftResource
return int

GetInfo() public static method

Returns a CraftResourceInfo instance describing 'resource' -or- null if an invalid resource was specified.
public static GetInfo ( CraftResource resource ) : CraftResourceInfo
resource CraftResource
return CraftResourceInfo

GetLocalizationNumber() public static method

Returns the CraftResourceInfo.Number property of 'resource' -or- 0 if an invalid resource was specified.
public static GetLocalizationNumber ( CraftResource resource ) : int
resource CraftResource
return int

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

GetStart() public static method

Returns the first CraftResource in the series of resources for which 'resource' belongs.
public static GetStart ( CraftResource resource ) : CraftResource
resource CraftResource
return CraftResource

GetType() public static method

Returns a CraftResourceType value indiciating the type of 'resource'.
public static GetType ( CraftResource resource ) : CraftResourceType
resource CraftResource
return CraftResourceType

IsStandard() public static method

Returns true if 'resource' is None, Iron, RegularLeather or RegularWood. False if otherwise.
public static IsStandard ( CraftResource resource ) : bool
resource CraftResource
return bool

RegisterType() public static method

Registers that 'resourceType' uses 'resource' so that it can later be queried by CraftResources.GetFromType
public static RegisterType ( Type resourceType, CraftResource resource ) : void
resourceType System.Type
resource CraftResource
return void