private void OnAbilityRemove(object sender, AbilityEventArgs abilityEventArgs) { if (!abilityEventArgs.IsMine) { return; } if (abilityEventArgs.Ability.GetManaCost(0) > 0) { menu.RemoveAbility(abilityEventArgs.Ability.StoredName()); } }
private void OnAbilityAdd(object sender, AbilityEventArgs abilityEventArgs) { if (!abilityEventArgs.IsMine) { return; } if (abilityEventArgs.Ability.GetManaCost(0) > 0) { menu.AddAbility(abilityEventArgs.Ability.StoredName(), true); } }
private void OnAbilityAdd(object sender, AbilityEventArgs abilityEventArgs) { if (!abilityEventArgs.Ability.IsInvis()) { return; } var item = abilityEventArgs.Ability as Item; if (item != null && item.Purchaser?.Team == manager.MyHero.EnemyTeam) { invisAbilities.Add(item); return; } var ability = abilityEventArgs.Ability; if (ability.Owner?.Team == manager.MyHero.EnemyTeam) { invisAbilities.Add(ability); } }
private void OnAbilityRemove(object sender, AbilityEventArgs abilityEventArgs) { invisAbilities.Remove(abilityEventArgs.Ability); }