Table of Contents

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

IReadOnlyDictionary<byte, DamageType>

Methods

GetDamageType(DamageHandlerBase)

Gets the DamageType of an PlayerStatsSystem.DamageHandlerBases.

public static DamageType GetDamageType(DamageHandlerBase damageHandlerBase)

Parameters

damageHandlerBase DamageHandlerBase

The 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 DamageType

The damage type to be checked.

checkItems bool

Indicates 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 DamageType

The 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 DamageType

The damage type to be checked.

checkMicro bool

Indicates whether the MicroHid damage type should be taken into account.

Returns

bool

Returns whether the DamageType is caused by weapon.