public Positions Update(RecallInf newData) { if (newData.Type == TeleportType.Recall && newData.Status == TeleportStatus.Abort) { Aborted = Recall; AbortTime = System.Environment.TickCount; started = false; } else { AbortTime = 0; } if (newData.Type == TeleportType.Recall && newData.Status == TeleportStatus.Finish) { started = false; } if (newData.Type == TeleportType.Recall && newData.Status == TeleportStatus.Start) { if (!started) { RecallStartTime = System.Environment.TickCount; } started = true; } Recall = newData; return(Positions); }
private void Obj_AI_Base_OnTeleport(Obj_AI_Base sender, Teleport.TeleportEventArgs args) { var unit = sender as AIHeroClient; if (unit == null || !unit.IsValid || unit.IsAlly) { return; } RecallInf recall = new RecallInf(unit.NetworkId, args.Status, args.Type, args.Duration, args.Start); { Enemies.Find(x => x.Player.NetworkId == unit.NetworkId).RecallData.Update(recall); Console.WriteLine(unit.ChampionName + " detected recall."); } }
public RecallData(Positions positions) { Positions = positions; Recall = new RecallInf( Positions.Player.NetworkId, TeleportStatus.Unknown, TeleportType.Unknown, 0); }