Table of Contents

Class UnitAspect

Namespace
RisingV.Core.Aspects
Assembly
RisingV.Core.dll
public class UnitAspect : EntityAspect, IAspect<Entity>, IAspect
Inheritance
BaseAspect<Entity>
UnitAspect
Implements
IAspect<Entity>
Derived
Inherited Members
Extension Methods

Constructors

UnitAspect(EntityAspect, bool)

Initializes a new instance of the EntityAspect class with another aspect.

public UnitAspect(EntityAspect aspect, bool strict = true)

Parameters

aspect EntityAspect

The aspect to copy from.

strict bool

If true, the aspect will throw an exception if the entity is null.

Exceptions

ArgumentNullException

Thrown when the entity of the aspect is null.

UnitAspect(Entity, bool)

Initializes a new instance of the EntityAspect class with the specified entity.

public UnitAspect(Entity entity, bool strict = true)

Parameters

entity Entity

The entity to associate with this aspect.

strict bool

If true, the aspect will throw an exception if the entity is null.

Exceptions

ArgumentNullException

Thrown when the entity is null.

Properties

CurrentHealth

public virtual float? CurrentHealth { get; }

Property Value

float?

Health

public virtual Health? Health { get; }

Property Value

Health?

IsDead

public virtual bool IsDead { get; }

Property Value

bool

Level

public virtual float? Level { get; }

Property Value

float?

MaxHealth

public virtual float? MaxHealth { get; }

Property Value

float?

PrefabEnum

public Unit PrefabEnum { get; }

Property Value

Unit

Queries

public static UnitQueries Queries { get; }

Property Value

UnitQueries

UnitLevel

public virtual UnitLevel? UnitLevel { get; }

Property Value

UnitLevel?

UnitRespawnTime

public virtual UnitRespawnTime? UnitRespawnTime { get; }

Property Value

UnitRespawnTime?

UnitStats

public virtual UnitStats? UnitStats { get; }

Property Value

UnitStats?

Methods

AddHealth(float)

Adds health to the entity's health component, clamping it to the maximum health if set.

public void AddHealth(float value)

Parameters

value float

The amount of health to add (supports negative values).

DisableAggro()

Disables aggro for the entity, preventing others from attacking it.

public void DisableAggro()

GiveKnockbackResistance(bool)

Gives the entity knockback resistance, preventing it from being knocked back or grabbed.

public void GiveKnockbackResistance(bool rooted)

Parameters

rooted bool

If true, the entity will not be knocked back or grabbed, simulating a rooted state.

Is(Entity)

public static bool Is(Entity entity)

Parameters

entity Entity

Returns

bool

ModifyAggroRadius(float, float?, float?, float?)

Modifies the aggro radius of the entity.

public void ModifyAggroRadius(float aggroCircleRadius, float? aggroConeRadius = null, float? alertCircleRadius = null, float? alertConeRadius = null)

Parameters

aggroCircleRadius float

The radius of the aggro circle.

aggroConeRadius float?

The radius of the aggro cone. If null, defaults to the aggro circle radius.

alertCircleRadius float?

The radius of the alert circle. If null, defaults to the aggro circle radius.

alertConeRadius float?

The radius of the alert cone. If null, defaults to the aggro cone radius or aggro circle radius.

ModifyBuff(BuffModificationTypes, bool)

Modifies a buff entity with specified modification types.

public void ModifyBuff(BuffModificationTypes buffModificationTypes, bool overwrite = false)

Parameters

buffModificationTypes BuffModificationTypes

The types of modifications to apply.

overwrite bool

If true, clears existing modifications before applying new ones.

Qualifies(Entity)

Checks if the entity qualifies for this aspect.

public override bool Qualifies(Entity entity)

Parameters

entity Entity

Returns

bool

Returns true if the entity qualifies, otherwise false.

SetHealth(float)

Sets the health of the entity's health component, clamping it to the maximum health if set.

public void SetHealth(float value)

Parameters

value float

The health value to set.

SetMaxHealth(float)

Sets the maximum health of the entity's health component.

public void SetMaxHealth(float value)

Parameters

value float

The maximum health value to set.

SetMaxRecoveryHealth(float)

Sets the maximum recovery health of the entity's health component.

public void SetMaxRecoveryHealth(float value)

Parameters

value float

The maximum recovery health value to set.