Table of Contents

Class ItemPickupRequested

Namespace
Uncreated.Warfare.Events.Models.Items
Assembly
Uncreated.Warfare.dll

Triggers when a player tries to pick up a dropped item.

[EventModel(EventSynchronizationContext.PerPlayer, SynchronizedModelTags = new string[] { "modify_inventory", "modify_item_regions" })]
public class ItemPickupRequested : CancellablePlayerEvent, IPlayerEvent, ICancellable
Inheritance
ItemPickupRequested
Implements
Inherited Members

Properties

Asset

Asset of the item that's being picked up.

public required ItemAsset Asset { get; init; }

Property Value

ItemAsset

AutoFindFreeSpace

If the item is placed wherever it'll fit.

public bool AutoFindFreeSpace { get; set; }

Property Value

bool

Remarks

This can be changed.

DestinationPage

The page in the inventory the item was placed into.

public required Page DestinationPage { get; set; }

Property Value

Page

Remarks

This can be changed.

DestinationRotation

The rotation of the item in the inventory.

public required byte DestinationRotation { get; set; }

Property Value

byte

Remarks

This can be changed.

Exceptions

ArgumentOutOfRangeException

DestinationX

The x-position in the inventory page the item was placed into.

public required byte DestinationX { get; set; }

Property Value

byte

Remarks

This can be changed.

DestinationY

The y-position in the inventory page the item was placed into.

public required byte DestinationY { get; set; }

Property Value

byte

Remarks

This can be changed.

DroppedItem

The old dropped item.

public required ItemData DroppedItem { get; init; }

Property Value

ItemData

DroppedItemCoord

The region of this item before it's picked up.

public required RegionCoord DroppedItemCoord { get; init; }

Property Value

RegionCoord

DroppedItemIndex

The index of this item in it's region before it's picked up.

public required ushort DroppedItemIndex { get; init; }

Property Value

ushort

DroppedItemRegion

The index of this item before it's picked up.

public required ItemRegion DroppedItemRegion { get; init; }

Property Value

ItemRegion

Item

Info about the item that's being picked up.

public required Item Item { get; init; }

Property Value

Item