Class SwapClothingRequested
Invoked when a player tries to swap their clothes to another item or remove clothes completely.
[EventModel(EventSynchronizationContext.PerPlayer, SynchronizedModelTags = new string[] { "modify_inventory" })]
public class SwapClothingRequested : CancellablePlayerEvent, IPlayerEvent, ICancellable
- Inheritance
-
SwapClothingRequested
- Implements
- Inherited Members
Constructors
SwapClothingRequested(Page, byte, byte, ItemJar?, ItemClothingAsset?)
public SwapClothingRequested(Page page, byte x, byte y, ItemJar? jar, ItemClothingAsset? clothing)
Parameters
Properties
CurrentClothing
The asset of the current clothing equipped to the slot, if any.
public required ItemClothingAsset? CurrentClothing { get; init; }
Property Value
- ItemClothingAsset
CurrentClothingQuality
The quality of the current clothing equipped to the slot, if any.
public required byte CurrentClothingQuality { get; init; }
Property Value
CurrentClothingState
The state of the current clothing equipped to the slot, if any.
public required byte[]? CurrentClothingState { get; init; }
Property Value
- byte[]
EquippingClothing
The asset of the item being equipped, if any.
public ItemClothingAsset? EquippingClothing { get; }
Property Value
- ItemClothingAsset
EquippingItem
The item being equipped, if any.
public Item? EquippingItem { get; }
Property Value
- Item
EquippingJar
The jar of the item being equipped, if any.
public ItemJar? EquippingJar { get; }
Property Value
- ItemJar
EquippingOriginalPage
The page of the original location of the item being equipped, if any.
public Page EquippingOriginalPage { get; }
Property Value
Remarks
This can be changed using TryChangeItem(Page, byte, byte) or DequipItem().
EquippingOriginalX
The X position of the original location of the item being equipped, if any.
public byte EquippingOriginalX { get; }
Property Value
Remarks
This can be changed using TryChangeItem(Page, byte, byte) or DequipItem().
EquippingOriginalY
The Y position of the original location of the item being equipped, if any.
public byte EquippingOriginalY { get; }
Property Value
Remarks
This can be changed using TryChangeItem(Page, byte, byte) or DequipItem().
EquippingPage
The page of the item being equipped, if any.
public Page EquippingPage { get; }
Property Value
Remarks
This can be changed using TryChangeItem(Page, byte, byte) or DequipItem().
EquippingX
The X position of the item being equipped, if any.
public byte EquippingX { get; }
Property Value
Remarks
This can be changed using TryChangeItem(Page, byte, byte) or DequipItem().
EquippingY
The Y position of the item being equipped, if any.
public byte EquippingY { get; }
Property Value
Remarks
This can be changed using TryChangeItem(Page, byte, byte) or DequipItem().
IsRemoving
If clothes are being removed.
public bool IsRemoving { get; }
Property Value
Remarks
This can be changed using TryChangeItem(Page, byte, byte) or DequipItem().
Type
The clothing slot being modified.
public required ClothingType Type { get; init; }
Property Value
Methods
DequipItem()
Set the item to be equipped as none, effectively dequipping the existing clothing.
public void DequipItem()
TryChangeItem(Page, byte, byte)
Set the item that is being equipped.
public bool TryChangeItem(Page page, byte x, byte y)