예제 #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);
 }