Class DamageTypeExtensions
A set of extensions for DamageType.
Inheritance
Inherited Members
Namespace: Exiled.API.Extensions
Assembly: Exiled.API.dll
Syntax
public static class DamageTypeExtensions
Properties
| Improve this Doc View SourceItemConversion
Gets conversion information between ItemTypes and DamageTypes.
Declaration
public static IReadOnlyDictionary<ItemType, DamageType> ItemConversion { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyDictionary<ItemType, DamageType> |
TranslationConversion
Gets conversion information between PlayerStatsSystem.DeathTranslations and DamageTypes.
Declaration
public static IReadOnlyDictionary<DeathTranslation, DamageType> TranslationConversion { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyDictionary<PlayerStatsSystem.DeathTranslation, DamageType> |
TranslationIdConversion
Gets conversion information between PlayerStatsSystem.DeathTranslation.Ids and DamageTypes.
Declaration
public static IReadOnlyDictionary<byte, DamageType> TranslationIdConversion { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyDictionary<System.Byte, DamageType> |
Methods
| Improve this Doc View SourceGetDamageType(DamageHandlerBase)
Gets the DamageType of an PlayerStatsSystem.DamageHandlerBases.
Declaration
public static DamageType GetDamageType(DamageHandlerBase damageHandlerBase)
Parameters
Type | Name | Description |
---|---|---|
PlayerStatsSystem.DamageHandlerBase | damageHandlerBase | The DamageHandler to convert. |
Returns
Type | Description |
---|---|
DamageType | The DamageType of the PlayerStatsSystem.DamageHandlerBase. |
IsScp(DamageType, Boolean)
Check if a damage type is caused by a SCP.
Declaration
public static bool IsScp(this DamageType type, bool checkItems = true)
Parameters
Type | Name | Description |
---|---|---|
DamageType | type | The damage type to be checked. |
System.Boolean | checkItems | Indicates whether or not the SCP-items damage types should be taken into account. |
Returns
Type | Description |
---|---|
System.Boolean | Returns whether or not the DamageType is caused by SCP. |
IsStatusEffect(DamageType)
Check if a damage type is caused by a status effect.
Declaration
public static bool IsStatusEffect(this DamageType type)
Parameters
Type | Name | Description |
---|---|---|
DamageType | type | The damage type to be checked. |
Returns
Type | Description |
---|---|
System.Boolean | Returns whether or not the DamageType is caused by status effect. |
IsWeapon(DamageType, Boolean)
Check if a damage type is caused by a weapon.
Declaration
public static bool IsWeapon(this DamageType type, bool checkMicro = true)
Parameters
Type | Name | Description |
---|---|---|
DamageType | type | The damage type to be checked. |
System.Boolean | checkMicro | Indicates whether or not the MicroHid damage type should be taken into account. |
Returns
Type | Description |
---|---|
System.Boolean | Returns whether or not the DamageType is caused by weapon. |