Class MovementOperation
Class that represents a common base between movements.
Inheritance
Inherited Members
Namespace: Fibula.Mechanics.Operations
Assembly: Fibula.Mechanics.dll
Syntax
public class MovementOperation : Operation, IEquatable<BaseEvent>, IOperation, IEvent
Constructors
| Improve this Doc View SourceMovementOperation(UInt32, UInt16, Location, Byte, UInt32, Location, UInt32, Byte)
Initializes a new instance of the MovementOperation class.
Declaration
public MovementOperation(uint requestorId, ushort thingId, Location fromLocation, byte fromIndex, uint fromCreatureId, Location toLocation, uint toCreatureId, byte amount)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | requestorId | The id of the creature requesting the movement. |
System.UInt16 | thingId | The id of the thing that is moving. |
Location | fromLocation | The location from which the movement is happening. |
System.Byte | fromIndex | The index within the location from which the movement is happening. |
System.UInt32 | fromCreatureId | The id of the creature from which the movement is happening, if any. |
Location | toLocation | The location to which the movement is happening. |
System.UInt32 | toCreatureId | The id of the creature to which the movement is happening, if any. |
System.Byte | amount | The amount of the thing to move. |
Properties
| Improve this Doc View SourceAmount
Gets the amount of thing being moved.
Declaration
public byte Amount { get; }
Property Value
Type | Description |
---|---|
System.Byte |
FromCreatureId
Gets the id of the creature carrying the thing that is being moved, if any.
Declaration
public uint FromCreatureId { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
FromIndex
Gets the index within the location from which the movement is happening.
Declaration
public byte FromIndex { get; }
Property Value
Type | Description |
---|---|
System.Byte |
FromLocation
Gets the location from which the movement happens.
Declaration
public Location FromLocation { get; }
Property Value
Type | Description |
---|---|
Location |
ThingMovingId
Gets the id of the thing moving.
Declaration
public ushort ThingMovingId { get; }
Property Value
Type | Description |
---|---|
System.UInt16 |
ToCreatureId
Gets the id of the creature that will carry the thing that is being moved, if any.
Declaration
public uint ToCreatureId { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
ToLocation
Gets the location to which the movement happens.
Declaration
public Location ToLocation { get; }
Property Value
Type | Description |
---|---|
Location |
Methods
| Improve this Doc View SourceExecute(IOperationContext)
Executes the operation's logic.
Declaration
protected override void Execute(IOperationContext context)
Parameters
Type | Name | Description |
---|---|---|
IOperationContext | context | A reference to the operation context. |