|
static byte | AsByte (this sbyte value) |
| Reinterprets the specified value as an unsigned byte. More...
|
|
static int | AsInt (this uint value) |
| Reinterprets the specified value as an int. More...
|
|
static long | AsLong (this ulong value) |
| Reinterprets the specified value as a long. More...
|
|
static sbyte | AsSByte (this byte value) |
| Reinterprets the specified value as a signed byte. More...
|
|
static short | AsShort (this ushort value) |
| Reinterprets the specified value as a signed short. More...
|
|
static uint | AsUInt (this int value) |
| Reinterprets the specified value as an unsigned int. More...
|
|
static ulong | AsULong (this long value) |
| Reinterprets the specified value as an unsigned long. More...
|
|
static ushort | AsUShort (this short value) |
| Reinterprets the specified value as an unsigned short. More...
|
|
static bool | ToBool (this int value) |
| Reinterprets the specified value as a boolean. More...
|
|
static int | ToInt (this bool value) |
| Reinterprets the specified value as a integer. More...
|
|
static ? NwObject | ToNwObject (this uint objectId) |
| Converts the specified object ID value into a managed game object. More...
|
|
static ? T | ToNwObject< T > (this uint objectId) |
| Converts the specified object ID value into a managed game object. More...
|
|
static ? T | ToNwObjectSafe< T > (this uint objectId) |
| Converts the specified object ID value into a managed game object. More...
|
|
static unsafe? NwPlayer | ToNwPlayer (this uint objectId, PlayerSearch playerSearch=PlayerSearch.All) |
| Converts the specified object ID value into a managed player object. More...
|
|
◆ AsByte()
static byte Anvil.API.IntegerExtensions.AsByte |
( |
this sbyte |
value | ) |
|
|
inlinestatic |
Reinterprets the specified value as an unsigned byte.
- Parameters
-
value | The value to reinterpret. |
- Returns
- The reinterpreted value.
◆ AsInt()
static int Anvil.API.IntegerExtensions.AsInt |
( |
this uint |
value | ) |
|
|
inlinestatic |
Reinterprets the specified value as an int.
- Parameters
-
value | The value to reinterpret. |
- Returns
- The reinterpreted value.
◆ AsLong()
static long Anvil.API.IntegerExtensions.AsLong |
( |
this ulong |
value | ) |
|
|
inlinestatic |
Reinterprets the specified value as a long.
- Parameters
-
value | The value to reinterpret. |
- Returns
- The reinterpreted value.
◆ AsSByte()
static sbyte Anvil.API.IntegerExtensions.AsSByte |
( |
this byte |
value | ) |
|
|
inlinestatic |
Reinterprets the specified value as a signed byte.
- Parameters
-
value | The value to reinterpret. |
- Returns
- The reinterpreted value.
◆ AsShort()
static short Anvil.API.IntegerExtensions.AsShort |
( |
this ushort |
value | ) |
|
|
inlinestatic |
Reinterprets the specified value as a signed short.
- Parameters
-
value | The value to reinterpret. |
- Returns
- The reinterpreted value.
◆ AsUInt()
static uint Anvil.API.IntegerExtensions.AsUInt |
( |
this int |
value | ) |
|
|
inlinestatic |
Reinterprets the specified value as an unsigned int.
- Parameters
-
value | The value to reinterpret. |
- Returns
- The reinterpreted value.
◆ AsULong()
static ulong Anvil.API.IntegerExtensions.AsULong |
( |
this long |
value | ) |
|
|
inlinestatic |
Reinterprets the specified value as an unsigned long.
- Parameters
-
value | The value to reinterpret. |
- Returns
- The reinterpreted value.
◆ AsUShort()
static ushort Anvil.API.IntegerExtensions.AsUShort |
( |
this short |
value | ) |
|
|
inlinestatic |
Reinterprets the specified value as an unsigned short.
- Parameters
-
value | The value to reinterpret. |
- Returns
- The reinterpreted value.
◆ ToBool()
static bool Anvil.API.IntegerExtensions.ToBool |
( |
this int |
value | ) |
|
|
inlinestatic |
Reinterprets the specified value as a boolean.
- Parameters
-
value | The value to reinterpret. |
- Returns
- False if the value is 0, true for any non-0 value.
◆ ToInt()
static int Anvil.API.IntegerExtensions.ToInt |
( |
this bool |
value | ) |
|
|
inlinestatic |
Reinterprets the specified value as a integer.
- Parameters
-
value | The value to reinterpret. |
- Returns
- 1 if true, 0 if false.
◆ ToNwObject()
static ? NwObject Anvil.API.IntegerExtensions.ToNwObject |
( |
this uint |
objectId | ) |
|
|
inlinestatic |
Converts the specified object ID value into a managed game object.
- Parameters
-
objectId | The object ID to convert. |
- Returns
- The associated object if it exists, otherwise null.
◆ ToNwObject< T >()
Converts the specified object ID value into a managed game object.
- Parameters
-
objectId | The object ID to convert. |
- Template Parameters
-
T | The expected object type. |
- Returns
- The associated object if it exists, otherwise null.
- Exceptions
-
InvalidCastException | Thrown if the object associated with the object ID is not of type T. |
◆ ToNwObjectSafe< T >()
static ? T Anvil.API.IntegerExtensions.ToNwObjectSafe< T > |
( |
this uint |
objectId | ) |
|
|
inlinestatic |
Converts the specified object ID value into a managed game object.
- Parameters
-
objectId | The object ID to convert. |
- Template Parameters
-
T | The expected object type. |
- Returns
- The associated object if it exists and is of type T, otherwise null.
◆ ToNwPlayer()
static unsafe? NwPlayer Anvil.API.IntegerExtensions.ToNwPlayer |
( |
this uint |
objectId, |
|
|
PlayerSearch |
playerSearch = PlayerSearch.All |
|
) |
| |
|
inlinestatic |
Converts the specified object ID value into a managed player object.
- Parameters
-
objectId | The object ID to convert. |
playerSearch | Methods to use to resolve the player. |
- Returns
- The associated player for this object, otherwise null.
The documentation for this class was generated from the following file:
- NWN.Anvil/src/main/API/Extensions/IntegerExtensions.cs