public static void Init() { try { var upvoteItem = Upvote.Initialize(Global.Name, 7); 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); } }; SetupLanguage(); GameObjects.Initialize(); CustomEvents.Game.OnGameLoad += delegate { try { _champion = LoadChampion(); if (_champion != null) { try { Update.Check( Global.Name, Assembly.GetExecutingAssembly().GetName().Version, Global.UpdatePath, 10000); } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } Core.Init(_champion, 50); Core.Boot(); if (_champion.SFXMenu != null && upvoteItem != null) { _champion.SFXMenu.SubMenu(_champion.SFXMenu.Name + ".settings").AddItem(upvoteItem); } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }; } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
public static void Init() { try { #region Upvote var upvoteItem = Upvote.Initialize(Global.Name, 7); #endregion Upvote 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); } }; SetupLanguage(); #region GameObjects GameObjects.Initialize(); #endregion GameObjects Global.SFX = new SFXUtility(); #region Upvote Global.SFX.Menu.SubMenu(Global.SFX.Name + "Settings").AddItem(upvoteItem); #endregion Upvote #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 CustomEvents.Game.OnGameLoad += delegate { Global.Features.AddRange( new List <IChild> { #region Features 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 LasthitMarker(drawings), new PerfectWard(drawings), new Range(drawings), new SafeJungleSpot(drawings), new WallJumpSpot(drawings), new Waypoint(drawings), new AutoLeveler(events), new 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 Relic(timers), new Inhibitor(timers), new Jungle(timers), new GoldEfficiency(trackers), 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)); } }