Ability.GetAbilityData(string, uint, string)

Here are the examples of the csharp api class Ability.GetAbilityData(string, uint, string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

7 Examples 7

1. Example

Project: Ensage.Common
Source File: AbilityExtensions.cs
View license
public static float TravelDistance(this Ability ability)
        {
            var data = ability.CommonProperties();
            if (data == null)
            {
                return ability.GetCastRange();
            }

            var distance = ability.GetAbilityData(data.Distance);
            return distance > 0 ? distance : ability.GetCastRange();
        }

2. Example

Project: Ensage.Common
Source File: AbilityExtensions.cs
View license
public static float EndRadius(this Ability ability)
        {
            var data = ability.CommonProperties();
            if (data == null)
            {
                return ability.GetRadius();
            }

            var radius = ability.GetAbilityData(data.EndWidth);
            return radius > 0 ? radius : ability.GetRadius();
        }

3. Example

Project: Ensage.Common
Source File: AbilityExtensions.cs
View license
public static float GetRadius(this Ability ability, string abilityName = null)
        {
           /n ..... /n //View Source file for more details /n }

4. Example

Project: Ensage.Common
Source File: AbilityExtensions.cs
View license
public static float GetProjectileSpeed(this Ability ability, uint abilityLevel, string abilityName = null)
        {
            if (ability == null || !ability.IsValid)
            {
                return 0;
            }

            var level = abilityLevel != 0 ? abilityLevel : ability.Level;
            var name = abilityName ?? ability.StoredName();
            float speed;
            if (speedDictionary.TryGetValue(name + " " + level, out speed))
            {
                return speed;
            }

            var data = ability.CommonProperties();
            if (data == null)
            {
                speed = float.MaxValue;
                speedDictionary.TryAdd(name + " " + level, speed);
                return speed;
            }

            if (data.Speed == null)
            {
                return speed;
            }

            speed = ability.GetAbilityData(data.Speed, abilityName: name);
            speedDictionary.TryAdd(name + " " + level, speed);

            return speed;
        }

5. Example

Project: Ensage.Common
Source File: AbilityExtensions.cs
View license
public static bool CanHit(this Ability ability, Unit target, Vector3 sourcePosition, string abilityN/n ..... /n //View Source file for more details /n }

6. Example

Project: Ensage.Common
Source File: AbilityExtensions.cs
View license
public static float GetCastRange(this Ability ability, string abilityName = null)
        {
        /n ..... /n //View Source file for more details /n }

7. Example

Project: Ensage.Common
Source File: AbilityExtensions.cs
View license
public static bool CastSkillShot(
            this Ability ability,
            Unit target,
       /n ..... /n //View Source file for more details /n }