private Vector3 GetRealPosition(Vector3 end) { if (end.IsWall()) { for (var i = 0; i < 500; i = i + 2) { List<IntPoint> circlePath = new Geometry.Polygon.Circle(end, i, 10).ToClipperPath(); foreach (var item in circlePath) { Vector3 newPos = new Vector2(item.X, item.Y).To3D2(); if (!newPos.IsWall()) { return newPos; } } } } return end; }
bool isWall(Vector3 Pos) { return Pos.IsWall(); }
private bool CheckQusage(Vector3 pos, Obj_AI_Hero target) { return pos.IsValid() && pos.Distance(player.Position) < Q.Range && (target.HasBuff("fiorapassivemanager") || target.HasBuff("fiorarmark")) && !pos.IsWall() && Qradius > pos.Distance(target.Position); }
private static void Jump(Vector3 position) { if (position.IsWall()) return; if(Player.Distance(position) > W.Range) { position = Player.Position.Extend(position, W.Range); } Obj_AI_Base obj = HeroManager.Allies.FirstOrDefault(x => x.IsValid && !x.IsDead && !x.IsMe && x.Distance(position) < 150 ); if (obj == null) { obj = ObjectManager.Get<Obj_AI_Minion>().FirstOrDefault(x => x.IsValid && x.IsAlly && !x.IsDead && x.Distance(position) < 150); } if(obj == null) { if (Utils.TickCount - LastTimeWardPlace < 250) { Utility.DelayAction.Add(40, () => Jump(position)); Orbwalker.SetOrbwalkingPoint(position); return; } if (TrinketN.IsReady()) { TrinketN.Cast(position); LastTimeWardPlace = Utils.TickCount; Utility.DelayAction.Add(40, () => Jump(position)); } else if (SightStone.IsReady()) { SightStone.Cast(position); LastTimeWardPlace = Utils.TickCount; Utility.DelayAction.Add(40, () => Jump(position)); } else if (WardN.IsReady()) { WardN.Cast(position); LastTimeWardPlace = Utils.TickCount; Utility.DelayAction.Add(40, () => Jump(position)); } else if (EOTOasis.IsReady()) { EOTOasis.Cast(position); LastTimeWardPlace = Utils.TickCount; Utility.DelayAction.Add(40, () => Jump(position)); } else if (EOTEquinox.IsReady()) { EOTEquinox.Cast(position); LastTimeWardPlace = Utils.TickCount; Utility.DelayAction.Add(40, () => Jump(position)); } else if (EOTWatchers.IsReady()) { EOTWatchers.Cast(position); LastTimeWardPlace = Utils.TickCount; Utility.DelayAction.Add(40, () => Jump(position)); } } else { W.Cast(obj); } }