/// <summary>
        ///     Checks if healthrelic or traps are deleted and remove them from the list.
        /// </summary>
        public static void GameObject_OnDelete(GameObject sender, EventArgs args)
        {
            var caster = sender as Obj_AI_Base;

            if (caster != null)
            {
                var trap = new traps {
                    Trap = caster, IsSpecial = false
                };
                //var Specialtrap = new traps { Trap = caster, IsSpecial = true };
                if (EnemyTraps.Contains(trap) && trap.Trap.IsEnemy)
                {
                    EnemyTraps.Remove(trap);
                    Logger.Send("Delete " + sender.Name, Logger.LogLevel.Info);
                } /*
                   * if (EnemyTraps.Contains(Specialtrap) && caster.IsEnemy)
                   * {
                   * EnemyTraps.Remove(Specialtrap);
                   * Logger.Send("Delete " + sender.Name, Logger.LogLevel.Info);
                   * }*/
            }
            if (sender.Name.ToLower().Contains("healthrelic"))
            {
                HealthRelics.Remove(sender);
                Logger.Send("Delete " + sender.Name, Logger.LogLevel.Info);
            }
        }
示例#2
0
        /// <summary>
        ///     Checks if healthrelic or traps are deleted and remove them from the list.
        /// </summary>
        public static void GameObject_OnDelete(GameObject sender, EventArgs args)
        {
            var @base = sender as Obj_AI_Base;

            if (@base != null && @base.BaseSkinName.Equals("OlafAxe") || sender.Name.Contains("Olaf_Base_Q_Axe_Ally"))
            {
                OlafAxeObject = null;
            }

            if (sender.Name.Contains("Draven_Base_Q_reticle_self"))
            {
                if (DravenAxes.Any(a => a.Axe.IdEquals(sender)))
                {
                    DravenAxes.RemoveAll(a => a.Axe.IdEquals(sender));
                }
            }

            if (sender.GetType() == typeof(Obj_GeneralParticleEmitter))
            {
                var gameObject = (Obj_GeneralParticleEmitter)sender;
                if (ZacPassiveNames.Contains(gameObject.Name) && ZacPassives.Contains(gameObject))
                {
                    ZacPassives.Remove(gameObject);
                    Logger.Send("Delete " + gameObject.Name);
                }
            }

            var caster = sender as Obj_AI_Base;

            if (caster != null)
            {
                var trap = new traps {
                    Trap = caster, IsSpecial = false
                };
                //var Specialtrap = new traps { Trap = caster, IsSpecial = true };
                if (EnemyTraps.Contains(trap) && trap.Trap.IsEnemy)
                {
                    EnemyTraps.Remove(trap);
                    Logger.Send("Delete " + sender.Name);
                } /*
                   * if (EnemyTraps.Contains(Specialtrap) && caster.IsEnemy)
                   * {
                   * EnemyTraps.Remove(Specialtrap);
                   * Logger.Send("Delete " + sender.Name);
                   * }*/
            }
            if (sender.Name.ToLower().Contains("healthrelic"))
            {
                HealthRelics.Remove(sender);
                Logger.Send("Delete " + sender.Name);
            }
        }
示例#3
0
 /// <summary>
 ///     Checks if healthrelic is deleted and remove it from the list.
 /// </summary>
 public static void GameObject_OnDelete(GameObject sender, EventArgs args)
 {
     if (sender.Name.ToLower().Contains("healthrelic"))
     {
         HealthRelics.Remove(sender);
         Chat.Print("delete healthrelic");
     }
     if (EnemyTraps.Contains(sender) && sender.IsEnemy)
     {
         EnemyTraps.Remove((Obj_AI_Minion)sender);
         Chat.Print("delete trap");
     }
 }
示例#4
0
        /// <summary>
        ///     Checks if healthrelic or traps are deleted and remove them from the list.
        /// </summary>
        public static void GameObject_OnDelete(GameObject sender, EventArgs args)
        {
            if (sender.GetType() == typeof(Obj_GeneralParticleEmitter))
            {
                var gameObject = (Obj_GeneralParticleEmitter)sender;
                if (ZacPassiveNames.Contains(gameObject.Name) && ZacPassives.Contains(gameObject))
                {
                    ZacPassives.Remove(gameObject);
                    Logger.Send("Delete " + gameObject.Name);
                }
            }

            var caster = sender as Obj_AI_Base;

            if (caster != null)
            {
                var trap = new traps {
                    Trap = caster, IsSpecial = false
                };
                //var Specialtrap = new traps { Trap = caster, IsSpecial = true };
                if (EnemyTraps.Contains(trap) && trap.Trap.IsEnemy)
                {
                    EnemyTraps.Remove(trap);
                    Logger.Send("Delete " + sender.Name);
                } /*
                   * if (EnemyTraps.Contains(Specialtrap) && caster.IsEnemy)
                   * {
                   * EnemyTraps.Remove(Specialtrap);
                   * Logger.Send("Delete " + sender.Name);
                   * }*/
            }
            if (sender.Name.ToLower().Contains("healthrelic"))
            {
                HealthRelics.Remove(sender);
                Logger.Send("Delete " + sender.Name);
            }
        }