C# Class Server.Items.CraftResources

Afficher le fichier Open project: Grimoric/RunUO.T2A Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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

GetFromOreInfo() public static méthode

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
Résultat CraftResource

GetFromType() public static méthode

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
Résultat CraftResource

GetHue() public static méthode

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

GetIndex() public static méthode

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

GetInfo() public static méthode

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

GetLocalizationNumber() public static méthode

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

GetName() public static méthode

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
Résultat string

GetStart() public static méthode

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

GetType() public static méthode

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

IsStandard() public static méthode

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

RegisterType() public static méthode

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
Résultat void