Class MonsterInventory
Class that represents an inventory for monsters.
Inheritance
Implements
Inherited Members
Namespace: Fibula.Creatures
Assembly: Fibula.Creatures.dll
Syntax
public class MonsterInventory : IInventory
Constructors
| Improve this Doc View SourceMonsterInventory(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 SourceEquipmentArmorRating
Gets the armor rating suggested by equiped weapons in this inventory.
Declaration
public ushort EquipmentArmorRating { get; }
Property Value
Type | Description |
---|---|
System.UInt16 |
EquipmentAttackPower
Gets the attack power suggested by equiped weapons in this inventory.
Declaration
public ushort EquipmentAttackPower { get; }
Property Value
Type | Description |
---|---|
System.UInt16 |
EquipmentAttackRange
Gets the attack range suggested by equiped weapons in this inventory.
Declaration
public byte EquipmentAttackRange { get; }
Property Value
Type | Description |
---|---|
System.Byte |
EquipmentDefensePower
Gets the defense power suggested by equiped weapons in this inventory.
Declaration
public ushort EquipmentDefensePower { get; }
Property Value
Type | Description |
---|---|
System.UInt16 |
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. |
Owner
Gets a reference to the owner of this inventory.
Declaration
public ICreature Owner { get; }
Property Value
Type | Description |
---|---|
ICreature |