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

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