Search Results for

    Show / Hide Table of Contents

    Class ChangingRoleEventArgs

    Contains all information before a player's PlayerRoles.RoleTypeId changes.

    Inheritance
    System.Object
    ChangingRoleEventArgs
    OwnerChangingRoleEventArgs
    Implements
    IPlayerEvent
    IDeniableEvent
    IExiledEvent
    Inherited Members
    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.Events.EventArgs.Player
    Assembly: Exiled.Events.dll
    Syntax
    public class ChangingRoleEventArgs : IPlayerEvent, IDeniableEvent, IExiledEvent

    Constructors

    | Improve this Doc View Source

    ChangingRoleEventArgs(Player, RoleTypeId, RoleChangeReason, RoleSpawnFlags)

    Initializes a new instance of the ChangingRoleEventArgs class.

    Declaration
    public ChangingRoleEventArgs(Player player, RoleTypeId newRole, RoleChangeReason reason, RoleSpawnFlags spawnFlags)
    Parameters
    Type Name Description
    Player player
    PlayerRoles.RoleTypeId newRole
    PlayerRoles.RoleChangeReason reason
    PlayerRoles.RoleSpawnFlags spawnFlags

    Properties

    | Improve this Doc View Source

    Ammo

    Gets the base ammo values for the new role.

    Declaration
    public Dictionary<ItemType, ushort> Ammo { get; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<ItemType, System.UInt16>
    | Improve this Doc View Source

    IsAllowed

    Gets or sets a value indicating whether the event can continue.

    Declaration
    public bool IsAllowed { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Items

    Gets base items that the player will receive.

    Declaration
    public List<ItemType> Items { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<ItemType>
    | Improve this Doc View Source

    NewRole

    Gets or sets the new player's role.

    Declaration
    public RoleTypeId NewRole { get; set; }
    Property Value
    Type Description
    PlayerRoles.RoleTypeId
    | Improve this Doc View Source

    Player

    Gets the player whose PlayerRoles.RoleTypeId is changing.

    Declaration
    public Player Player { get; }
    Property Value
    Type Description
    Player
    | Improve this Doc View Source

    Reason

    Gets or sets the reason for their class change.

    Declaration
    public SpawnReason Reason { get; set; }
    Property Value
    Type Description
    SpawnReason
    | Improve this Doc View Source

    ShouldPreserveInventory

    Gets or sets a value indicating whether the inventory will be preserved or not.

    Declaration
    public bool ShouldPreserveInventory { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    SpawnFlags

    Gets or sets the spawn flags for their class change.

    Declaration
    public RoleSpawnFlags SpawnFlags { get; set; }
    Property Value
    Type Description
    PlayerRoles.RoleSpawnFlags

    Methods

    | Improve this Doc View Source

    Finalize()

    Finalizes an instance of the ChangingRoleEventArgs class.

    Declaration
    protected void Finalize()

    Implements

    IPlayerEvent
    IDeniableEvent
    IExiledEvent

    Extension Methods

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