public static void Init() { try { GameObjects.Initialize(); try { _champion = LoadChampion(); if (_champion != null) { Global.Champion = _champion; if (Global.Reset.Enabled) { Reset.Force( Global.Name, Global.Reset.MaxAge, TargetSelector.Weights.RestoreDefaultWeights); } LeagueSharp.Common.Utility.DelayAction.Add(1000, () => Conflicts.Check(ObjectManager.Player.ChampionName)); Update.Check( Global.Name, Assembly.GetExecutingAssembly().GetName().Version, Global.UpdatePath, 10000); Core.Init(_champion, 50); Core.Boot(); } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
public static void Init() { try { AppDomain.CurrentDomain.UnhandledException += delegate(object sender, UnhandledExceptionEventArgs eventArgs) { try { var ex = sender as Exception; if (ex != null) { Global.Logger.AddItem(new LogItem(ex)); } } catch (Exception ex) { Console.WriteLine(ex); } }; GameObjects.Initialize(); CustomEvents.Game.OnGameLoad += delegate { try { _champion = LoadChampion(); if (_champion != null) { if (Global.Reset.Enabled) { Reset.Force(Global.Name, Global.Reset.MaxAge, Weights.RestoreDefaultWeights); } Update.Check( Global.Name, Assembly.GetExecutingAssembly().GetName().Version, Global.UpdatePath, 10000); Core.Init(_champion, 50); Core.Boot(); } else { Console.WriteLine("No champion for: " + ObjectManager.Player.ChampionName); } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }; } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
public static void Init() { try { if (Global.Reset.Enabled) { Reset.Force(Global.Name, Global.Reset.MaxAge); } /* * AppDomain.CurrentDomain.UnhandledException += * delegate(object sender, UnhandledExceptionEventArgs eventArgs) * { * try * { * var ex = sender as Exception; * if (ex != null) * { * Global.Logger.AddItem(new LogItem(ex)); * } * } * catch (Exception ex) * { * Console.WriteLine(ex); * } * }; * */ #region GameObjects GameObjects.Initialize(); #endregion GameObjects Global.SFX = new SFXUtility(); #region Parents var activators = new Activators(); var detectors = new Detectors(); var drawings = new Drawings(); var events = new Events(); var others = new Others(); var timers = new Timers(); var trackers = new Trackers(); #endregion Parents Global.Features.AddRange( new List <IChild> { #region Features new AntiRengar(activators), new AutoJump(activators), new KillSteal(activators), new Potion(activators), new Revealer(activators), new Smite(activators), new Gank(detectors), new Replay(detectors), new Teleport(detectors), new Clock(drawings), new Clone(drawings), //new DamageIndicator(drawings), new Health(drawings), new LaneMomentum(drawings), new LasthitMarker(drawings), new PerfectWard(drawings), new Range(drawings), new WallJumpSpot(drawings), new Waypoint(drawings), new AutoLeveler(events), new Features.Events.Game(events), new Trinket(events), new AntiFountain(others), new AutoLantern(others), new Flash(others), new Humanize(others), new MoveTo(others), new Ping(others), new TurnAround(others), new Ability(timers), new Altar(timers), new Cooldown(timers), new Inhibitor(timers), new Jungle(timers), new Relic(timers), new Destination(trackers), new LastPosition(trackers), new Sidebar(trackers), new Ward(trackers) #endregion Features }); foreach (var feature in Global.Features) { try { feature.HandleEvents(); } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } } try { Update.Check( Global.Name, Assembly.GetExecutingAssembly().GetName().Version, Global.UpdatePath, 10000); } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
public static void Init() { try { if (Global.Reset.Enabled) { Reset.Force(Global.Name, Global.Reset.MaxAge); } AppDomain.CurrentDomain.UnhandledException += delegate(object sender, UnhandledExceptionEventArgs eventArgs) { try { var ex = sender as Exception; if (ex != null) { Global.Logger.AddItem(new LogItem(ex)); } } catch (Exception ex) { Console.WriteLine(ex); } }; #region GameObjects GameObjects.Initialize(); #endregion GameObjects Global.SFX = new SFXRevealer(); var app = new App(); CustomEvents.Game.OnGameLoad += delegate { Global.Features.AddRange( new List <IChild> { new Revealer(app) }); foreach (var feature in Global.Features) { try { feature.HandleEvents(); } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } } try { Update.Check( Global.Name, Assembly.GetExecutingAssembly().GetName().Version, Global.UpdatePath, 10000); } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }; } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }