C# Class DivineRightGame.ItemFactory.ItemFactoryManagers.InventoryItemManager

For creating inventory items
Inheritance: IItemFactoryManager
Mostrar archivo Open project: Haedrian/Divine-Right Class Usage Examples

Public Methods

Method Description
CreateItem ( List parameters ) : MapItem
CreateItem ( int internalID ) : MapItem
CreateItem ( int itemID, string name, string description, string graphic, int value, bool equippable, int armourRating, int damageRating, string damageType, string category, string equippableLocation, int woundPotential, int stunAmount, bool stackable, int effect, int effectPower, bool isRanged ) : MapItem
FillTreasureChest ( InventoryCategory categories, int spendValue ) : List

Fills a treasure chest as follows: 1. Pick a random category. Produce an item of that category costing between 1/5 and 3/3 of the remaining value 2. Repeat 1 for 6 more times 3. Done

GetBestCanAfford ( string tag, int maximum ) : InventoryItem

Returns the most expensive item of that particular tag which still costs less or equal to the maximum

GetItemWithinPriceRange ( string category, int minimum, int maximum ) : InventoryItem

Creates an item with an optional category costing between a minimum and maximum price

GetItemsWithAMaxValue ( string category, int maximum ) : List

Creates a number of items having a total maximum value (or as close as possible to) the assigned value.

Method Details

CreateItem() public method

public CreateItem ( List parameters ) : MapItem
parameters List
return DRObjects.MapItem

CreateItem() public method

public CreateItem ( int internalID ) : MapItem
internalID int
return DRObjects.MapItem

CreateItem() public method

public CreateItem ( int itemID, string name, string description, string graphic, int value, bool equippable, int armourRating, int damageRating, string damageType, string category, string equippableLocation, int woundPotential, int stunAmount, bool stackable, int effect, int effectPower, bool isRanged ) : MapItem
itemID int
name string
description string
graphic string
value int
equippable bool
armourRating int
damageRating int
damageType string
category string
equippableLocation string
woundPotential int
stunAmount int
stackable bool
effect int
effectPower int
isRanged bool
return DRObjects.MapItem

FillTreasureChest() public method

Fills a treasure chest as follows: 1. Pick a random category. Produce an item of that category costing between 1/5 and 3/3 of the remaining value 2. Repeat 1 for 6 more times 3. Done
public FillTreasureChest ( InventoryCategory categories, int spendValue ) : List
categories InventoryCategory
spendValue int
return List

GetBestCanAfford() public method

Returns the most expensive item of that particular tag which still costs less or equal to the maximum
public GetBestCanAfford ( string tag, int maximum ) : InventoryItem
tag string
maximum int
return DRObjects.Items.Archetypes.Local.InventoryItem

GetItemWithinPriceRange() public method

Creates an item with an optional category costing between a minimum and maximum price
public GetItemWithinPriceRange ( string category, int minimum, int maximum ) : InventoryItem
category string
minimum int
maximum int
return DRObjects.Items.Archetypes.Local.InventoryItem

GetItemsWithAMaxValue() public method

Creates a number of items having a total maximum value (or as close as possible to) the assigned value.
public GetItemsWithAMaxValue ( string category, int maximum ) : List
category string
maximum int
return List