Class ChampionUtils
Inheritance
Inherited Members
Namespace: MingweiSamuel.Camille.Enums
Assembly: Camille.dll
Syntax
public static class ChampionUtils
Methods
| Improve this Doc View SourceIdentifier(Champion, Boolean)
Returns the champion's string identifier.
This is generally the same as their Name with spaces and symbols removed with notable exceptions in "MonkeyKing" (Wu Kong) and "Nunu" (Nunu & Willump).
Declaration
public static string Identifier(this Champion val, bool throwOnUnknown = false)
Parameters
Type | Name | Description |
---|---|---|
Champion | val | The Champion value. |
System.Boolean | throwOnUnknown | If false (default), will return "UNKNOWN" on unknown champions. If true, throws an InvalidOperationException on unknown champions. |
Returns
Type | Description |
---|---|
System.String | Champion's string identifier or "UNKNOWN". |
Name(Champion, Boolean)
Return's the champion's human-readable name (en-US).
Declaration
public static string Name(this Champion val, bool throwOnUnknown = false)
Parameters
Type | Name | Description |
---|---|---|
Champion | val | The Champion value. |
System.Boolean | throwOnUnknown | If false (default), will return "UNKNOWN" on unknown champions. If true, throws an InvalidOperationException on unknown champions. |
Returns
Type | Description |
---|---|
System.String | Champion's name or "UNKNOWN". |
Parse(String, Boolean)
Return's the Champion corresponding to a champion's string identifier or (en-US) name.
This method will only look at the first four alphabetic characters in the given string.
Declaration
public static Champion Parse(string val, bool throwOnUnknown = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | val | The string identifier or name. Only the first four alphabetic characters will be looked at. |
System.Boolean | throwOnUnknown | If false (default), will return 0 on unknown strings. If true, throws an InvalidOperationException on unknown strings. |
Returns
Type | Description |
---|---|
Champion | Champion enum or 0. |