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