C# Class Ensage.Common.Extensions.AbilityExtensions

Mostra file Open project: EnsageSharp/Ensage.Common

Public Methods

Method Description
CanBeCasted ( this ability, Unit target ) : bool

Checks if given ability can be used

CanBeCasted ( this ability, float bonusMana ) : bool

Checks if given ability can be used

CanHit ( this ability, Unit target, System.Vector3 sourcePosition, string abilityName = null ) : bool

Checks if you could hit hero with given ability

CanHit ( this ability, Unit target, string abilityName = null ) : bool

The can hit.

CastSkillShot ( this ability, Unit target, System.Vector3 sourcePosition, string abilityName = null, Ability soulRing = null, List otherTargets = null ) : bool

Uses prediction to cast given skill shot ability

CastSkillShot ( this ability, Unit target, string abilityName = null, Ability soulRing = null, List otherTargets = null ) : bool

The cast skill shot.

CastStun ( this ability, Unit target, System.Vector3 sourcePosition, float straightTimeforSkillShot, bool chainStun = true, bool useSleep = true, string abilityName = null, Ability soulRing = null, List otherTargets = null ) : bool

Uses given ability in case enemy is not disabled or would be chain stunned.

CastStun ( this ability, Unit target, float straightTimeforSkillShot, bool chainStun = true, bool useSleep = true, string abilityName = null, Ability soulRing = null ) : bool

The cast stun.

ChannelTime ( this ability, string abilityName = null ) : float

The channel time.

ChannelTime ( this ability, uint abilityLevel, string abilityName = null ) : float

The channel time.

CommonProperties ( this ability ) : AbilityInfo

The common properties.

EndRadius ( this ability ) : float

The end radius.

FindCastPoint ( this ability, string abilityName = null ) : double

Returns cast point of given ability

GetAbilityData ( this ability, string dataName, uint level, string abilityName = null ) : float

Returns ability data with given name, checks if data are level dependent or not

GetCastDelay ( this ability, Hero source, Unit target, bool usePing = false, bool useCastPoint = true, string abilityName = null, bool useChannel = false ) : double

The get cast delay.

GetCastDelay ( this ability, Unit source, Unit target, bool usePing = false, bool useCastPoint = true, string abilityName = null, bool useChannel = false ) : double

The get cast delay.

GetCastDelay ( this ability, Unit source, Unit target, uint abilityLevel, bool usePing = false, bool useCastPoint = true, string abilityName = null, bool useChannel = false ) : double

Returns delay before ability is casted

GetCastRange ( this ability, string abilityName = null ) : float

Returns cast range of ability, if ability is NonTargeted it will return its radius!

GetHitDelay ( this ability, Unit target, string abilityName = null ) : double

Checks all aspects and returns full delay before target gets hit by given ability

GetPrediction ( this ability, Unit target, double customDelay, string abilityName = null ) : System.Vector3

Returns prediction for given target after given ability hit delay

GetProjectileSpeed ( this ability, string abilityName = null ) : float

The get projectile speed.

GetProjectileSpeed ( this ability, uint abilityLevel, string abilityName = null ) : float

Returns projectile speed of the ability

GetRadius ( this ability, string abilityName = null ) : float

Returns impact radius of given ability

InvoCanBeCasted ( this ability, Ability invoke, Ability spell4, Ability spell5 ) : bool

Checks if this ability can be casted by Invoker, if the ability is not currently invoked, it is going to check for both invoke and the ability mana cost.

IsAbilityBehavior ( this ability, AbilityBehavior flag, string abilityName = null ) : bool

Checks if given ability has given ability behavior flag

IsAbilityType ( this ability, AbilityType type, string abilityName = null ) : bool

The is ability type.

IsDisable ( this ability ) : bool

The is disable.

IsHeal ( this ability ) : bool

The is heal.

IsInvis ( this ability ) : bool

The is invisibility.

IsManaburn ( this ability ) : bool

The is manaburn.

IsNuke ( this ability ) : bool

The is nuke.

IsPurge ( this ability ) : bool

The is purge.

IsShield ( this ability ) : bool

The is shield.

IsSilence ( this ability ) : bool

The is silence.

IsSkillShot ( this ability ) : bool

The is skill shot.

IsSlow ( this ability ) : bool

The is slow.

PiercesMagicImmunity ( this ability ) : bool

The pierces magic immunity.

RequiresCharges ( this ability, string abilityName = null ) : bool

The requires charges.

TravelDistance ( this ability ) : float

The travel distance.

Private Methods

Method Description
Init ( ) : void

The initialize.

Method Details

CanBeCasted() public static method

Checks if given ability can be used
public static CanBeCasted ( this ability, Unit target ) : bool
ability this /// The ability. ///
target Unit /// The target. ///
return bool

CanBeCasted() public static method

Checks if given ability can be used
public static CanBeCasted ( this ability, float bonusMana ) : bool
ability this /// The ability. ///
bonusMana float /// The bonus Mana. ///
return bool

CanHit() public static method

Checks if you could hit hero with given ability
public static CanHit ( this ability, Unit target, System.Vector3 sourcePosition, string abilityName = null ) : bool
ability this /// The ability. ///
target Unit /// The target. ///
sourcePosition System.Vector3 /// The source Position. ///
abilityName string /// The ability Name. ///
return bool

CanHit() public static method

The can hit.
public static CanHit ( this ability, Unit target, string abilityName = null ) : bool
ability this /// The ability. ///
target Unit /// The target. ///
abilityName string /// The ability name. ///
return bool

CastSkillShot() public static method

Uses prediction to cast given skill shot ability
public static CastSkillShot ( this ability, Unit target, System.Vector3 sourcePosition, string abilityName = null, Ability soulRing = null, List otherTargets = null ) : bool
ability this /// The ability. ///
target Unit /// The target. ///
sourcePosition System.Vector3 /// The source Position. ///
abilityName string /// The ability Name. ///
soulRing Ability /// The soul Ring. ///
otherTargets List /// Targets which are supposed to be hit by AOE Skill Shot ///
return bool

CastSkillShot() public static method

The cast skill shot.
public static CastSkillShot ( this ability, Unit target, string abilityName = null, Ability soulRing = null, List otherTargets = null ) : bool
ability this /// The ability. ///
target Unit /// The target. ///
abilityName string /// The ability name. ///
soulRing Ability /// The soul ring. ///
otherTargets List /// The other targets. ///
return bool

CastStun() public static method

Uses given ability in case enemy is not disabled or would be chain stunned.
public static CastStun ( this ability, Unit target, System.Vector3 sourcePosition, float straightTimeforSkillShot, bool chainStun = true, bool useSleep = true, string abilityName = null, Ability soulRing = null, List otherTargets = null ) : bool
ability this /// The ability. ///
target Unit /// The target. ///
sourcePosition System.Vector3 /// The source Position. ///
straightTimeforSkillShot float /// The straight Time for Skill Shot. ///
chainStun bool /// The chain Stun. ///
useSleep bool /// The use Sleep. ///
abilityName string /// The ability Name. ///
soulRing Ability /// The soul Ring. ///
otherTargets List /// The other Targets. ///
return bool

CastStun() public static method

The cast stun.
public static CastStun ( this ability, Unit target, float straightTimeforSkillShot, bool chainStun = true, bool useSleep = true, string abilityName = null, Ability soulRing = null ) : bool
ability this /// The ability. ///
target Unit /// The target. ///
straightTimeforSkillShot float /// The straight time for skill shot. ///
chainStun bool /// The chain stun. ///
useSleep bool /// The use sleep. ///
abilityName string /// The ability name. ///
soulRing Ability /// The soul ring. ///
return bool

ChannelTime() public static method

The channel time.
public static ChannelTime ( this ability, string abilityName = null ) : float
ability this /// The ability. ///
abilityName string /// The ability name. ///
return float

ChannelTime() public static method

The channel time.
public static ChannelTime ( this ability, uint abilityLevel, string abilityName = null ) : float
ability this /// The ability. ///
abilityLevel uint /// The ability Level. ///
abilityName string /// The ability name. ///
return float

CommonProperties() public static method

The common properties.
public static CommonProperties ( this ability ) : AbilityInfo
ability this /// The ability. ///
return Ensage.Common.AbilityInfo.AbilityInfo

EndRadius() public static method

The end radius.
public static EndRadius ( this ability ) : float
ability this /// The ability. ///
return float

FindCastPoint() public static method

Returns cast point of given ability
public static FindCastPoint ( this ability, string abilityName = null ) : double
ability this /// The ability. ///
abilityName string /// The ability Name. ///
return double

GetAbilityData() public static method

Returns ability data with given name, checks if data are level dependent or not
public static GetAbilityData ( this ability, string dataName, uint level, string abilityName = null ) : float
ability this /// The ability. ///
dataName string /// The data Name. ///
level uint /// Custom level ///
abilityName string /// The ability Name. ///
return float

GetCastDelay() public static method

The get cast delay.
public static GetCastDelay ( this ability, Hero source, Unit target, bool usePing = false, bool useCastPoint = true, string abilityName = null, bool useChannel = false ) : double
ability this /// The ability. ///
source Hero /// The source. ///
target Unit /// The target. ///
usePing bool /// The use ping. ///
useCastPoint bool /// The use cast point. ///
abilityName string /// The ability name. ///
useChannel bool /// The use channel. ///
return double

GetCastDelay() public static method

The get cast delay.
public static GetCastDelay ( this ability, Unit source, Unit target, bool usePing = false, bool useCastPoint = true, string abilityName = null, bool useChannel = false ) : double
ability this /// The ability. ///
source Unit /// The source. ///
target Unit /// The target. ///
usePing bool /// The use ping. ///
useCastPoint bool /// The use cast point. ///
abilityName string /// The ability name. ///
useChannel bool /// The use channel. ///
return double

GetCastDelay() public static method

Returns delay before ability is casted
public static GetCastDelay ( this ability, Unit source, Unit target, uint abilityLevel, bool usePing = false, bool useCastPoint = true, string abilityName = null, bool useChannel = false ) : double
ability this /// The ability. ///
source Unit /// The source. ///
target Unit /// The target. ///
abilityLevel uint /// The ability Level. ///
usePing bool /// The use Ping. ///
useCastPoint bool /// The use Cast Point. ///
abilityName string /// The ability Name. ///
useChannel bool /// The use Channel. ///
return double

GetCastRange() public static method

Returns cast range of ability, if ability is NonTargeted it will return its radius!
public static GetCastRange ( this ability, string abilityName = null ) : float
ability this /// The ability. ///
abilityName string /// The ability Name. ///
return float

GetHitDelay() public static method

Checks all aspects and returns full delay before target gets hit by given ability
public static GetHitDelay ( this ability, Unit target, string abilityName = null ) : double
ability this /// The ability. ///
target Unit /// The target. ///
abilityName string /// The ability Name. ///
return double

GetPrediction() public static method

Returns prediction for given target after given ability hit delay
public static GetPrediction ( this ability, Unit target, double customDelay, string abilityName = null ) : System.Vector3
ability this /// The ability. ///
target Unit /// The target. ///
customDelay double /// enter your custom delay ///
abilityName string /// The ability Name. ///
return System.Vector3

GetProjectileSpeed() public static method

The get projectile speed.
public static GetProjectileSpeed ( this ability, string abilityName = null ) : float
ability this /// The ability. ///
abilityName string /// The ability name. ///
return float

GetProjectileSpeed() public static method

Returns projectile speed of the ability
public static GetProjectileSpeed ( this ability, uint abilityLevel, string abilityName = null ) : float
ability this /// The ability. ///
abilityLevel uint /// The ability Level. ///
abilityName string /// The ability Name. ///
return float

GetRadius() public static method

Returns impact radius of given ability
public static GetRadius ( this ability, string abilityName = null ) : float
ability this /// The ability. ///
abilityName string /// The ability Name. ///
return float

InvoCanBeCasted() public static method

Checks if this ability can be casted by Invoker, if the ability is not currently invoked, it is going to check for both invoke and the ability mana cost.
public static InvoCanBeCasted ( this ability, Ability invoke, Ability spell4, Ability spell5 ) : bool
ability this /// given ability ///
invoke Ability /// invoker ultimate ///
spell4 Ability /// current spell on slot 4 ///
spell5 Ability /// current spell on slot 5 ///
return bool

IsAbilityBehavior() public static method

Checks if given ability has given ability behavior flag
public static IsAbilityBehavior ( this ability, AbilityBehavior flag, string abilityName = null ) : bool
ability this /// The ability. ///
flag AbilityBehavior /// The flag. ///
abilityName string /// The ability Name. ///
return bool

IsAbilityType() public static method

The is ability type.
public static IsAbilityType ( this ability, AbilityType type, string abilityName = null ) : bool
ability this /// The ability. ///
type AbilityType /// The type. ///
abilityName string /// The ability name. ///
return bool

IsDisable() public static method

The is disable.
public static IsDisable ( this ability ) : bool
ability this /// The ability. ///
return bool

IsHeal() public static method

The is heal.
public static IsHeal ( this ability ) : bool
ability this /// The ability. ///
return bool

IsInvis() public static method

The is invisibility.
public static IsInvis ( this ability ) : bool
ability this /// The ability. ///
return bool

IsManaburn() public static method

The is manaburn.
public static IsManaburn ( this ability ) : bool
ability this /// The ability. ///
return bool

IsNuke() public static method

The is nuke.
public static IsNuke ( this ability ) : bool
ability this /// The ability. ///
return bool

IsPurge() public static method

The is purge.
public static IsPurge ( this ability ) : bool
ability this /// The ability. ///
return bool

IsShield() public static method

The is shield.
public static IsShield ( this ability ) : bool
ability this /// The ability. ///
return bool

IsSilence() public static method

The is silence.
public static IsSilence ( this ability ) : bool
ability this /// The ability. ///
return bool

IsSkillShot() public static method

The is skill shot.
public static IsSkillShot ( this ability ) : bool
ability this /// The ability. ///
return bool

IsSlow() public static method

The is slow.
public static IsSlow ( this ability ) : bool
ability this /// The ability. ///
return bool

PiercesMagicImmunity() public static method

The pierces magic immunity.
public static PiercesMagicImmunity ( this ability ) : bool
ability this /// The ability. ///
return bool

RequiresCharges() public static method

The requires charges.
public static RequiresCharges ( this ability, string abilityName = null ) : bool
ability this /// The ability. ///
abilityName string /// The ability name. ///
return bool

TravelDistance() public static method

The travel distance.
public static TravelDistance ( this ability ) : float
ability this /// The ability. ///
return float