private static void ProtectorOnOnTargetedProtection(Obj_AI_Base caster, AIHeroClient target, SpellData spell) { ProtectionIntegration(caster, target, spell.Name); }
private static void Protector_OnTargetedProtection(Obj_AI_Base caster, AIHeroClient target, SpellData spell) { try { var text = string.Format( "{0,-15} -> {1,-15} - {3} {2}", caster.CharData.BaseSkinName, target.CharData.BaseSkinName, spell.Name, Math.Round(caster.GetSpellDamage(target, spell.Name))); Console.WriteLine(text); } catch (Exception e) { Console.WriteLine(e); } }
private static void DamagePrediction_OnTargettedSpellWillKill(AIHeroClient sender, AIHeroClient target, EloBuddy.SpellData sData) { if (GetMenuValue <bool>("lissandra.misc.saveR") && SkillsHandler.Spells[SpellSlot.R].IsReady()) { SkillsHandler.Spells[SpellSlot.R].Cast(ObjectManager.Player); } }
private void DamagePrediction_OnSpellWillKill(AIHeroClient sender, AIHeroClient target, SpellData sData) { if (target.IsMe && sender.IsEnemy) { if (ShouldRun() && MenuExtensions.GetItemValue <bool>("iseriesr.activator.spells.heal.ls")) { CastSpell(); } } }
private void ProtectorOnTargetedProtection(Obj_AI_Base caster, AIHeroClient target, SpellData spell) { try { if (!this.ConfigValue <bool>("Misc.Shield.Target")) { return; } if (Orbwalking.IsAutoAttack(spell.Name) && target.HealthPercent > this.ConfigValue <Slider>("Misc.Shield.Health").Value) { return; } if (spell.MissileSpeed > 2000 || spell.MissileSpeed == 0) { return; } // TODO: blacklist FiddleQ, FioraQ/R, LeonaE, VladQ, ZileanQ if (target.IsMe && this.E.IsReady()) { this.CastShield(caster.Position); } if (!target.IsMe && this.W.IsReady() && this.W.IsInRange(target) && (this.IsShieldActive || this.E.IsReady())) { var jumpTime = (this.Player.Distance(target) * 1000 / this.W.Instance.SData.MissileSpeed) + (this.W.Instance.SData.SpellCastTime * 1000); var missileTime = caster.Distance(target) * 1000 / spell.MissileSpeed; if (jumpTime > missileTime) { Console.WriteLine("Abort Jump - Missile too Fast: {0} {1}", jumpTime, missileTime); return; } this.W.CastOnUnit(target); LeagueSharp.Common.Utility.DelayAction.Add((int)jumpTime, () => this.CastShield(caster.Position)); } } catch (Exception e) { Console.WriteLine(e); } }