/// <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); } }
/// <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) { return(entry != null && entry.CheckFunction(hero, damageType)); }