public static bool TryGetAbility(string name, out ClanAbility ability) { if (All.Contains(name)) { ability = All[name]; return true; } ability = null; return false; }
public bool CanTargetAbility(ClanAbility ability, ClanMember target) { if (!this.HasAbility(ability)) { return false; } if (ability == ClanAbility.Promote) { return (this.Rank < (target.Rank - 1)); } if (ability == ClanAbility.Demote) { return ((this.Rank < target.Rank) && (target.Rank < ClanRanking.MinValue.Seniority)); } if (ability == ClanAbility.Remove) { return (this.Rank < target.Rank); } return true; }
public void Add(ClanAbility ability) { base.InnerHashtable.Add(ability.Description, ability); }
public ClanAbility[] ToArray() { ClanAbility[] array = new ClanAbility[base.InnerHashtable.Count]; base.InnerHashtable.Values.CopyTo(array, 0); return array; }
public void Remove(ClanAbility ability) { this.Remove(ability.Description); }
public bool Contains(ClanAbility ability) { return this.Contains(ability.Description); }
public bool HasAbility(ClanAbility ability) { return ability.IsAvailable(this); }
public bool CanTargetAbility(ClanAbility ability, string target) { ClanMember member; return (Clan.CurrentMembers.TryFindByIndex("name", target, out member) && this.CanTargetAbility(ability, member)); }