static Essentials() { SetSpells(); GetSmiteSlot(); Collision = new SPrediction.Collision(); // Core Game.OnUpdate += SpellsOnUpdate; Game.OnUpdate += SmiteOnUpdate; // Orbwalk shit Orbwalking.AfterAttack += Orbwalking_AfterAttack; Orbwalking.BeforeAttack += Orbwalking_BeforeAttack; // Minion Handelr GameObject.OnCreate += MinionOnCreate; GameObject.OnDelete += MinionOnDelete; // Missile Handler GameObject.OnCreate += MissileClient_OnCreate; // Cast Handler Obj_AI_Base.OnProcessSpellCast += HeroOnCast; // Anti-Gapclosing AntiGapcloser.OnEnemyGapcloser += AntiGapcloser_OnEnemyGapcloser; }
/// <summary> /// Initializes Prediction Services /// </summary> public static void Initialize(Menu mainMenu = null) { foreach (Obj_AI_Hero enemy in HeroManager.Enemies) EnemyInfo.Add(enemy.NetworkId, new EnemyData(new List<Vector2>())); Obj_AI_Hero.OnNewPath += Obj_AI_Hero_OnNewPath; if (mainMenu != null) { predMenu = new Menu("SPrediction", "SPRED"); predMenu.AddItem(new MenuItem("PREDICTONLIST", "Prediction Method").SetValue(new StringList(new[] { "SPrediction", "Common Predicion" }, 0))); predMenu.AddItem(new MenuItem("SPREDREACTIONDELAY", "Ignore Rection Delay").SetValue<Slider>(new Slider(0, 0, 200))); predMenu.AddItem(new MenuItem("SPREDDELAY", "Spell Delay").SetValue<Slider>(new Slider(0, 0, 200))); predMenu.AddItem(new MenuItem("SPREDHC", "Count HitChance").SetValue<KeyBind>(new KeyBind(32, KeyBindType.Press))); predMenu.AddItem(new MenuItem("SPREDDRAWINGS", "Enable Drawings").SetValue(true)); mainMenu.AddSubMenu(predMenu); } Collision = new SPrediction.Collision(); Drawing.OnDraw += Drawing_OnDraw; Obj_AI_Hero.OnDamage += Obj_AI_Hero_OnDamage; Obj_AI_Hero.OnProcessSpellCast += Obj_AI_Hero_OnProcessSpellCast; blInitialized = true; }