public override void Actualize(object contextObj) { var context = (ThoughtContext)contextObj; var ks = default(KillStealResult); var target = context.Targets.FirstOrDefault(x => (ks = CalculateKillSteal(x)) != KillStealResult.CantKill); switch (ks) { case KillStealResult.QKill: KatarinaUtilities.CastQ(target); break; case KillStealResult.WKill: KatarinaUtilities.CastW(); break; case KillStealResult.EKill: KatarinaUtilities.CastE(target); break; case KillStealResult.QwKill: KatarinaUtilities.CastW(); break; case KillStealResult.QeKill: KatarinaUtilities.CastE(target); break; case KillStealResult.QweKill: KatarinaUtilities.CastE(target); break; case KillStealResult.WeKill: KatarinaUtilities.CastW(); break; case KillStealResult.UltKs: KatarinaUtilities.CastR(); break; case KillStealResult.FullComboKs: KatarinaUtilities.CastE(target); KatarinaUtilities.CastQ(target); KatarinaUtilities.CastW(target); KatarinaUtilities.CastR(); break; case KillStealResult.FullComboItemsKs: UseItems(target); break; case KillStealResult.ItemsKs: UseItems(target); break; } }
public override void Actualize(object contextObj) { var context = (ThoughtContext)contextObj; if ((!context.CastingUlt || (context.Plugin.Config.Item("StopUlt").GetValue <bool>()) && context.Target.Unit.Health < (context.Target.DamageContext.QDamage + context.Target.DamageContext.WDamage + context.Target.DamageContext.EDamage))) { if (context.Plugin.Config.Item("ComboItems").GetValue <bool>()) { UseItems(context.Target); } if (context.Plugin.Q.IsReady()) { KatarinaUtilities.CastQ(context.Target); } if (context.Plugin.Config.Item("ComboDetonateQ").GetValue <bool>() && context.Target.Unit.Buffs.Any(x => x.Name == "katarinaqmark")) { if (!context.Plugin.Q.IsReady()) { KatarinaUtilities.CastE(context.Target); } if (!context.Plugin.E.IsReady()) { KatarinaUtilities.CastW(context.Target); } } else { if (context.Plugin.E.IsReady()) { KatarinaUtilities.CastE(context.Target); } if (!context.Plugin.E.IsReady()) { KatarinaUtilities.CastW(context.Target); } } if (context.Plugin.R.IsReady()) { KatarinaUtilities.CastR(); } } var igniteTarget = context.Targets.Where(x => x.IgniteCanKill).OrderByDescending(x => x.Unit.Health).FirstOrDefault(); if (igniteTarget != null) { KatarinaUtilities.CastIgnite(igniteTarget); } }