/// <summary> /// Does it's checks and ignites if all conditions are met. Uses Menu settings /// </summary> /// <param name="context"></param> /// <param name="target"></param> /// <param name="otherDamage">Damage that will hit for sure in the near future, e.g. brand passive</param> /// <param name="otherDamageTime">How much time will pass till the otherDamage applies (checks on healthreg ...)</param> public static void Update(IMainContext context, Obj_AI_Hero target, float otherDamage = 0f, float otherDamageTime = 3f) { if (_ignite == null || !_igniteUsage.GetValue<bool>()) return; if (context.GetOrbwalker().ActiveMode != Orbwalking.OrbwalkingMode.Combo && _igniteOnlyCombo.GetValue<bool>()) return; if (_igniteKillsteal.GetValue<bool>()) { foreach (var enemy in HeroManager.Enemies) UpdateOnHero(enemy, otherDamage, otherDamageTime, _igniteKillsteal.GetValue<bool>()); } else if (target != null) UpdateOnHero(target, otherDamage, otherDamageTime, _igniteKillsteal.GetValue<bool>()); }
/// <summary> /// Does it's checks and ignites if all conditions are met. Uses Menu settings /// </summary> /// <param name="context"></param> /// <param name="target"></param> /// <param name="otherDamage">Damage that will hit for sure in the near future, e.g. brand passive</param> /// <param name="otherDamageTime">How much time will pass till the otherDamage applies (checks on healthreg ...)</param> public static void Update(IMainContext context, AIHeroClient target, float otherDamage = 0f, float otherDamageTime = 3f) { if (_ignite == null || !_igniteUsage.GetValue <bool>()) { return; } if (context.GetOrbwalker().ActiveMode != Orbwalking.OrbwalkingMode.Combo && _igniteOnlyCombo.GetValue <bool>()) { return; } if (_igniteKillsteal.GetValue <bool>()) { foreach (var enemy in HeroManager.Enemies) { UpdateOnHero(enemy, otherDamage, otherDamageTime, _igniteKillsteal.GetValue <bool>()); } } else if (target != null) { UpdateOnHero(target, otherDamage, otherDamageTime, _igniteKillsteal.GetValue <bool>()); } }
public bool GrabControl(Skill skill) { if (_totalControl && TotalControl == skill) { return(true); } if (_totalControl && TotalControl.GetPriority() < skill.GetPriority()) { TotalControl.TryTerminate(_context); TotalControl = skill; _cancelUpdate = true; return(true); } // ReSharper disable once LoopCanBeConvertedToQuery foreach (var currentSkill in Skills) { if (skill != currentSkill && currentSkill.NeedsControl() && currentSkill.GetEnabled(_context.GetOrbwalker().ActiveMode) && currentSkill.GetPriority() >= skill.GetPriority()) { return(false); } } _totalControl = true; TotalControl = skill; _cancelUpdate = true; return(true); }
/// <summary> /// call to init all stuffs. Menu has to exist at that time /// </summary> /// <param name="context"></param> public virtual void Initialize(IMainContext context) { Skills.ForEach(skill => skill.Initialize(context, this)); _context = context; _orbwalker = context.GetOrbwalker(); }