Show / Hide Table of Contents

    Class MapDescriptor

    Class that implements a standard map descriptor.

    Inheritance
    System.Object
    MapDescriptor
    Implements
    IMapDescriptor
    Inherited Members
    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.Map
    Assembly: Fibula.Map.dll
    Syntax
    public class MapDescriptor : IMapDescriptor

    Constructors

    | Improve this Doc View Source

    MapDescriptor(ILogger, IMap, IProtocolTileDescriptor)

    Initializes a new instance of the MapDescriptor class.

    Declaration
    public MapDescriptor(ILogger logger, IMap map, IProtocolTileDescriptor tileDescriptor)
    Parameters
    Type Name Description
    Serilog.ILogger logger

    A reference to the logger to use.

    IMap map

    The reference to the map in use.

    IProtocolTileDescriptor tileDescriptor

    A reference to the tile descriptor in use.

    Properties

    | Improve this Doc View Source

    Logger

    Gets the reference to the current logger.

    Declaration
    public ILogger Logger { get; }
    Property Value
    Type Description
    Serilog.ILogger

    Methods

    | Improve this Doc View Source

    DescribeAt(IPlayer, Location)

    Gets the description bytes of the map in behalf of a given player at a given location.

    Declaration
    public (IDictionary<string, object> descriptionMetadata, ReadOnlySequence<byte> descriptionData) DescribeAt(IPlayer player, Location centerLocation)
    Parameters
    Type Name Description
    IPlayer player

    The player for which the description is being retrieved for.

    Location centerLocation

    The center location from which the description is being retrieved.

    Returns
    Type Description
    System.ValueTuple<System.Collections.Generic.IDictionary<System.String, System.Object>, System.Buffers.ReadOnlySequence<System.Byte>>

    A tuple containing the description metadata: a map of string to objects, and the description data: a sequence of bytes representing the description.

    | Improve this Doc View Source

    DescribeTile(IPlayer, Location)

    Gets the description bytes of a single tile of the map in behalf of a given player at a given location.

    Declaration
    public (IDictionary<string, object> descriptionMetadata, ReadOnlySequence<byte> descriptionData) DescribeTile(IPlayer player, Location location)
    Parameters
    Type Name Description
    IPlayer player

    The player for which the description is being retrieved for.

    Location location

    The location from which the description of the tile is being retrieved.

    Returns
    Type Description
    System.ValueTuple<System.Collections.Generic.IDictionary<System.String, System.Object>, System.Buffers.ReadOnlySequence<System.Byte>>

    A tuple containing the description metadata: a map of string to objects, and the description data: a sequence of bytes representing the tile's description.

    | Improve this Doc View Source

    DescribeWindow(IPlayer, UInt16, UInt16, SByte, SByte, Byte, Byte, SByte)

    Gets the description bytes of the map in behalf of a given player for the specified window.

    Declaration
    public (IDictionary<string, object> descriptionMetadata, ReadOnlySequence<byte> descriptionData) DescribeWindow(IPlayer player, ushort fromX, ushort fromY, sbyte fromZ, sbyte toZ, byte windowSizeX = 18, byte windowSizeY = 14, sbyte customOffsetZ = 0)
    Parameters
    Type Name Description
    IPlayer player

    The player for which the description is being retrieved for.

    System.UInt16 fromX

    The starting X coordinate of the window.

    System.UInt16 fromY

    The starting Y coordinate of the window.

    System.SByte fromZ

    The starting Z coordinate of the window.

    System.SByte toZ

    The ending Z coordinate of the window.

    System.Byte windowSizeX

    The size of the window in X.

    System.Byte windowSizeY

    The size of the window in Y.

    System.SByte customOffsetZ

    Optional. A custom Z offset value used mainly for partial floor changing windows. Defaults to 0.

    Returns
    Type Description
    System.ValueTuple<System.Collections.Generic.IDictionary<System.String, System.Object>, System.Buffers.ReadOnlySequence<System.Byte>>

    A tuple containing the description metadata: a map of string to objects, and the description data: a sequence of bytes representing the description.

    Implements

    IMapDescriptor

    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.