Show / Hide Table of Contents

    Class MonsterInventory

    Class that represents an inventory for monsters.

    Inheritance
    System.Object
    MonsterInventory
    Implements
    IInventory
    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.Creatures
    Assembly: Fibula.Creatures.dll
    Syntax
    public class MonsterInventory : IInventory

    Constructors

    | Improve this Doc View Source

    MonsterInventory(IItemFactory, ICreature, IEnumerable<(UInt16 typeId, Byte maxAmount, UInt16 chance)>, UInt16)

    Initializes a new instance of the MonsterInventory class.

    Declaration
    public MonsterInventory(IItemFactory itemFactory, ICreature owner, IEnumerable<(ushort typeId, byte maxAmount, ushort chance)> inventoryComposition, ushort maxCapacity = 20)
    Parameters
    Type Name Description
    IItemFactory itemFactory

    A reference to the item factory in use.

    ICreature owner

    The owner of this inventory.

    System.Collections.Generic.IEnumerable<System.ValueTuple<System.UInt16, System.Byte, System.UInt16>> inventoryComposition

    A collection of monster inventory posibilities, composed of typeId, maximumAmount, and chance.

    System.UInt16 maxCapacity

    The maximum capacity of the monster's inventory.

    Properties

    | Improve this Doc View Source

    EquipmentArmorRating

    Gets the armor rating suggested by equiped weapons in this inventory.

    Declaration
    public ushort EquipmentArmorRating { get; }
    Property Value
    Type Description
    System.UInt16
    | Improve this Doc View Source

    EquipmentAttackPower

    Gets the attack power suggested by equiped weapons in this inventory.

    Declaration
    public ushort EquipmentAttackPower { get; }
    Property Value
    Type Description
    System.UInt16
    | Improve this Doc View Source

    EquipmentAttackRange

    Gets the attack range suggested by equiped weapons in this inventory.

    Declaration
    public byte EquipmentAttackRange { get; }
    Property Value
    Type Description
    System.Byte
    | Improve this Doc View Source

    EquipmentDefensePower

    Gets the defense power suggested by equiped weapons in this inventory.

    Declaration
    public ushort EquipmentDefensePower { get; }
    Property Value
    Type Description
    System.UInt16
    | Improve this Doc View Source

    Item[Byte]

    Gets the IItem at a given position of this inventory.

    Declaration
    public IItem this[byte position] { get; }
    Parameters
    Type Name Description
    System.Byte position

    The position where to get the item from.

    Property Value
    Type Description
    IItem

    The IItem, if any was found.

    | Improve this Doc View Source

    Owner

    Gets a reference to the owner of this inventory.

    Declaration
    public ICreature Owner { get; }
    Property Value
    Type Description
    ICreature

    Implements

    IInventory

    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.