|
cItem & | AddCount (char a_AmountToAdd) |
| Adds the specified count to this object and returns the reference to self (useful for chaining) More...
|
|
int | AddEnchantment (int a_EnchantmentID, unsigned int a_Level, bool a_FromBook) |
| Adds this specific enchantment to this item, returning the cost. More...
|
|
int | AddEnchantmentsFromItem (const cItem &a_Other) |
| Adds the enchantments on a_Other to this item, returning the XP cost of the transfer. More...
|
|
bool | CanHaveEnchantment (int a_EnchantmentID) |
| Returns whether or not this item is allowed to have the given enchantment. More...
|
|
| cItem (short a_ItemType, char a_ItemCount=1, short a_ItemDamage=0, const AString &a_Enchantments="", const AString &a_CustomName="", const AStringVector &a_LoreTable={}) |
| Creates an item of the specified type, by default 1 piece with no damage and no enchantments. More...
|
|
| cItem (void) |
| Creates an empty item. More...
|
|
void | Clear (void) |
| Empties the item and frees up any dynamic storage used by the internals. More...
|
|
cItem | CopyOne (void) const |
| Returns a copy of this item with m_ItemCount set to 1. More...
|
|
bool | DamageItem (short a_Amount=1) |
| Damages a weapon / tool. More...
|
|
void | Empty (void) |
| Empties the item and frees up any dynamic storage used by the internals. More...
|
|
bool | EnchantByXPLevels (unsigned a_NumXPLevels, MTRand &a_Random) |
| Randomly enchants the item using the specified number of XP levels. More...
|
|
void | FromJson (const Json::Value &a_Value) |
| Loads the item data from JSON representation. More...
|
|
unsigned | GetEnchantability () |
| Returns the enchantability of the item. More...
|
|
const cItemHandler & | GetHandler (void) const |
| Returns the cItemHandler responsible for this item type. More...
|
|
void | GetJson (Json::Value &a_OutValue) const |
| Saves the item data into JSON representation. More...
|
|
short | GetMaxDamage (void) const |
| Returns the maximum damage value that this item can have; zero if damage is not applied. More...
|
|
char | GetMaxStackSize (void) const |
| Returns the maximum amount of stacked items of this type. More...
|
|
bool | IsBothNameAndLoreEmpty (void) const |
|
bool | IsCustomNameEmpty (void) const |
|
bool | IsDamageable (void) const |
|
bool | IsEmpty (void) const |
| Returns true if the item represents an empty stack - either the type is invalid, or count is zero. More...
|
|
bool | IsEqual (const cItem &a_Item) const |
|
bool | IsFullStack (void) const |
| Returns true if the item is stacked up to its maximum stacking. More...
|
|
bool | IsLoreEmpty (void) const |
|
bool | IsSameType (const cItem &a_Item) const |
|
Definition at line 36 of file Item.h.
int cItem::AddEnchantment |
( |
int |
a_EnchantmentID, |
|
|
unsigned int |
a_Level, |
|
|
bool |
a_FromBook |
|
) |
| |
Adds this specific enchantment to this item, returning the cost.
FromBook specifies whether the enchantment should be treated as coming from a book. If true, then the cost returned uses the book values, if false it uses the normal item multipliers.
Definition at line 510 of file Item.cpp.