Exemple #1
0
 /// <summary>
 ///     Deregisters the specified entry.
 /// </summary>
 /// <param name="entry">The entry.</param>
 public static void Deregister(InvulnerableEntry entry)
 {
     if (PEntries.Any(i => i.BuffName.Equals(entry.BuffName)))
     {
         PEntries.Remove(entry);
     }
 }
Exemple #2
0
 /// <summary>
 ///     Registers the specified entry.
 /// </summary>
 /// <param name="entry">The entry.</param>
 public static void Register(InvulnerableEntry entry)
 {
     if (!string.IsNullOrEmpty(entry.BuffName) && !PEntries.Any(i => i.BuffName.Equals(entry.BuffName)))
     {
         PEntries.Add(entry);
     }
 }
Exemple #3
0
 /// <summary>
 ///     Executes the check function.
 /// </summary>
 /// <param name="entry">The entry.</param>
 /// <param name="hero">The target.</param>
 /// <param name="damageType">Type of the damage.</param>
 /// <returns></returns>
 private static bool ExecuteCheckFunction(InvulnerableEntry entry, AIHeroClient hero, DamageType damageType)
 {
     try
     {
         return(entry != null && entry.CheckFunction(hero, damageType));
     }
     catch (Exception ex)
     {
         //LogManager.GetCurrentClassLogger().Error(ex);
     }
     return(false);
 }
 /// <summary>
 ///     Executes the check function.
 /// </summary>
 /// <param name="entry">The entry.</param>
 /// <param name="hero">The target.</param>
 /// <param name="damageType">Type of the damage.</param>
 /// <returns></returns>
 private static bool ExecuteCheckFunction(InvulnerableEntry entry, Obj_AI_Hero hero, DamageType damageType)
 {
     try
     {
         return(entry != null && entry.CheckFunction(hero, damageType));
     }
     catch (Exception ex)
     {
         Logging.Write()(LogLevel.Error, ex);
     }
     return(false);
 }
 /// <summary>
 ///     Executes the check function.
 /// </summary>
 /// <param name="entry">The entry.</param>
 /// <param name="hero">The target.</param>
 /// <param name="damageType">Type of the damage.</param>
 /// <returns></returns>
 private static bool ExecuteCheckFunction(InvulnerableEntry entry, Obj_AI_Hero hero, DamageType damageType)
 {
     try
     {
         return entry != null && entry.CheckFunction(hero, damageType);
     }
     catch (Exception ex)
     {
         Logging.Write()(LogLevel.Error, ex);
     }
     return false;
 }
 /// <summary>
 ///     Registers the specified entry.
 /// </summary>
 /// <param name="entry">The entry.</param>
 public static void Register(InvulnerableEntry entry)
 {
     if (!string.IsNullOrEmpty(entry.BuffName) && !PEntries.Any(i => i.BuffName.Equals(entry.BuffName)))
     {
         PEntries.Add(entry);
     }
 }
 /// <summary>
 ///     Deregisters the specified entry.
 /// </summary>
 /// <param name="entry">The entry.</param>
 public static void Deregister(InvulnerableEntry entry)
 {
     if (PEntries.Any(i => i.BuffName.Equals(entry.BuffName)))
     {
         PEntries.Remove(entry);
     }
 }
Exemple #8
0
 /// <summary>
 ///     Executes the check function.
 /// </summary>
 /// <param name="entry">The entry.</param>
 /// <param name="hero">The target.</param>
 /// <param name="damageType">Type of the damage.</param>
 /// <returns></returns>
 private static bool ExecuteCheckFunction(InvulnerableEntry entry, AIHeroClient hero, DamageType damageType)
 {
     try
     {
         return entry != null && entry.CheckFunction(hero, damageType);
     }
     catch (Exception ex)
     {
         //LogManager.GetCurrentClassLogger().Error(ex);
     }
     return false;
 }