private void Drawing_OnDraw(EventArgs args) { foreach (var spell in SpellDetector.drawSpells.Values) { Vector2 spellPos = spell.currentSpellPosition; if (spell.heroID == myHero.NetworkId) { if (spell.spellType == SpellType.Line) { if (spellPos.LSDistance(myHero) <= myHero.BoundingRadius + spell.radius && EvadeUtils.TickCount - spell.startTime > spell.info.spellDelay && spell.startPos.LSDistance(myHero) < spell.info.range) { Draw.RenderObjects.Add(new Draw.RenderCircle(spellPos, 1000, Color.Red, (int)spell.radius, 10)); DelayAction.Add(1, () => SpellDetector.DeleteSpell(spell.spellID)); } else { Render.Circle.DrawCircle(new Vector3(spellPos.X, spellPos.Y, myHero.Position.Z), (int)spell.radius, Color.White, 5); } } else if (spell.spellType == SpellType.Circular) { if (myHero.ServerPosition.LSTo2D().InSkillShot(spell, myHero.BoundingRadius)) { } } } } }
private static void OnCreateObj_jayceshockblast(GameObject obj, EventArgs args, Obj_AI_Hero hero, SpellData spellData) { return; if (obj.IsEnemy && obj.Type == GameObjectType.obj_GeneralParticleEmitter && obj.Name.Contains("Jayce") && obj.Name.Contains("accel_gate_start")) { var dir = GetLastHiuOrientation(); var pos1 = obj.Position.To2D() - dir * 470; var pos2 = obj.Position.To2D() + dir * 470; var gateTracker = new ObjectTrackerInfo(obj, "AccelGate"); gateTracker.direction = dir.To3D(); objTracker.Add(obj.NetworkId, gateTracker); foreach (var entry in SpellDetector.spells) { var spell = entry.Value; if (spell.info.spellName == "jayceshockblast") { var tHero = spell.heroID; var intersection = spell.startPos.Intersection(spell.endPos, pos1, pos2); var projection = intersection.Point.ProjectOn(spell.startPos, spell.endPos); if (intersection.Intersects && projection.IsOnSegment) { SpellDetector.CreateSpellData(hero, intersection.Point.To3D(), spell.endPos.To3D(), spellData, spell.spellObject); DelayAction.Add(1, () => SpellDetector.DeleteSpell(entry.Key)); } } } //SpellDetector.CreateSpellData(hero, pos1.To3D(), pos2.To3D(), spellData, null, 0); } }