public static void Initialize() { WindWallMenu = MenuHandler.AddSubMenu(MenuHandler.mainMenu, "Wind Wall"); MenuHandler.AddCheckboxes(ref WindWallMenu, "Use Wind Wall", "Increase FPS", "Debug_false", "Use Champion Names"); WindWallMenu.AddSeparator(1); ComboBox WWCCComboBox = MenuHandler.AddComboBox(WindWallMenu, "Spells To Block: ", 2, "Block All", "Block CC", "Block CC but Slows", "Custom"); WindWallMenu.AddGroupLabel("Enemy Projectile Toggles"); foreach (AIHeroClient client in EntityManager.Heroes.Enemies) { foreach (SpellInfo info in SpellDatabase.SpellList) { if (info.ChampionName == client.ChampionName) { EnemyProjectileInformation.Add(info); MenuHandler.AddCheckbox(ref WindWallMenu, "WindWallSpell." + info.SpellName + ".WindWallMissile." + info.MissileName); } } } Game.OnTick += GameOnTick; Game.OnUpdate += GameOnUpdate; GameObject.OnCreate += OnCreate; GameObject.OnDelete += OnDelete; Obj_AI_Base.OnUpdatePosition += OnUpdate; CheckBox ChampionNames = MenuHandler.GetCheckbox(WindWallMenu, "Use Champion Names"); ChampionNames.OnValueChange += ToggleNameFormat; WWCCComboBox.OnValueChange += ToggleBlockFormat; ToggleBlockFormat(WWCCComboBox, null); ToggleNameFormat(ChampionNames, null); }
private static void ToggleBlockFormat(ValueBase sender, EventArgs args) { int value = sender.Cast <ComboBox>().CurrentValue; if (value == (int)CCTypeComboBoxOptions.Custom) { foreach (SpellInfo info in EnemyProjectileInformation) { MenuHandler.GetCheckbox(WindWallMenu, "WindWallSpell." + info.SpellName + ".WindWallMissile." + info.MissileName).IsVisible = true; } } else if (value == (int)CCTypeComboBoxOptions.BlockAll) { foreach (SpellInfo info in EnemyProjectileInformation) { MenuHandler.GetCheckbox(WindWallMenu, "WindWallSpell." + info.SpellName + ".WindWallMissile." + info.MissileName).IsVisible = false; } } else if (value == (int)CCTypeComboBoxOptions.BlockCC) { foreach (SpellInfo info in EnemyProjectileInformation) { if (info.CCType != BuffType.Internal) { MenuHandler.GetCheckbox(WindWallMenu, "WindWallSpell." + info.SpellName + ".WindWallMissile." + info.MissileName).IsVisible = true; } else { MenuHandler.GetCheckbox(WindWallMenu, "WindWallSpell." + info.SpellName + ".WindWallMissile." + info.MissileName).IsVisible = false; } } } else if (value == (int)CCTypeComboBoxOptions.BlockCCExcludingSlows) { foreach (SpellInfo info in EnemyProjectileInformation) { if (info.CCType != BuffType.Internal && info.CCType != BuffType.Slow) { MenuHandler.GetCheckbox(WindWallMenu, "WindWallSpell." + info.SpellName + ".WindWallMissile." + info.MissileName).IsVisible = true; } else { MenuHandler.GetCheckbox(WindWallMenu, "WindWallSpell." + info.SpellName + ".WindWallMissile." + info.MissileName).IsVisible = false; } } } }
public static bool ShouldWindWall(MissileClient missile, SpellInfo info) { //checks if: //if projectile name = info's spell name //if player is within W range (therefore W will force block it) if (missile.SpellCaster.Name != "Diana") { if (missile.SData.Name != info.MissileName || !missile.IsInRange(Yasuo, Program.W.Range * 2)) { return(false); } else if (missile.SpellCaster.Name == "Diana" && !missile.SData.Name.Contains(info.MissileName)) { return(false); } } //doesnt seem to work //checks if the ability is a lock on projectile and the target is me if (info.ProjectileType == SpellDatabase.ProjectileType.LockOnProjectile && missile.Target != Yasuo) { return(false); } //checks if channeling ability is too close to player if (info.ChannelType != SpellDatabase.ChannelType.None) { //if enemy skillshot is far enough away and E is ready continue. else return false if (!HandleChannelingSpells(missile, info)) { return(false); } } CheckBox toggleBox = MenuHandler.GetCheckbox(WindWallMenu, "WindWallSpell." + info.SpellName + ".WindWallMissile." + info.MissileName); //check if checkbox for spell is enabled if ((toggleBox != null && toggleBox.IsVisible) || MenuHandler.GetComboBoxText(WindWallMenu, "Spells To Block: ") == "Block All") { return(toggleBox.CurrentValue); } return(false); }
private static void ToggleNameFormat(ValueBase sender, EventArgs args) { if (sender.Cast <CheckBox>().CurrentValue) { foreach (SpellInfo info in EnemyProjectileInformation) { MenuHandler.GetCheckbox(WindWallMenu, "WindWallSpell." + info.SpellName + ".WindWallMissile." + info.MissileName).DisplayName = info.ChampionName + "'s " + info.Slot.ToString(); } } else { foreach (SpellInfo info in EnemyProjectileInformation) { MenuHandler.GetCheckbox(WindWallMenu, "WindWallSpell." + info.SpellName + ".WindWallMissile." + info.MissileName).DisplayName = info.MissileName; } } }