Example #1
0
        private void UnitAdded(IAbilityUnit unit)
        {
            //unit.TargetSelector.Target = this
            if (unit.UnitCombo != null)
            {
                unit.AddPart <IUnitOrbwalker>(abilityUnit => new ControllableUnitSpellsOrbwalker(unit));
            }
            else
            {
                unit.AddPart <IUnitOrbwalker>(abilityUnit => new ControllableUnitOrbwalker(unit));
            }

            this.AddOrbwalker(unit.Orbwalker);

            //unit.TargetSelector.Target = this.LocalHero.TargetSelector.Target;
            //unit.Fighting = this.LocalHero.Fighting;

            this.BodyBlockCombo.AddOrderIssuer(unit.Orbwalker);
            this.ChaseCombo.AddOrderIssuer(unit.Orbwalker);
            this.RetreatCombo.AddOrderIssuer(unit.Orbwalker);

            if (this.RetreatCombo.Key.Value.Active || this.ChaseCombo.Key.Value.Active || this.BodyBlockCombo.Key.Value.Active)
            {
                unit.AddOrderIssuer(unit.Orbwalker);
                unit.Orbwalker.Enabled = true;
            }

            unit.Fighting = this.LocalHero.Fighting;
            unit.TargetSelector.Target = this.LocalHero.TargetSelector.Target;
        }
Example #2
0
        private void UnitAdded(IAbilityUnit unit)
        {
            // unit.TargetSelector.Target = this
            if (unit.Name == "npc_dota_lycan_wolf1" || unit.Name == "npc_dota_lycan_wolf2" ||
                unit.Name == "npc_dota_lycan_wolf3" || unit.Name == "npc_dota_lycan_wolf4")
            {
                unit.AddPart <IUnitOrbwalker>(abilityUnit => new WolfOrbwalker(unit));
            }
            else if (unit.UnitCombo != null)
            {
                unit.AddPart <IUnitOrbwalker>(abilityUnit => new ControllableUnitSpellsOrbwalker(unit));
            }
            else
            {
                unit.AddPart <IUnitOrbwalker>(abilityUnit => new ControllableUnitOrbwalker(unit));
            }

            this.AddOrbwalker(unit.Orbwalker);

            unit.TargetSelector.Target = this.LocalHero.TargetSelector.Target;
            unit.Fighting = this.LocalHero.Fighting;

            this.ChaseCombo.AddOrderIssuer(unit.Orbwalker);
            this.RetreatCombo.AddOrderIssuer(unit.Orbwalker);

            if (this.RetreatCombo.Key.Value.Active || this.ChaseCombo.Key.Value.Active)
            {
                unit.AddOrderIssuer(unit.Orbwalker);
                unit.Orbwalker.Enabled = true;
            }
        }
Example #3
0
        private void UnitAdded(IAbilityUnit unit)
        {
            if (unit.PrettyName == "Storm")
            {
                //Console.WriteLine("AddedStorm");
                this.StormBear      = unit;
                this.StormSkillBook = this.StormBear.SkillBook as StormSkillBook;
            }
            // unit.TargetSelector.Target = this
            if (unit.PrettyName == "Earth")
            {
                unit.AddPart <IUnitOrbwalker>(abilityUnit => new EarthOrbwalker(unit));
            }
            else if (unit.UnitCombo != null)
            {
                unit.AddPart <IUnitOrbwalker>(abilityUnit => new ControllableUnitSpellsOrbwalker(unit));
            }
            else
            {
                unit.AddPart <IUnitOrbwalker>(abilityUnit => new ControllableUnitOrbwalker(unit));
            }

            this.AddOrbwalker(unit.Orbwalker);

            this.ChaseCombo.AddOrderIssuer(unit.Orbwalker);

            // this.RetreatCombo.AddOrderIssuer(unit.Orbwalker);
            if (this.ChaseCombo.Key.Value.Active)
            {
                unit.AddOrderIssuer(unit.Orbwalker);
                unit.Orbwalker.Enabled = true;
            }

            unit.Fighting = this.LocalHero.Fighting;
            unit.TargetSelector.Target = this.LocalHero.TargetSelector.Target;
        }