Class ChangingRoleEventArgs
Contains all information before a player's PlayerRoles.RoleTypeId changes.
public class ChangingRoleEventArgs : IPlayerEvent, IDeniableEvent, IExiledEvent
- Inheritance
-
ChangingRoleEventArgs
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
ChangingRoleEventArgs(Player, RoleTypeId, RoleChangeReason, RoleSpawnFlags)
Initializes a new instance of the ChangingRoleEventArgs class.
public ChangingRoleEventArgs(Player player, RoleTypeId newRole, RoleChangeReason reason, RoleSpawnFlags spawnFlags)
Parameters
player
PlayernewRole
RoleTypeIdreason
RoleChangeReasonspawnFlags
RoleSpawnFlags
Properties
Ammo
Gets the base ammo values for the new role.
public Dictionary<ItemType, ushort> Ammo { get; }
Property Value
- Dictionary<ItemType, ushort>
IsAllowed
Gets or sets a value indicating whether the event can continue.
public bool IsAllowed { get; set; }
Property Value
Items
Gets base items that the player will receive.
public List<ItemType> Items { get; }
Property Value
- List<ItemType>
NewRole
Gets or sets the new player's role.
public RoleTypeId NewRole { get; set; }
Property Value
- RoleTypeId
Player
Gets the player whose PlayerRoles.RoleTypeId is changing.
public Player Player { get; }
Property Value
Reason
Gets or sets the reason for their class change.
public SpawnReason Reason { get; set; }
Property Value
ShouldPreserveInventory
Gets or sets a value indicating whether the inventory will be preserved.
public bool ShouldPreserveInventory { get; set; }
Property Value
SpawnFlags
Gets or sets the spawn flags for their class change.
public RoleSpawnFlags SpawnFlags { get; set; }
Property Value
- RoleSpawnFlags
Methods
~ChangingRoleEventArgs()
Finalizes an instance of the ChangingRoleEventArgs class.
protected ~ChangingRoleEventArgs()