public override void Update() { if (!(ForceAutoAttacks && ObjectManager.Player.IsWindingUp)) { base.Update(); } var target = TargetSelector.GetTarget(600, TargetSelector.DamageType.True); if (target.IsValidTarget()) { var passiveBuff = target.GetBuff("brandablaze"); if (passiveBuff != null) { IgniteManager.Update(this, GetRemainingPassiveDamage(target, passiveBuff), (int)(passiveBuff.EndTime - Game.Time) + 1); return; } } IgniteManager.Update(this); // maybe should use GetTarget!? }
/// <summary> /// override in sub class to add champion combo logic. for example Garen has a fixed combo, but wants to do W not in order, but when he gets damage. /// In this example you would override Update and have a seperate logic for W instead of adding it to the skill routines. /// </summary> /// <param name="context"></param> public virtual void Update(IMainContext context) { Target = TargetSelector.GetTarget(TargetRange, DamageType); IgniteManager.Update(context, Target); Skills.Sort(); //Todo: check if expensive. Will do that event-based otherwise if (_totalControl) { TotalControl.Update(_orbwalker.ActiveMode, context, this, Target); if (!TotalControl.NeedsControl()) { TotalControl.TryTerminate(_context); _totalControl = false; Update(context); return; } // ReSharper disable once LoopCanBeConvertedToQuery foreach (var skill in Skills.Where(item => item.GetPriority() > TotalControl.GetPriority())) { skill.Update(_orbwalker.ActiveMode, context, this, Target); } } else { foreach (var item in Skills) { if (_cancelUpdate) { _cancelUpdate = false; return; } item.Update(_orbwalker.ActiveMode, context, this, Target); } } }
private void Tick(EventArgs args) { _comboProvider.Update(); IgniteManager.Update(_comboProvider); }