Show / Hide Table of Contents

    Class ContainerManager

    Class that represents a manager for all item container operations by creatures.

    Inheritance
    System.Object
    ContainerManager
    Implements
    IContainerManager
    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.Mechanics
    Assembly: Fibula.Mechanics.dll
    Syntax
    public class ContainerManager : IContainerManager

    Constructors

    | Improve this Doc View Source

    ContainerManager(ILogger, ICreatureFinder, IScheduler)

    Initializes a new instance of the ContainerManager class.

    Declaration
    public ContainerManager(ILogger logger, ICreatureFinder creatureFinder, IScheduler scheduler)
    Parameters
    Type Name Description
    Serilog.ILogger logger

    A reference to the logger in use.

    ICreatureFinder creatureFinder

    A reference to the creature finder in use.

    IScheduler scheduler

    A reference to the scheduler in use.

    Methods

    | Improve this Doc View Source

    CloseContainer(UInt32, IContainerItem, Byte)

    Performs a container close action for a player.

    Declaration
    public void CloseContainer(uint forCreatureId, IContainerItem container, byte atPosition)
    Parameters
    Type Name Description
    System.UInt32 forCreatureId

    The id of the creature for which the container is being closed.

    IContainerItem container

    The container being closed.

    System.Byte atPosition

    The position of the container being closed, as seen by the player.

    | Improve this Doc View Source

    FindAllForCreature(UInt32)

    Finds all the containers known by the specified creature.

    Declaration
    public IEnumerable<IContainerItem> FindAllForCreature(uint creatureId)
    Parameters
    Type Name Description
    System.UInt32 creatureId

    The id of the creature.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<IContainerItem>

    A collection of containers that the creature knows.

    | Improve this Doc View Source

    FindForCreature(UInt32, IContainerItem)

    Finds the position of a specified container as seen by a specific creature.

    Declaration
    public byte FindForCreature(uint creatureId, IContainerItem container)
    Parameters
    Type Name Description
    System.UInt32 creatureId

    The id of the creature for which to find the container.

    IContainerItem container

    The container to look for.

    Returns
    Type Description
    System.Byte

    The position of container found, or UnsetContainerPosition> if not found.

    | Improve this Doc View Source

    FindForCreature(UInt32, Byte)

    Finds a container for a specific creature at the specified position.

    Declaration
    public IContainerItem FindForCreature(uint creatureId, byte atPosition)
    Parameters
    Type Name Description
    System.UInt32 creatureId

    The id of the creature for which to find the container.

    System.Byte atPosition

    The position at which to look for the container.

    Returns
    Type Description
    IContainerItem

    The container found, or null if not found.

    | Improve this Doc View Source

    OpenContainer(UInt32, IContainerItem, Byte)

    Performs a container open action for a player.

    Declaration
    public void OpenContainer(uint forCreatureId, IContainerItem container, byte atPosition)
    Parameters
    Type Name Description
    System.UInt32 forCreatureId

    The id of the creature for which the container is being opened.

    IContainerItem container

    The container to open.

    System.Byte atPosition

    The position in which to open the container, for the player.

    Implements

    IContainerManager

    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.