Class CreateItemOperation
Class that represents an event for an item creation.
Inheritance
System.Object
Priority_Queue.FastPriorityQueueNode
Priority_Queue.StablePriorityQueueNode
CreateItemOperation
Inherited Members
Priority_Queue.StablePriorityQueueNode.InsertionIndex
Priority_Queue.FastPriorityQueueNode.Priority
Priority_Queue.FastPriorityQueueNode.QueueIndex
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fibula.Mechanics.Operations
Assembly: Fibula.Mechanics.dll
Syntax
public class CreateItemOperation : BaseEnvironmentOperation, IEquatable<BaseEvent>, IElevatedOperation, IOperation, IEvent
Constructors
| Improve this Doc View SourceCreateItemOperation(UInt32, UInt16, Location, IReadOnlyCollection<(ItemAttribute, IConvertible)>)
Initializes a new instance of the CreateItemOperation class.
Declaration
public CreateItemOperation(uint requestorId, ushort itemTypeId, Location atLocation, IReadOnlyCollection<(ItemAttribute, IConvertible)> attributes)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | requestorId | The id of the creature requesting the use. |
System.UInt16 | itemTypeId | The type id of the item being created. |
Location | atLocation | The location from which the item is being created. |
System.Collections.Generic.IReadOnlyCollection<System.ValueTuple<ItemAttribute, System.IConvertible>> | attributes | The attributes to set in the item. |
Properties
| Improve this Doc View SourceAtLocation
Gets the location at which to create the item.
Declaration
public Location AtLocation { get; }
Property Value
Type | Description |
---|---|
Location |
TypeId
Gets the type id of the item to create.
Declaration
public ushort TypeId { get; }
Property Value
Type | Description |
---|---|
System.UInt16 |
WithAttributes
Gets or sets the attributes to set in the item to create.
Declaration
public IReadOnlyCollection<(ItemAttribute, IConvertible)> WithAttributes { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyCollection<System.ValueTuple<ItemAttribute, System.IConvertible>> |
Methods
| Improve this Doc View SourceExecute(IElevatedOperationContext)
Executes the operation's logic.
Declaration
protected override void Execute(IElevatedOperationContext context)
Parameters
Type | Name | Description |
---|---|---|
IElevatedOperationContext | context | A reference to the operation context. |
Overrides
Implements
System.IEquatable<T>