protected TimberAbility(Ability ability) { Ability = ability; CastPoint = (float)ability.FindCastPoint(); Name = ability.Name; Sleeper = new Sleeper(); }
private static void Load() { _sleeper = new Sleeper(); InSys = new List<Ability>(); Drawing.OnDraw += Drawing_OnDraw; Game.OnUpdate += GameOnOnUpdate; }
public Controllable(Unit unit, bool isHero = false) { Handle = unit.Handle; Unit = unit; IsHero = isHero; sleeper = new Sleeper(); if (Unit.AttackCapability == AttackCapability.Ranged) { isRanged = true; projectileSpeed = Game.FindKeyValues( unit.Name + "/ProjectileSpeed", unit is Hero ? KeyValueSource.Hero : KeyValueSource.Unit).IntValue; attackAnimationPoint = Game.FindKeyValues( unit.Name + "/AttackAnimationPoint", unit is Hero ? KeyValueSource.Hero : KeyValueSource.Unit).FloatValue; attackRate = Game.FindKeyValues( unit.Name + "/AttackRate", unit is Hero ? KeyValueSource.Hero : KeyValueSource.Unit).FloatValue; if (attackRate <= 0) { attackRate = Game.FindKeyValues( unit.Name + "/AttackRate", unit is Hero ? KeyValueSource.Hero : KeyValueSource.Unit).IntValue; } attackRange = unit.AttackRange; } }
public static void Flush() { _abilityUpdate = new Sleeper(); _heroUpdate = new Sleeper(); _updatePrediction = new Sleeper(); _courUpdater=new Sleeper(); }
protected UsableAbility(Ability ability, AbilityType type, AbilityCastTarget target) { Sleeper = new Sleeper(); Type = type; if (ability == null) { //Gold spender return; } Ability = ability; CastPoint = (float)ability.FindCastPoint(); Name = ability.Name; Handle = ability.Handle; IsItem = ability is Item; ClassID = ability.ClassID; IgnoresLinkensSphere = ability.IsAbilityBehavior(AbilityBehavior.NoTarget) || ability.IsAbilityBehavior(AbilityBehavior.AreaOfEffect); PiercesMagicImmunity = ability.PiercesMagicImmunity(); CanBeUsedOnEnemy = target.HasFlag(AbilityCastTarget.Enemy) || type == AbilityType.Disable; CanBeUsedOnAlly = target.HasFlag(AbilityCastTarget.Ally); Debugger.WriteLine("///////// UsableAbility // " + Name); Debugger.WriteLine("// Type: " + Type); Debugger.WriteLine("// Cast point: " + CastPoint); Debugger.WriteLine("// Cast range: " + Ability.GetRealCastRange()); Debugger.WriteLine("// Ignores linkens sphere: " + IgnoresLinkensSphere); Debugger.WriteLine("// Pierces magic immunity: " + PiercesMagicImmunity); Debugger.WriteLine("// Can be used on ally: " + CanBeUsedOnAlly); Debugger.WriteLine("// Can be used on enemy: " + CanBeUsedOnEnemy); }
public void OnLoad() { menu = new MenuManager(addedItems); sleeper = new Sleeper(); menu.OnChange += OnChange; sleeper.Sleep(1000); }
public Chakram(Ability chakramAbility, Ability returnAbility) : base(chakramAbility) { Speed = chakramAbility.GetProjectileSpeed(); Radius = chakramAbility.GetRadius(); this.returnAbility = returnAbility; returnSleeper = new Sleeper(); }
public void OnLoad() { Variables.Hero = ObjectManager.LocalHero; sleeper = new Sleeper(); modules.Add(new NearDeath()); modules.Add(new AutoPurchase()); }
public PhaseShift(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { sleeper = new Sleeper(); Player.OnExecuteOrder += PlayerOnExecuteOrder; for (var i = 0u; i < shiftDuration.Length; i++) { shiftDuration[i] = Ability.AbilitySpecialData.First(x => x.Name == "duration").GetValue(i) * 1000; } }
public Tidebringer(Ability ability) : base(ability) { DisablePathfinder = true; CounterAbilities.Add(Eul); CounterAbilities.Add(PhaseShift); CounterAbilities.AddRange(VsDamage); kunkka = (Hero)AbilityOwner; attackSleeper = new Sleeper(); }
public ArmletOfMordiggian(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { attacking = new MultiSleeper(); attackStart = new MultiSleeper(); delay = new Sleeper(); delay.Sleep(1000); Game.OnUpdate += OnUpdate; Player.OnExecuteOrder += OnExecuteOrder; }
public AbilityUpdater() { sleeper = new Sleeper(); allyAbilitiesData = new AllyAbilities(); enemyAbilitiesData = new EnemyAbilities(); Menu.UsableAbilities.AddAbility(AbilityNames.GoldSpender, AbilityType.Counter); GoldSpender = new GoldSpender(); Debugger.WriteLine("* Evader =>"); Debugger.WriteLine("* Total abilities countered: " + enemyAbilitiesData.EvadableAbilities.Count); Debugger.WriteLine("* Total usable blink abilities: " + allyAbilitiesData.BlinkAbilities.Count); Debugger.WriteLine("* Total usable counter abilities: " + allyAbilitiesData.CounterAbilities.Count); Debugger.WriteLine("* Total usable disable abilities: " + allyAbilitiesData.DisableAbilities.Count); sleeper.Sleep(1000); GameDispatcher.OnUpdate += OnUpdate; ObjectManager.OnRemoveEntity += OnRemoveEntity; }
public static void Game_OnUpdate(EventArgs args) { if (!IsEnable) return; /*var rem = Helper.FindRemnant(Game.MousePosition); if (rem != null && rem.IsAlive) { Printer.Print("-----------"); foreach (var modifier in rem.Modifiers) { Printer.Print(modifier.Name); } }*/ if (_attacker == null) _attacker = new Sleeper(); if (_spellSleeper == null) _spellSleeper = new MultiSleeper(); if (_ethereal == null) _ethereal = new Sleeper(); if (!IsComboHero) { GlobalTarget = null; return; } if (GlobalTarget == null || !GlobalTarget.IsValid || !GlobalTarget.IsAlive) { GlobalTarget = Helper.ClosestToMouse(Members.MyHero); return; } if (AutoAttack) if (UseOrbWalkker) { Orbwalking.Orbwalk(GlobalTarget, followTarget: true); } else if (!Members.MyHero.IsAttacking() && !_attacker.Sleeping && !GlobalTarget.IsAttackImmune()) { Members.MyHero.Attack(GlobalTarget); _attacker.Sleep(250); } CastCombo(); }
private static void Load() { if (ObjectManager.LocalHero.ClassID != Members.MyClassId) return; if (Members.MyHero == null || !Members.MyHero.IsValid) { Members.MyHero = ObjectManager.LocalHero; Members.MyTeam = ObjectManager.LocalHero.Team; } _updater = new Sleeper(); Orbwalking.Load(); Members.Items = new List<string>(); Members.Menu.AddToMainMenu(); Game.OnUpdate += Action.Game_OnUpdate; Drawing.OnDraw += Action.OnDrawing; Game.OnUpdate += UpdateItems; if (Members.Menu.Item("Range.Enable").GetValue<bool>()) { Printer.Print("fist drawing!"); DrawRange(); } }
private static void Load() { if (ObjectManager.LocalHero.ClassID != ClassID.CDOTA_Unit_Hero_Tinker) return; if (Members.MyHero == null || !Members.MyHero.IsValid) { Members.MyHero = ObjectManager.LocalHero; Members.MyTeam = ObjectManager.LocalHero.Team; } _updater = new Sleeper(); Members.TowerRangEffectHelper = new ParticleEffectHelper("name 1"); Members.TowerRangEffectHelper2 = new ParticleEffectHelper("name 2"); Orbwalking.Load(); Members.Items = new List<string>(); Members.Menu.AddToMainMenu(); Game.OnUpdate += ComboAction.Game_OnUpdate; Game.OnUpdate += UpdateItems; Drawing.OnDraw += ComboAction.Drawing_OnDraw; Unit.OnModifierAdded += TeleportRangeHelper.Unit_OnModifierAdded; Unit.OnModifierRemoved += TeleportRangeHelper.UnitOnOnModifierRemoved; GameDispatcher.OnUpdate += ReamBlink.OnUpdate; Player.OnExecuteOrder += StopDummyRearming.OnExecuteOrder; }
private static void Events_OnLoad(object sender, EventArgs e) { hero = ObjectManager.LocalHero; sleeper = new Sleeper(); Game.OnIngameUpdate += Game_OnUpdate; }
public void OnLoad() { hero = ObjectManager.LocalHero; abilities = hero.Spellbook.Spells.Where( x => !x.IsHidden && !IgnoredAbilities.List.Contains(x.StoredName()) && !x.Name.Contains("special_bonus")); menuManager = new MenuManager(abilities.Select(x => x.StoredName()).ToList(), hero.Name); sleeper = new Sleeper(); abilitylBuilder = new AbilityBuilder(hero); talents = hero.Spellbook.Spells.Where(x => x.Name.Contains("special_bonus")).ToList(); sleeper.Sleep(10000); }
/// <summary> /// Initializes a new instance of the <see cref="OnOffSlider" /> class. /// </summary> /// <param name="onColor"> /// The on color. /// </param> /// <param name="offColor"> /// The off color. /// </param> /// <param name="height"> /// The height. /// </param> /// <param name="enabled"> /// The enabled. /// </param> public OnOffSlider(Color onColor, Color offColor, float height, bool enabled) { this.onColor = onColor; this.offColor = offColor; this.Height = height; this.transition = new CubicEaseInOut(0.30); this.hover = new QuadEaseInOut(0.20); this.leftButtonSleeper = new Sleeper(); this.Enabled = enabled; this.char1 = new DrawText { FontFlags = FontFlags.AntiAlias, Text = "°", Color = new Color(50, 50, 50) }; this.char2 = new DrawText { FontFlags = FontFlags.AntiAlias, Text = "°", Color = new Color(180, 180, 180) }; }
/// <summary> /// Initializes a new instance of the <see cref="OnOffCircleSlider" /> class. /// </summary> /// <param name="onColor"> /// The on color. /// </param> /// <param name="offColor"> /// The off color. /// </param> /// <param name="height"> /// The height. /// </param> /// <param name="enabled"> /// The enabled. /// </param> public OnOffCircleSlider(Color onColor, Color offColor, float height, bool enabled) { this.onColor = onColor; this.offColor = offColor; this.Height = height; this.transition = new CubicEaseInOut(0.30); this.hover = new QuadEaseInOut(0.20); this.leftButtonSleeper = new Sleeper(); this.enabled = enabled; this.colorChange = new QuadEaseInOut(0.35); }
/// <summary> /// Initializes a new instance of the <see cref="Notification" /> class. /// </summary> /// <param name="duration"> /// The duration. /// </param> /// <param name="position"> /// The position. /// </param> /// <param name="size"> /// The size. /// </param> public Notification(float duration, Vector2 position, Vector2 size) { this.Duration = duration; this.alliesNearbySleeper = new Sleeper(); this.Position = position; this.positionOn = position - new Vector2(size.X + 1, 0); this.positionOff = position + new Vector2(1, 0); this.Size = size; this.Visible = true; this.HeroIconSize = new Vector2((float)(size.X / 2.9), (float)(size.Y / 1.5)); this.chargeText = new DrawText { Text = "DETONATE", Color = Color.White, FontFlags = FontFlags.AntiAlias, Position = new Vector2(), TextSize = new Vector2((float)(this.HeroIconSize.Y / 2.1)) }; this.healthText = new DrawText { Text = string.Empty, Color = Color.White, FontFlags = FontFlags.AntiAlias, Position = new Vector2(), TextSize = new Vector2((float)(this.HeroIconSize.Y / 3.1)) }; this.moveCameraText = new DrawText { Text = "MOVE CAMERA", Color = Color.White, FontFlags = FontFlags.AntiAlias, Position = new Vector2(), TextSize = new Vector2((float)(this.HeroIconSize.Y / 3.4)) }; this.keyText = new DrawText { Text = string.Empty, Color = Color.White, FontFlags = FontFlags.AntiAlias, Position = new Vector2(), TextSize = new Vector2((float)(this.HeroIconSize.Y / 2.5)) }; this.transition = new QuadEaseOut(1.5); this.transition.Start(this.positionOn, this.positionOff); }
public WhirlingDeath(Ability ability) : base(ability) { Radius = ability.GetRadius(); comboSleeper = new Sleeper(); }
/// <summary> /// Initializes static members of the <see cref="Polygon" /> class. /// </summary> static Polygon() { UpdateSleeper = new Sleeper(); }
public static void Flush() { _sleeper = new Sleeper(); }
public void OnLoad() { hero = ObjectManager.LocalHero; heroTeam = hero.Team; jungleCamps = new JungleCamps(heroTeam); Camp.DisplayOverlay = menu.IsEnabled; Camp.Debug = Controllable.Debug = menu.IsDebugEnabled; controllableUnits.Add(new Controllable(hero, true)); sleeper = new Sleeper(); }
/// <summary> /// Initializes a new instance of the <see cref="HurricanePikeCombo" /> class. /// </summary> public HurricanePikeCombo() { this.findSleeper = new Sleeper(); this.comboSleeper = new Sleeper(); }
private static void Load() { if (ObjectManager.LocalHero.ClassID != Members.MyClassId) return; if (Members.MyHero == null || !Members.MyHero.IsValid) { Members.MyHero = ObjectManager.LocalHero; Members.MyTeam = ObjectManager.LocalHero.Team; } _updater = new Sleeper(); Orbwalking.Load(); Members.Items = new List<string>(); Members.Menu.AddToMainMenu(); Game.OnUpdate += Action.Game_OnUpdate; Game.OnUpdate += UpdateItems; Game.OnUpdate += HotkeyCombos.Game_OnUpdate; Drawing.OnDraw += Draw.Drawing; if (Members.Menu.Item("Range.Enable").GetValue<bool>()) { Members.SpellRange = Members.MyHero.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf"); var extraRange = Members.MyHero.Inventory.Items.Any(x => x.StoredName() == "item_aether_lens") ? 200 : 0; var spellE = RealCastRange + extraRange + Members.MyHero.HullRadius; Members.SpellRange.SetControlPoint(1, new Vector3(99, 255, 255)); Members.SpellRange.SetControlPoint(2, new Vector3(spellE, 255, 0)); } }
/// <summary> /// Initializes a new instance of the <see cref="DragAndDrop" /> class. /// </summary> /// <param name="height"> /// The height. /// </param> /// <param name="itemList"> /// The item list. /// </param> /// <param name="abilityToggler"> /// The ability toggler. /// </param> public DragAndDrop(float height, List<string> itemList, AbilityToggler abilityToggler) { this.Height = height; var count = 0u; this.PriorityIconsDictionary = new Dictionary<PriorityIcon, uint>(); this.itemList = new List<string>(itemList); foreach (var s in itemList) { this.PriorityIconsDictionary.Add(new PriorityIcon(s, height, abilityToggler.IsEnabled(s)), count); count++; } this.doubleClickSleeper = new Sleeper(); this.iconCountSleeper = new Sleeper(); this.iconSizeSleeper = new Sleeper(); this.transition = new QuadEaseInOut(0.35); this.transition.Start(0, 150); this.abilityToggler = abilityToggler; this.usingAbilityToggler = true; this.Width = itemList.Count * this.Height; }
public static void Game_OnUpdate(EventArgs args) { if (!IsEnable) return; if (!Members.MyHero.IsAlive) return; //CalculateDamage(); if (_attacker == null) _attacker = new Sleeper(); if (_spellSleeper == null) _spellSleeper = new MultiSleeper(); if (_ethereal == null) _ethereal = new Sleeper(); var laser = Abilities.FindAbility("tinker_laser"); var rockets = Abilities.FindAbility("tinker_heat_seeking_missile"); if (_spellSleeper.Sleeping(Abilities.FindAbility("tinker_rearm"))) return; if (IsEnableKillSteal && !IsComboHero) { foreach (var x in Heroes.GetByTeam(Members.MyHero.GetEnemyTeam()) .Where(x => x.IsAlive && x.IsVisible && !x.IsIllusion() && !x.IsMagicImmune()) .Where(x => Helper.CalculateMyCurrentDamage(x, true) < 0)) { CastCombo(x, laser, rockets, true); } } if (!IsComboHero) { if (_globalTarget!=null) Helper.UnHandleEffect(_globalTarget); _globalTarget = null; return; } if (_globalTarget == null || !_globalTarget.IsValid) { _globalTarget = Helper.ClosestToMouse(Members.MyHero); return; } Helper.HandleEffect(_globalTarget); if (Members.MyHero.IsChanneling() || _globalTarget.Distance2D(Members.MyHero) > 2500) { return; } if (AutoAttack) if (UseOrbWalkker) { Orbwalking.Orbwalk(_globalTarget, followTarget: true); } else if (!Members.MyHero.IsAttacking() && !_attacker.Sleeping && !_globalTarget.IsAttackImmune()) { Members.MyHero.Attack(_globalTarget); _attacker.Sleep(250); } CastCombo(_globalTarget,laser, rockets); }
private static void Load() { _sleeper = new Sleeper(); Drawing.OnDraw += Drawing_OnDraw; }
/// <summary> /// The load. /// </summary> private static void Load() { All = new List<Hero> { ObjectManager.LocalHero }; Dire = new List<Hero>(); Radiant = new List<Hero>(); if (ObjectManager.LocalHero.Team == Team.Dire) { Dire.Add(ObjectManager.LocalHero); } else { Radiant.Add(ObjectManager.LocalHero); } tempList = Players.All.Where(x => x.Hero != null && x.Hero.IsValid).Select(x => x.Hero).ToList(); foreach ( var hero in ObjectManager.GetEntities<Hero>().Where(hero => tempList.All(x => x.Handle != hero.Handle))) { //Printer.Print($"tempList.Add(hero): {hero.Name}"); tempList.Add(hero); } UpdateHeroes(); Sleeper = new Sleeper(); Events.OnUpdate += Update; ObjectManager.OnAddEntity += ObjectMgr_OnAddEntity; ObjectManager.OnRemoveEntity += ObjectMgr_OnRemoveEntity; }