Class CreatureMovedNotification
Class that represents a notification for when a creature has moved.
Inheritance
Inherited Members
Namespace: Fibula.Mechanics.Notifications
Assembly: Fibula.Mechanics.dll
Syntax
public class CreatureMovedNotification : Notification, IEquatable<BaseEvent>, INotification, IEvent
Constructors
| Improve this Doc View SourceCreatureMovedNotification(Func<IEnumerable<IPlayer>>, UInt32, Location, Byte, Location, Byte, Boolean)
Initializes a new instance of the CreatureMovedNotification class.
Declaration
public CreatureMovedNotification(Func<IEnumerable<IPlayer>> findTargetPlayers, uint creatureId, Location fromLocation, byte fromStackPos, Location toLocation, byte toStackPos, bool wasTeleport)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Collections.Generic.IEnumerable<IPlayer>> | findTargetPlayers | A function to determine the target players of this notification. |
System.UInt32 | creatureId | The id of the creature moving. |
Location | fromLocation | The location from which the creature is moving. |
System.Byte | fromStackPos | The stack position from where the creature moving. |
Location | toLocation | The location to which the creature is moving. |
System.Byte | toStackPos | The stack position to which the creature is moving. |
System.Boolean | wasTeleport | A value indicating whether this movement was a teleportation. |
Properties
| Improve this Doc View SourceCreatureId
Gets the id of the creature moving.
Declaration
public uint CreatureId { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
NewLocation
Gets the location to which the creature is moving.
Declaration
public Location NewLocation { get; }
Property Value
Type | Description |
---|---|
Location |
NewStackPosition
Gets the stack position to which the creature is moving.
Declaration
public byte NewStackPosition { get; }
Property Value
Type | Description |
---|---|
System.Byte |
OldLocation
Gets the location from which the creature is moving.
Declaration
public Location OldLocation { get; }
Property Value
Type | Description |
---|---|
Location |
OldStackPosition
Gets the stack position from where the creature moving.
Declaration
public byte OldStackPosition { get; }
Property Value
Type | Description |
---|---|
System.Byte |
WasTeleport
Gets a value indicating whether this movement was a teleportation.
Declaration
public bool WasTeleport { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourcePrepare(INotificationContext, IPlayer)
Finalizes the notification in preparation to it being sent.
Declaration
protected override IEnumerable<IOutboundPacket> Prepare(INotificationContext context, IPlayer player)
Parameters
Type | Name | Description |
---|---|---|
INotificationContext | context | The context of this notification. |
IPlayer | player | The player which this notification is being prepared for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IOutboundPacket> | A collection of IOutboundPackets, the ones to be sent. |