Ejemplo n.º 1
0
        // Token: 0x06000172 RID: 370 RVA: 0x0000D1B4 File Offset: 0x0000B3B4
        public Vector3 GetMovePosition(TargetManager targetManager, ComboModeMenu comboModeMenu, bool windrun)
        {
            if (!comboModeMenu.GetAbilitySettingsMenu <ShackleshotMenu>(this).MoveToShackle)
            {
                return(Vector3.Zero);
            }
            Unit9 target = targetManager.Target;

            if (target.IsMoving && base.Owner.Speed * (windrun ? 1.5f : 0.9f) < target.Speed)
            {
                return(Vector3.Zero);
            }
            List <Vector3> list     = new List <Vector3>();
            Vector3        position = target.Position;

            foreach (Unit9 unit in targetManager.EnemyUnits)
            {
                if (!unit.Equals(target) && unit.Distance(target) <= this.shackleshot.ShackleRange)
                {
                    Vector3 vector  = Vector3Extensions.Extend2D(unit.Position, position, -200f);
                    Vector3 vector2 = Vector3Extensions.Extend2D(position, unit.Position, -200f);
                    if (base.Owner.Distance(vector) < 500f && !unit.IsBlockingAbilities)
                    {
                        list.Add(vector);
                    }
                    if (base.Owner.Distance(vector2) < 500f && !target.IsBlockingAbilities)
                    {
                        list.Add(vector2);
                    }
                }
            }
            if (!target.IsBlockingAbilities)
            {
                foreach (Tree tree in this.trees)
                {
                    if (tree.IsValid && tree.IsAlive && position.Distance2D(tree.Position, false) <= this.shackleshot.ShackleRange)
                    {
                        Vector3 vector3 = Vector3Extensions.Extend2D(position, tree.Position, -200f);
                        if (base.Owner.Distance(vector3) < 500f)
                        {
                            list.Add(vector3);
                        }
                    }
                }
            }
            if (list.Count > 0)
            {
                return((from x in list
                        orderby base.Owner.Distance(x)
                        select x).First <Vector3>());
            }
            return(Vector3.Zero);
        }
Ejemplo n.º 2
0
        public Vector3 GetMovePosition(TargetManager targetManager, ComboModeMenu comboModeMenu, bool windrun)
        {
            var menu = comboModeMenu.GetAbilitySettingsMenu <ShackleshotMenu>(this);

            if (!menu.MoveToShackle)
            {
                return(Vector3.Zero);
            }

            var target = targetManager.Target;

            if (target.IsMoving && this.Owner.Speed * (windrun ? 1.5f : 0.9f) < target.Speed)
            {
                return(Vector3.Zero);
            }

            var possiblePositions = new List <Vector3>();
            var targetPosition    = target.Position;

            foreach (var unit in targetManager.EnemyUnits)
            {
                if (unit.Equals(target))
                {
                    continue;
                }

                if (unit.Distance(target) > this.shackleshot.ShackleRange)
                {
                    continue;
                }

                var p1 = unit.Position.Extend2D(targetPosition, -200);
                var p2 = targetPosition.Extend2D(unit.Position, -200);

                if (this.Owner.Distance(p1) < 500 && !unit.IsBlockingAbilities)
                {
                    possiblePositions.Add(p1);
                }

                if (this.Owner.Distance(p2) < 500 && !target.IsBlockingAbilities)
                {
                    possiblePositions.Add(p2);
                }
            }

            if (!target.IsBlockingAbilities)
            {
                foreach (var tree in EntityManager9.Trees)
                {
                    if (targetPosition.Distance2D(tree.Position) > this.shackleshot.ShackleRange)
                    {
                        continue;
                    }

                    var p1 = targetPosition.Extend2D(tree.Position, -200);

                    if (this.Owner.Distance(p1) < 500)
                    {
                        possiblePositions.Add(p1);
                    }
                }
            }

            if (possiblePositions.Count > 0)
            {
                return(possiblePositions.OrderBy(x => this.Owner.Distance(x)).First());
            }

            return(Vector3.Zero);
        }
Ejemplo n.º 3
0
 // Token: 0x060001AF RID: 431 RVA: 0x000032F9 File Offset: 0x000014F9
 public bool FullChannelTime(ComboModeMenu comboModeMenu)
 {
     return(comboModeMenu.GetAbilitySettingsMenu <FortunesEndMenu>(this).FullChannelTime);
 }