示例#1
0
        private void OnAbilityRemove(object sender, AbilityEventArgs abilityEventArgs)
        {
            if (!abilityEventArgs.IsMine)
            {
                return;
            }

            if (abilityEventArgs.Ability.GetManaCost(0) > 0)
            {
                menu.RemoveAbility(abilityEventArgs.Ability.StoredName());
            }
        }
示例#2
0
        private void OnAbilityAdd(object sender, AbilityEventArgs abilityEventArgs)
        {
            if (!abilityEventArgs.IsMine)
            {
                return;
            }

            if (abilityEventArgs.Ability.GetManaCost(0) > 0)
            {
                menu.AddAbility(abilityEventArgs.Ability.StoredName(), true);
            }
        }
示例#3
0
        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);
            }
        }
示例#4
0
 private void OnAbilityRemove(object sender, AbilityEventArgs abilityEventArgs)
 {
     invisAbilities.Remove(abilityEventArgs.Ability);
 }