private static void LuxR(GameObject sender, Obj_AI_Hero hero, SpellData data) { var obj = sender as Obj_GeneralParticleEmitter; if (obj == null || !obj.IsValid || !new Regex("Lux_.+_R_mis_beam_middle").IsMatch(obj.Name)) { return; } var startT = Utils.GameTimeTickCount; var alreadyAdd = Evade.DetectedSpells.Values.Any( i => i.Data.MenuName == data.MenuName && i.Unit.NetworkId == hero.NetworkId); if (alreadyAdd) { return; } var pos = obj.Position.To2D(); var dir = HiuManager.GetHiuDirection(startT, pos); if (!dir.IsValid()) { return; } dir *= data.Range / 2f; SpellDetector.AddSpell(hero, pos - dir, pos + dir, data, null, SpellType.None, true, startT); }
private static void LucianQ( Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args, SpellData data, SpellArgs spellArgs) { if (data.MenuName != "LucianQ") { return; } var target = args.Target as Obj_AI_Base; if (target == null || !target.IsValid || (!target.IsMe && !Configs.Debug)) { return; } var endPos = target.Position; SpellDetector.AddSpell( sender, sender.ServerPosition, endPos + (target.ServerPosition - endPos).Normalized() * target.MoveSpeed * ((data.Delay - Game.Ping) / 1000f), data); spellArgs.NoProcess = true; }
private static void OnProcessSpell( Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args, SpellData data, SpellArgs spellArgs) { switch (data.MenuName) { case "MalphiteR": { var newData = (SpellData)data.Clone(); newData.MissileSpeed += (int)sender.MoveSpeed; spellArgs.NewData = newData; } break; case "SionR": { var newData = (SpellData)data.Clone(); newData.MissileSpeed = (int)sender.MoveSpeed; spellArgs.NewData = newData; } break; } if (data.MultipleNumber == -1 || (data.MenuName == "KhazixW" && args.SData.Name == data.SpellName)) { return; } var startPos = sender.ServerPosition.To2D(); var start = startPos; var endPos = args.End.To2D(); if (data.InfrontStart > 0) { start = start.Extend(endPos, data.InfrontStart); } var dir = (endPos - start).Normalized(); for (var i = -(data.MultipleNumber - 1) / 2; i <= (data.MultipleNumber - 1) / 2; i++) { SpellDetector.AddSpell( sender, startPos, start + dir.Rotated(data.MultipleAngle * i) * (data.Range / 2f), data); } spellArgs.NoProcess = true; }
private static void SyndraE( Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args, SpellData data, SpellArgs spellArgs) { if (!data.MenuName.StartsWith("SyndraE")) { return; } SpellDetector.AddSpell(sender, sender.ServerPosition, args.End, data); var spell = Evade.DetectedSpells.Values.FirstOrDefault( i => i.Data.MenuName == data.MenuName && i.Unit.CompareId(sender)); SpellData eqData; if (spell != null && Evade.OnProcessSpells.TryGetValue("SyndraEQ", out eqData)) { var cone = new Polygons.Cone( spell.Cone.Center, spell.Cone.Direction, spell.Data.RawRadius + 30, spell.Data.RawRange + 200).ToPolygon(); var orbs = Evade.DetectedSpells.Values.Where( i => i.Data.MenuName == "SyndraQ" && i.Unit.CompareId(spell.Unit) && Utils.GameTimeTickCount - i.StartTick < 400).Select(i => i.End).ToList(); orbs.AddRange( ObjectManager.Get <Obj_AI_Minion>() .Where( i => i.IsValid() && !i.IsDead && i.CharData.BaseSkinName == "syndrasphere" && i.Team == sender.Team) .Select(i => i.ServerPosition.To2D())); foreach (var orb in orbs.Where(i => !cone.IsOutside(i))) { var startPos = orb.Extend(spell.Start, 100); var endPos = spell.Start.Extend(orb, spell.Start.Distance(orb) > 200 ? 1300 : 1100); var startT = spell.StartTick + data.Delay + (int)(spell.Start.Distance(orb) / data.MissileSpeed * 1000); SpellDetector.AddSpell(sender, startPos, endPos, eqData, null, SpellType.None, true, startT); } } spellArgs.NoProcess = true; }
private static void ViktorE(Obj_AI_Base sender, MissileClient missile, SpellData data, SpellArgs spellArgs) { if (data.MenuName != "ViktorE" || missile.SData.Name == data.MissileName) { return; } SpellData spell; if (Evade.OnProcessSpells.TryGetValue("ViktorEExplosion", out spell)) { SpellDetector.AddSpell(sender, missile.StartPosition, missile.EndPosition, spell); } }
private static void OriannaSpell( Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args, SpellData data, SpellArgs spellArgs) { if (!data.MenuName.StartsWith("Orianna")) { return; } var startPos = Vector3.Zero; if (sender.HasBuff("OrianaGhostSelf")) { startPos = sender.ServerPosition; } else { foreach (var hero in HeroManager.AllHeroes.Where( i => i.IsValid() && !i.IsDead && i.IsVisible && i.Team == sender.Team && i.NetworkId != sender.NetworkId && i.HasBuff("OrianaGhost"))) { startPos = hero.ServerPosition; } if (!startPos.IsValid()) { foreach (var ball in ObjectManager.Get <Obj_AI_Minion>() .Where( i => i.IsValid() && !i.IsDead && i.IsVisible && i.CharData.BaseSkinName == "oriannaball" && i.Team == sender.Team)) { startPos = ball.ServerPosition; } } } if (startPos.IsValid()) { SpellDetector.AddSpell(sender, startPos, args.End, data); } spellArgs.NoProcess = true; }
private static void OnDash(Obj_AI_Base sender, Dash.DashItem args, SpellData data) { var caster = sender as Obj_AI_Hero; if (caster == null || !caster.IsValid || (!caster.IsEnemy && !Configs.Debug) || caster.ChampionName != data.ChampName) { return; } if (Utils.GameTimeTickCount - lastETick <= 100) { SpellDetector.AddSpell(caster, args.StartPos, args.EndPos, data, null, SpellType.None, true, lastETick); } }
private static void ZedSpell( Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args, SpellData data, SpellArgs spellArgs) { if (!data.MenuName.StartsWith("Zed")) { return; } foreach (var shadow in ObjectManager.Get <Obj_AI_Minion>() .Where(i => i.IsValid() && !i.IsDead && i.IsVisible && i.Name == "Shadow" && i.Team == sender.Team)) { SpellDetector.AddSpell(sender, shadow.ServerPosition, args.End, data); } }
private static void GalioE(Obj_AI_Base sender, MissileClient missile, SpellData data, SpellArgs spellArgs) { if (data.MenuName != "GalioE") { return; } var hero = HeroManager.AllHeroes.FirstOrDefault( i => i.ChampionName == data.ChampName && (i.IsEnemy || Configs.Debug)); if (hero != null) { SpellDetector.AddSpell(hero, missile.StartPosition, missile.EndPosition, data, missile); } spellArgs.NoProcess = true; }
private static void DianaQ( Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args, SpellData data, SpellArgs spellArgs) { if (data.MenuName != "DianaQCircle") { return; } SpellData arcData; if (Evade.OnProcessSpells.TryGetValue("DianaQArc", out arcData)) { SpellDetector.AddSpell(sender, sender.ServerPosition, args.End, arcData); } }
private static void MalzaharQ( Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args, SpellData data, SpellArgs spellArgs) { if (data.MenuName != "MalzaharQ") { return; } var end = args.End.To2D(); var dir = (end - sender.ServerPosition.To2D()).Normalized().Perpendicular() * (data.Range / 2f); var startPos = end - dir; var endPos = end + dir; SpellDetector.AddSpell(sender, startPos, endPos, data); SpellDetector.AddSpell(sender, endPos, startPos, data); spellArgs.NoProcess = true; }
private static void TaricE( Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args, SpellData data, SpellArgs spellArgs) { if (data.MenuName != "TaricE") { return; } foreach (var hero in HeroManager.AllHeroes.Where( i => i.IsValid() && !i.IsDead && i.IsVisible && i.Team == sender.Team && i.HasBuff("taricwleashactive"))) { SpellDetector.AddSpell(hero, hero.ServerPosition, args.End, data); } }
private static void AatroxE( Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args, SpellData data, SpellArgs spellArgs) { if (data.MenuName != "AatroxE") { return; } var startPos = sender.ServerPosition.To2D(); var endPos = args.End.To2D(); var dir = (endPos - startPos).Normalized().Perpendicular() * data.Radius; SpellDetector.AddSpell(sender, startPos + dir, endPos, data); SpellDetector.AddSpell(sender, startPos - dir, endPos, data); spellArgs.NoProcess = true; }
private static void FizzQ( Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args, SpellData data, SpellArgs spellArgs) { if (data.MenuName != "FizzQ") { return; } var target = args.Target as Obj_AI_Base; if (target != null && target.IsValid && (target.IsMe || Configs.Debug)) { SpellDetector.AddSpell(sender, sender.ServerPosition, target.ServerPosition, data); } spellArgs.NoProcess = true; }
private static void YorickE( Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args, SpellData data, SpellArgs spellArgs) { if (data.MenuName != "YorickE") { return; } var start = sender.ServerPosition.To2D(); var end = args.End.To2D(); var startPos = end.Extend(start, 120); var endPos = startPos.Extend(start, -1); var startT = Utils.GameTimeTickCount - Game.Ping / 2 + 350 + (int)(start.Distance(startPos) / 1800 * 1000); SpellDetector.AddSpell(sender, startPos, endPos, data, null, SpellType.None, true, startT); spellArgs.NoProcess = true; }
private static void KarmaQ( Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args, SpellData data, SpellArgs spellArgs) { if (data.MenuName != "KarmaQ" || !sender.HasBuff("KarmaMantra")) { return; } SpellData mantraData; if (Evade.OnProcessSpells.TryGetValue("KarmaQMantra", out mantraData)) { SpellDetector.AddSpell(sender, sender.ServerPosition, args.End, mantraData); } spellArgs.NoProcess = true; }
private static void OnPlayAnimation(Obj_AI_Base sender, GameObjectPlayAnimationEventArgs args, SpellData data) { var caster = sender as AIHeroClient; if (caster == null || !caster.IsValid || (!caster.IsEnemy && !Configs.Debug) || caster.ChampionName != data.ChampName) { return; } if ((args.Animation != "c0362dea" && args.Animation != "c6352f63") || ObjectManager.Player.HasBuff("reksaiknockupimmune")) { return; } var pos = caster.ServerPosition.To2D(); SpellDetector.AddSpell(caster, pos, pos, data); }
private static void EkkoR( Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args, SpellData data, SpellArgs spellArgs) { if (data.MenuName != "EkkoR") { return; } foreach (var obj in ObjectManager.Get <Obj_AI_Minion>() .Where(i => i.IsValid() && !i.IsDead && i.Name == "Ekko" && i.Team == sender.Team)) { SpellDetector.AddSpell(sender, sender.ServerPosition, obj.ServerPosition, data); } spellArgs.NoProcess = true; }
private static void SionE(GameObject sender, AIHeroClient hero, SpellData data) { var obj = sender as Obj_GeneralParticleEmitter; if (obj == null || !obj.IsValid || !new Regex("Sion_.+_E_Minion").IsMatch(obj.Name)) { return; } var spell = Evade.DetectedSpells.Values.FirstOrDefault(i => i.Data.MenuName == "SionE" && i.Unit.CompareId(hero)); if (spell != null) { SpellDetector.AddSpell( spell.Unit, obj.Position.To2D(), spell.Start + spell.Direction * data.Range, data); } }
private static void LuluQ( Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args, SpellData data, SpellArgs spellArgs) { if (data.MenuName != "LuluQ") { return; } foreach (var pix in ObjectManager.Get <Obj_AI_Minion>() .Where( i => i.IsValid() && !i.IsDead && i.IsVisible && i.CharData.BaseSkinName == "lulufaerie" && i.Team == sender.Team)) { SpellDetector.AddSpell(sender, pix.ServerPosition, args.End, data); } }
private static void JarvanQ( Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args, SpellData data, SpellArgs spellArgs) { if (data.MenuName != "JarvanIVQ") { return; } SpellData qeData; if (!Evade.OnProcessSpells.TryGetValue("JarvanIVQE", out qeData)) { return; } var startPos = sender.ServerPosition.To2D(); var qeEnd = startPos.Extend(args.End.To2D(), qeData.RawRange); var endPos = Evade.DetectedSpells.Values.Where( i => i.Data.MenuName == "JarvanIVE" && i.Unit.NetworkId == sender.NetworkId && i.End.Distance(startPos, qeEnd, true) < qeData.RadiusEx).Select(i => i.End).ToList(); endPos.AddRange( ObjectManager.Get <Obj_AI_Minion>() .Where( i => i.IsValid() && !i.IsDead && i.BaseSkinName == "jarvanivstandard" && i.Team == sender.Team && i.ServerPosition.To2D().Distance(startPos, qeEnd, true) < qeData.RadiusEx) .Select(i => i.ServerPosition.To2D())); if (endPos.Count > 0) { SpellDetector.AddSpell(sender, startPos, endPos.OrderBy(i => i.Distance(startPos)).First(), qeData); } }
private static void BardR(Obj_AI_Base sender, MissileClient missile, SpellData data, SpellArgs spellArgs) { if (data.MenuName != "BardR" || !missile.SData.Name.Contains("Fixed")) { return; } var newData = (SpellData)data.Clone(); newData.MissileSpeed = newData.MissileMinSpeed; var spell = Evade.DetectedSpells.Values.FirstOrDefault( i => i.Data.MenuName == data.MenuName && i.Unit.NetworkId == sender.NetworkId); if (spell == null) { spellArgs.NewData = newData; return; } Evade.DetectedSpells.Remove(spell.SpellId); SpellDetector.AddSpell(sender, missile.StartPosition, missile.EndPosition, newData, missile); }
private static void OnDash(Obj_AI_Base sender, Dash.DashItem args, SpellData data) { var caster = sender as AIHeroClient; if (caster == null || !caster.IsValid || (!caster.IsEnemy && !Configs.Debug) || caster.ChampionName != data.ChampName) { return; } if (Utils.GameTimeTickCount - lastQTick > 100) { return; } var newData = (SpellData)data.Clone(); if (caster.HasBuff("RivenFengShuiEngine")) { newData.Radius += 75; } SpellDetector.AddSpell(caster, args.StartPos, args.EndPos, newData, null, SpellType.None, true, lastQTick); }