private void TrackersLoaded(object o) { try { if (o is Trackers && (o as Trackers).Menu != null) { _trackers = (o as Trackers); Menu = new Menu(Name, Name); var drawingMenu = new Menu("绘制", Name + "Drawing"); drawingMenu.AddItem( new MenuItem(Name + "DrawingCircleColor", "圆圈颜色").SetValue(new Circle(true, Color.YellowGreen))); drawingMenu.AddItem( new MenuItem(Name + "DrawingCircleRadius", "圆圈半径").SetValue(new Slider(30))); Menu.AddSubMenu(drawingMenu); Menu.AddItem(new MenuItem(Name + "Enabled", "Enabled").SetValue(false)); _trackers.Menu.AddSubMenu(Menu); Drawing.OnDraw += OnDraw; Initialized = true; } } catch (Exception ex) { Logger.WriteBlock(ex.Message, ex.ToString()); } }
private void TrackersLoaded(object o) { try { if (o is Trackers && (o as Trackers).Menu != null) { _trackers = (o as Trackers); Menu = new Menu(Name, Name); var drawingMenu = new Menu("Drawing", Name + "Drawing"); drawingMenu.AddItem(new MenuItem(Name + "DrawingCrossColor", "Cross Color").SetValue(Color.DarkRed)); drawingMenu.AddItem(new MenuItem(Name + "DrawingLineColor", "Line Color").SetValue(Color.White)); Menu.AddSubMenu(drawingMenu); Menu.AddItem(new MenuItem(Name + "DrawAlly", "Ally").SetValue(false)); Menu.AddItem(new MenuItem(Name + "DrawEnemy", "Enemy").SetValue(true)); Menu.AddItem(new MenuItem(Name + "Enabled", "Enabled").SetValue(false)); _trackers.Menu.AddSubMenu(Menu); Drawing.OnDraw += OnDraw; Initialized = true; } } catch (Exception ex) { Logger.WriteBlock(ex.Message, ex.ToString()); } }
private void TrackersLoaded(object o) { try { if (o is Trackers && (o as Trackers).Menu != null) { _trackers = (o as Trackers); Menu = new Menu(Name, Name); Menu.AddItem(new MenuItem(Name + "Enabled", "Enabled").SetValue(false)); _trackers.Menu.AddSubMenu(Menu); GameObject.OnCreate += OnCreateObject; GameObject.OnDelete += OnDeleteObject; Obj_AI_Base.OnProcessSpellCast += OnProcessSpellCast; Drawing.OnDraw += OnDraw; Initialized = true; } } catch (Exception ex) { Logger.WriteBlock(ex.Message, ex.ToString()); } }
private void TrackersLoaded(object o) { try { if (o is Trackers && (o as Trackers).Menu != null) { _trackers = (o as Trackers); Menu = new Menu(Name, Name); var eMenuItem = new MenuItem(Name + "Enabled", "启用").SetValue(true); eMenuItem.ValueChanged += (sender, args) => _enemies.ForEach(enemy => enemy.Active = args.GetNewValue <bool>()); Menu.AddItem(eMenuItem); _trackers.Menu.AddSubMenu(Menu); var recall = false; if (IoC.IsRegistered <RecallTracker>()) { var rt = IoC.Resolve <RecallTracker>(); if (rt.Initialized) { recall = rt.Menu.Item(rt.Name + "Enabled").GetValue <bool>(); } } foreach ( Obj_AI_Hero hero in ObjectManager.Get <Obj_AI_Hero>().Where(hero => hero.IsValid && hero.IsEnemy) ) { try { _enemies.Add(new LastPosition(hero) { Active = Enabled, Recall = recall }); } catch (Exception ex) { Logger.WriteBlock(ex.Message, ex.ToString()); } } Initialized = true; } } catch (Exception ex) { Logger.WriteBlock(ex.Message, ex.ToString()); } }
private void TrackersLoaded(object o) { try { if (o is Trackers && (o as Trackers).Menu != null) { _trackers = (o as Trackers); Menu = new Menu(Name, Name); var eMenuItem = new MenuItem(Name + "Enabled", "启用").SetValue(true); eMenuItem.ValueChanged += (sender, args) => IoC.Resolve <Mediator>().NotifyColleagues(Name + "_Enabled", args.GetNewValue <bool>()); Menu.AddItem(eMenuItem); _trackers.Menu.AddSubMenu(Menu); foreach ( Obj_AI_Hero hero in ObjectManager.Get <Obj_AI_Hero>().Where(hero => hero.IsValid && hero.IsEnemy) ) { _recalls.Add(new Recall(hero)); } Game.OnGameProcessPacket += OnGameProcessPacket; Drawing.OnDraw += OnDraw; IoC.Resolve <Mediator>().NotifyColleagues(Name + "_Enabled", Menu.Item(Name + "Enabled")); Initialized = true; } } catch (Exception ex) { Logger.WriteBlock(ex.Message, ex.ToString()); } }
private void TrackersLoaded(object o) { try { if (o is Trackers && (o as Trackers).Menu != null) { _trackers = (o as Trackers); Menu = new Menu(Name, Name); var eEMenuItem = new MenuItem(Name + "EnemyEnabled", "追踪敌人").SetValue(true); var aAMenuItem = new MenuItem(Name + "AllyEnabled", "追踪队友").SetValue(true); var eMenuItem = new MenuItem(Name + "Enabled", "启用").SetValue(true); Menu.AddItem(eEMenuItem); Menu.AddItem(aAMenuItem); Menu.AddItem(eMenuItem); eEMenuItem.ValueChanged += (sender, args) => _cooldowns.ForEach( cd => cd.Active = Menu.Item(Name + "Enabled").GetValue <bool>() && (cd.Hero.IsEnemy && args.GetNewValue <bool>() || cd.Hero.IsAlly && Menu.Item(Name + "AllyEnabled").GetValue <bool>())); aAMenuItem.ValueChanged += (sender, args) => _cooldowns.ForEach( cd => cd.Active = Menu.Item(Name + "Enabled").GetValue <bool>() && (cd.Hero.IsEnemy && Menu.Item(Name + "EnemyEnabled").GetValue <bool>() || cd.Hero.IsAlly && args.GetNewValue <bool>())); eMenuItem.ValueChanged += (sender, args) => _cooldowns.ForEach( cd => cd.Active = args.GetNewValue <bool>() && (cd.Hero.IsEnemy && Menu.Item(Name + "EnemyEnabled").GetValue <bool>() || cd.Hero.IsAlly && Menu.Item(Name + "AllyEnabled").GetValue <bool>())); _trackers.Menu.AddSubMenu(Menu); foreach ( Obj_AI_Hero hero in ObjectManager.Get <Obj_AI_Hero>().Where(hero => hero.IsValid && !hero.IsMe)) { try { _cooldowns.Add(new Cooldown(hero) { Active = Enabled && (hero.IsEnemy && Menu.Item(Name + "EnemyEnabled").GetValue <bool>() || hero.IsAlly && Menu.Item(Name + "AllyEnabled").GetValue <bool>()) }); } catch (Exception ex) { Logger.WriteBlock(ex.Message, ex.ToString()); } } Initialized = true; } } catch (Exception ex) { Logger.WriteBlock(ex.Message, ex.ToString()); } }
private void TrackersLoaded(object o) { try { if (o is Trackers && (o as Trackers).Menu != null) { _trackers = (o as Trackers); Menu = new Menu(Name, Name); var eMenuItem = new MenuItem(Name + "Enabled", "Enabled").SetValue(true); eMenuItem.ValueChanged += (sender, args) => _enemies.ForEach(enemy => enemy.Active = args.GetNewValue<bool>()); Menu.AddItem(eMenuItem); _trackers.Menu.AddSubMenu(Menu); var recall = false; if (IoC.IsRegistered<RecallTracker>()) { var rt = IoC.Resolve<RecallTracker>(); if (rt.Initialized) { recall = rt.Menu.Item(rt.Name + "Enabled").GetValue<bool>(); } } foreach ( Obj_AI_Hero hero in ObjectManager.Get<Obj_AI_Hero>().Where(hero => hero.IsValid && hero.IsEnemy) ) { try { _enemies.Add(new LastPosition(hero) {Active = Enabled, Recall = recall}); } catch (Exception ex) { Logger.WriteBlock(ex.Message, ex.ToString()); } } Initialized = true; } } catch (Exception ex) { Logger.WriteBlock(ex.Message, ex.ToString()); } }
private void TrackersLoaded(object o) { try { if (o is Trackers && (o as Trackers).Menu != null) { _trackers = (o as Trackers); Menu = new Menu(Name, Name); var drawingMenu = new Menu("Drawing", Name + "Drawing"); drawingMenu.AddItem( new MenuItem(Name + "DrawingCircleColor", "Circle Color").SetValue(Color.YellowGreen)); drawingMenu.AddItem( new MenuItem(Name + "DrawingCircleRadius", "Circle Radius").SetValue(new Slider(30))); Menu.AddSubMenu(drawingMenu); Menu.AddItem(new MenuItem(Name + "Enabled", "Enabled").SetValue(false)); _trackers.Menu.AddSubMenu(Menu); Drawing.OnDraw += OnDraw; Initialized = true; } } catch (Exception ex) { Logger.WriteBlock(ex.Message, ex.ToString()); } }
private void TrackersLoaded(object o) { try { if (o is Trackers && (o as Trackers).Menu != null) { _trackers = (o as Trackers); Menu = new Menu(Name, Name); var eMenuItem = new MenuItem(Name + "Enabled", "Enabled").SetValue(true); eMenuItem.ValueChanged += (sender, args) => IoC.Resolve<Mediator>().NotifyColleagues(Name + "_Enabled", args.GetNewValue<bool>()); Menu.AddItem(eMenuItem); _trackers.Menu.AddSubMenu(Menu); foreach ( Obj_AI_Hero hero in ObjectManager.Get<Obj_AI_Hero>().Where(hero => hero.IsValid && hero.IsEnemy) ) { _recalls.Add(new Recall(hero)); } Game.OnGameProcessPacket += OnGameProcessPacket; Drawing.OnDraw += OnDraw; IoC.Resolve<Mediator>().NotifyColleagues(Name + "_Enabled", Menu.Item(Name + "Enabled")); Initialized = true; } } catch (Exception ex) { Logger.WriteBlock(ex.Message, ex.ToString()); } }
private void TrackersLoaded(object o) { try { if (o is Trackers && (o as Trackers).Menu != null) { _trackers = (o as Trackers); Menu = new Menu(Name, Name); var eEMenuItem = new MenuItem(Name + "EnemyEnabled", "Track Enemy").SetValue(true); var aAMenuItem = new MenuItem(Name + "AllyEnabled", "Track Ally").SetValue(true); var eMenuItem = new MenuItem(Name + "Enabled", "Enabled").SetValue(true); Menu.AddItem(eEMenuItem); Menu.AddItem(aAMenuItem); Menu.AddItem(eMenuItem); eEMenuItem.ValueChanged += (sender, args) => _cooldowns.ForEach( cd => cd.Active = Menu.Item(Name + "Enabled").GetValue<bool>() && (cd.Hero.IsEnemy && args.GetNewValue<bool>() || cd.Hero.IsAlly && Menu.Item(Name + "AllyEnabled").GetValue<bool>())); aAMenuItem.ValueChanged += (sender, args) => _cooldowns.ForEach( cd => cd.Active = Menu.Item(Name + "Enabled").GetValue<bool>() && (cd.Hero.IsEnemy && Menu.Item(Name + "EnemyEnabled").GetValue<bool>() || cd.Hero.IsAlly && args.GetNewValue<bool>())); eMenuItem.ValueChanged += (sender, args) => _cooldowns.ForEach( cd => cd.Active = args.GetNewValue<bool>() && (cd.Hero.IsEnemy && Menu.Item(Name + "EnemyEnabled").GetValue<bool>() || cd.Hero.IsAlly && Menu.Item(Name + "AllyEnabled").GetValue<bool>())); _trackers.Menu.AddSubMenu(Menu); foreach ( Obj_AI_Hero hero in ObjectManager.Get<Obj_AI_Hero>().Where(hero => hero.IsValid && !hero.IsMe)) { try { _cooldowns.Add(new Cooldown(hero) { Active = Enabled && (hero.IsEnemy && Menu.Item(Name + "EnemyEnabled").GetValue<bool>() || hero.IsAlly && Menu.Item(Name + "AllyEnabled").GetValue<bool>()) }); } catch (Exception ex) { Logger.WriteBlock(ex.Message, ex.ToString()); } } Initialized = true; } } catch (Exception ex) { Logger.WriteBlock(ex.Message, ex.ToString()); } }