Search Results for

    Show / Hide Table of Contents

    Class ActiveAbility

    The base class for active (on-use) abilities.

    Inheritance
    System.Object
    CustomAbility
    ActiveAbility
    Inherited Members
    CustomAbility.Registered
    CustomAbility.Name
    CustomAbility.Description
    CustomAbility.Players
    CustomAbility.AbilityType
    CustomAbility.Get(String)
    CustomAbility.Get(Type)
    CustomAbility.TryGet(Type, CustomAbility)
    CustomAbility.TryGet(String, CustomAbility)
    CustomAbility.RegisterAbilities(Boolean, Object)
    CustomAbility.RegisterAbilities(IEnumerable<Type>, Boolean, Boolean, Object)
    CustomAbility.UnregisterAbilities()
    CustomAbility.UnregisterAbilities(IEnumerable<Type>, Boolean)
    CustomAbility.UnregisterAbilities(IEnumerable<CustomAbility>, Boolean)
    CustomAbility.AddAbility(Player)
    CustomAbility.RemoveAbility(Player)
    CustomAbility.Init()
    CustomAbility.Destroy()
    CustomAbility.SubscribeEvents()
    CustomAbility.UnsubscribeEvents()
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Exiled.CustomRoles.API.Features
    Assembly: Exiled.CustomRoles.dll
    Syntax
    public abstract class ActiveAbility : CustomAbility

    Properties

    | Improve this Doc View Source

    ActivePlayers

    Gets all players actively using this ability.

    Declaration
    [YamlIgnore]
    public HashSet<Player> ActivePlayers { get; }
    Property Value
    Type Description
    System.Collections.Generic.HashSet<Player>
    | Improve this Doc View Source

    AllActiveAbilities

    Gets a System.Collections.Generic.Dictionary<TKey, TValue> containing all players with active abilities, and the abilities they have access to.

    Declaration
    public static Dictionary<Player, HashSet<ActiveAbility>> AllActiveAbilities { get; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<Player, System.Collections.Generic.HashSet<ActiveAbility>>
    | Improve this Doc View Source

    CanUseOverride

    Gets or sets an action to override the behavior of CanUseAbility(Player, out String, Boolean).

    Declaration
    [YamlIgnore]
    public virtual Func<bool> CanUseOverride { get; set; }
    Property Value
    Type Description
    System.Func<System.Boolean>
    | Improve this Doc View Source

    Cooldown

    Gets or sets how long must go between ability uses.

    Declaration
    public abstract float Cooldown { get; set; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    Duration

    Gets or sets how long the ability lasts.

    Declaration
    public abstract float Duration { get; set; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    LastUsed

    Gets the last time this ability was used.

    Declaration
    [YamlIgnore]
    public Dictionary<Player, DateTime> LastUsed { get; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<Player, System.DateTime>
    | Improve this Doc View Source

    SelectedPlayers

    Gets all players who have this ability selected.

    Declaration
    [YamlIgnore]
    public HashSet<Player> SelectedPlayers { get; }
    Property Value
    Type Description
    System.Collections.Generic.HashSet<Player>

    Methods

    | Improve this Doc View Source

    AbilityAdded(Player)

    Declaration
    protected override void AbilityAdded(Player player)
    Parameters
    Type Name Description
    Player player
    Overrides
    CustomAbility.AbilityAdded(Player)
    | Improve this Doc View Source

    AbilityEnded(Player)

    Called when the abilities duration has ended.

    Declaration
    protected virtual void AbilityEnded(Player player)
    Parameters
    Type Name Description
    Player player

    The Player the ability has ended for.

    | Improve this Doc View Source

    AbilityRemoved(Player)

    Declaration
    protected override void AbilityRemoved(Player player)
    Parameters
    Type Name Description
    Player player
    Overrides
    CustomAbility.AbilityRemoved(Player)
    | Improve this Doc View Source

    AbilityUsed(Player)

    Called when the ability is used.

    Declaration
    protected virtual void AbilityUsed(Player player)
    Parameters
    Type Name Description
    Player player

    The Player using the ability.

    | Improve this Doc View Source

    CanUseAbility(Player, out String, Boolean)

    Checks to see if the ability is usable by the player.

    Declaration
    public virtual bool CanUseAbility(Player player, out string response, bool selectedOnly = false)
    Parameters
    Type Name Description
    Player player

    The player to check.

    System.String response

    The response to send to the player.

    System.Boolean selectedOnly

    Whether to disallow usage if the ability is not selected.

    Returns
    Type Description
    System.Boolean

    True if the ability is usable.

    | Improve this Doc View Source

    Check(Player)

    Checks if the specified player is using the ability.

    Declaration
    public override bool Check(Player player)
    Parameters
    Type Name Description
    Player player

    The Player to check.

    Returns
    Type Description
    System.Boolean

    True if the player is actively using the ability.

    Overrides
    CustomAbility.Check(Player)
    | Improve this Doc View Source

    Check(Player, CheckType)

    Checks if the specified Player meets certain check criteria.

    Declaration
    public virtual bool Check(Player player, CheckType type)
    Parameters
    Type Name Description
    Player player

    The Player to check.

    CheckType type

    The CheckType type of check to preform.

    Returns
    Type Description
    System.Boolean

    The results of the check. Active: Checks if the ability is currently active for the player. Selected: Checks if the player has the ability selected. Available: Checks if the player has the ability.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    This should never happen unless Joker fucks up.

    | Improve this Doc View Source

    EndAbility(Player)

    Ends the ability.

    Declaration
    public void EndAbility(Player player)
    Parameters
    Type Name Description
    Player player

    The Player the ability is ended for.

    | Improve this Doc View Source

    SelectAbility(Player)

    Selects the ability.

    Declaration
    public void SelectAbility(Player player)
    Parameters
    Type Name Description
    Player player

    The Player to select the ability.

    | Improve this Doc View Source

    Selected(Player)

    Called when the ability is selected.

    Declaration
    protected virtual void Selected(Player player)
    Parameters
    Type Name Description
    Player player

    The Player selecting the ability.

    | Improve this Doc View Source

    ShowMessage(Player)

    Called when the ability is successfully used.

    Declaration
    [Obsolete("The Keypress Activator will already do this, you do not need to call this unless you are overwriting the keypress activator.", true)]
    protected virtual void ShowMessage(Player player)
    Parameters
    Type Name Description
    Player player

    The Player using the ability.

    | Improve this Doc View Source

    UnSelectAbility(Player)

    Un-Selects the ability.

    Declaration
    public void UnSelectAbility(Player player)
    Parameters
    Type Name Description
    Player player

    The Player to un-select the ability.

    | Improve this Doc View Source

    Unselected(Player)

    Called when the ability is un-selected.

    Declaration
    protected virtual void Unselected(Player player)
    Parameters
    Type Name Description
    Player player

    The Player un-selecting the ability.

    | Improve this Doc View Source

    UseAbility(Player)

    Uses the ability.

    Declaration
    public void UseAbility(Player player)
    Parameters
    Type Name Description
    Player player

    The Player using the ability.

    Extension Methods

    Extensions.Register(CustomAbility)
    Extensions.Unregister(CustomAbility)
    ReflectionExtensions.CopyProperties(Object, Object)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX