Show / Hide Table of Contents

    Class Notification

    Abstract class that represents a notification to a player's connection. Notifications are basically any message that the server sends to the client of a specific player.

    Inheritance
    System.Object
    Priority_Queue.FastPriorityQueueNode
    Priority_Queue.StablePriorityQueueNode
    BaseEvent
    Notification
    AnimatedTextNotification
    CreatureMovedNotification
    CreatureRemovedNotification
    CreatureSpeechNotification
    CreatureTurnedNotification
    GenericNotification
    MagicEffectNotification
    TextMessageNotification
    TileUpdatedNotification
    WorldLightChangedNotification
    Implements
    System.IEquatable<BaseEvent>
    INotification
    IEvent
    Inherited Members
    BaseEvent.Cancelled
    BaseEvent.Expedited
    BaseEvent.Completed
    BaseEvent.EventId
    BaseEvent.RequestorId
    BaseEvent.RepeatAfter
    BaseEvent.HasCancellationHandler
    BaseEvent.HasExpeditionHandler
    BaseEvent.ExcludeFromTelemetry
    BaseEvent.State
    BaseEvent.Cancel()
    BaseEvent.Expedite()
    BaseEvent.Complete(Boolean)
    BaseEvent.Equals(BaseEvent)
    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.Notifications
    Assembly: Fibula.Mechanics.dll
    Syntax
    public abstract class Notification : BaseEvent, IEquatable<BaseEvent>, INotification, IEvent

    Constructors

    | Improve this Doc View Source

    Notification(Func<IEnumerable<IPlayer>>)

    Initializes a new instance of the Notification class.

    Declaration
    protected Notification(Func<IEnumerable<IPlayer>> findTargetPlayers)
    Parameters
    Type Name Description
    System.Func<System.Collections.Generic.IEnumerable<IPlayer>> findTargetPlayers

    A function to determine the target players of this notification.

    Properties

    | Improve this Doc View Source

    CanBeCancelled

    Gets or sets a value indicating whether the event can be cancelled.

    Declaration
    public override bool CanBeCancelled { get; protected set; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    BaseEvent.CanBeCancelled

    Methods

    | Improve this Doc View Source

    Execute(IEventContext)

    Sends the notification to the players intented.

    Declaration
    public override void Execute(IEventContext context)
    Parameters
    Type Name Description
    IEventContext context

    The context for this notification.

    Overrides
    BaseEvent.Execute(IEventContext)
    | Improve this Doc View Source

    Prepare(INotificationContext, IPlayer)

    Finalizes the notification in preparation to it being sent.

    Declaration
    protected abstract 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.

    | Improve this Doc View Source

    Send(INotificationContext)

    Sends the notification to the players intented.

    Declaration
    public void Send(INotificationContext context)
    Parameters
    Type Name Description
    INotificationContext context

    The context for this notification.

    Events

    | Improve this Doc View Source

    Sent

    Event to call when the notification is sent.

    Declaration
    public event OnSent Sent
    Event Type
    Type Description
    OnSent

    Implements

    System.IEquatable<T>
    INotification
    IEvent

    Extension Methods

    ObjectExtensions.YieldSingleItem<T>(T)
    ObjectExtensions.GetPropertyValue(Object, String)
    Validate.ThrowIfNull(Object, String)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2018-2020 | The Fibula Project
    Generated using DocFX | Jose L. Nuñez de Caceres et al.