OpenEnroth 2a41f3e
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Item Struct Reference

#include <Item.h>

Public Member Functions

void GetItemBonusArtifact (const Character *owner, CharacterAttribute attrToGet, int *bonusSum) const
 
void GetItemBonusSpecialEnchantment (const Character *owner, CharacterAttribute attrToGet, int *additiveBonus, int *halfSkillBonus) const
 
void ResetEnchantAnimation ()
 
bool ItemEnchanted () const
 
bool AuraEffectRed () const
 
bool AuraEffectBlue () const
 
bool AuraEffectGreen () const
 
bool AuraEffectPurple () const
 
bool IsRegularEnchanmentForAttribute (CharacterAttribute attrToGet)
 
bool IsBroken () const
 
void SetBroken ()
 
bool IsIdentified () const
 
void SetIdentified ()
 
bool IsStolen () const
 
void SetStolen ()
 
bool GenerateArtifact ()
 
void generateGold (ItemTreasureLevel treasureLevel)
 
int GetValue () const
 
std::string GetDisplayName () const
 
std::string GetIdentifiedName () const
 
void UpdateTempBonus (Time time)
 
void Reset ()
 
int _439DF3_get_additional_damage (DamageType *a2, bool *vampiyr)
 
CharacterSkillType GetPlayerSkillType () const
 
const std::string & GetIconName () const
 
uint8_t GetDamageDice () const
 
uint8_t GetDamageRoll () const
 
uint8_t GetDamageMod () const
 
bool canSellRepairIdentifyAt (HouseId houseId)
 
bool isGold () const
 
bool isShield () const
 
bool isWand () const
 
bool isPotion () const
 
bool isBook () const
 
bool isReagent () const
 
bool isSpellScroll () const
 
bool isMessageScroll () const
 
bool isMeleeWeapon () const
 
bool isWeapon () const
 
bool isArmor () const
 
bool isPassiveEquipment () const
 
ItemType type () const
 
ItemRarity rarity () const
 
Sizei inventorySize () const
 
void postGenerate (ItemSource source)
 

Static Public Member Functions

static void PopulateSpecialBonusMap ()
 
static void PopulateRegularBonusMap ()
 
static void PopulateArtifactBonusMap ()
 
static void ClearItemBonusMaps ()
 

Public Attributes

ItemId itemId = ITEM_NULL
 
int potionPower = 0
 
int goldAmount = 0
 
std::optional< CharacterAttributestandardEnchantment
 
int standardEnchantmentStrength = 0
 
ItemEnchantment specialEnchantment = ITEM_ENCHANTMENT_NULL
 
int numCharges = 0
 
int maxCharges = 0
 
ItemFlags flags = 0
 
ItemSlot equippedSlot = ITEM_SLOT_INVALID
 
int lichJarCharacterIndex = -1
 
bool placedInChest = false
 
Time enchantmentExpirationTime
 

Member Function Documentation

◆ _439DF3_get_additional_damage()

int Item::_439DF3_get_additional_damage ( DamageType a2,
bool *  vampiyr 
)

◆ AuraEffectBlue()

bool Item::AuraEffectBlue ( ) const
inline

◆ AuraEffectGreen()

bool Item::AuraEffectGreen ( ) const
inline

◆ AuraEffectPurple()

bool Item::AuraEffectPurple ( ) const
inline

◆ AuraEffectRed()

bool Item::AuraEffectRed ( ) const
inline

◆ canSellRepairIdentifyAt()

bool Item::canSellRepairIdentifyAt ( HouseId  houseId)

◆ ClearItemBonusMaps()

static void Item::ClearItemBonusMaps ( )
static

◆ GenerateArtifact()

bool Item::GenerateArtifact ( )

◆ generateGold()

void Item::generateGold ( ItemTreasureLevel  treasureLevel)

◆ GetDamageDice()

uint8_t Item::GetDamageDice ( ) const

◆ GetDamageMod()

uint8_t Item::GetDamageMod ( ) const

◆ GetDamageRoll()

uint8_t Item::GetDamageRoll ( ) const

◆ GetDisplayName()

std::string Item::GetDisplayName ( ) const

◆ GetIconName()

const std::string & Item::GetIconName ( ) const

◆ GetIdentifiedName()

std::string Item::GetIdentifiedName ( ) const

◆ GetItemBonusArtifact()

void Item::GetItemBonusArtifact ( const Character owner,
CharacterAttribute  attrToGet,
int *  bonusSum 
) const

◆ GetItemBonusSpecialEnchantment()

void Item::GetItemBonusSpecialEnchantment ( const Character owner,
CharacterAttribute  attrToGet,
int *  additiveBonus,
int *  halfSkillBonus 
) const

◆ GetPlayerSkillType()

CharacterSkillType Item::GetPlayerSkillType ( ) const

◆ GetValue()

int Item::GetValue ( ) const

◆ inventorySize()

Sizei Item::inventorySize ( ) const
Returns
This item's size in inventory slots.

◆ isArmor()

bool Item::isArmor ( ) const
inline

◆ isBook()

bool Item::isBook ( ) const
inline

◆ IsBroken()

bool Item::IsBroken ( ) const
inline

◆ isGold()

bool Item::isGold ( ) const
inline

◆ IsIdentified()

bool Item::IsIdentified ( ) const
inline

◆ isMeleeWeapon()

bool Item::isMeleeWeapon ( ) const
inline

◆ isMessageScroll()

bool Item::isMessageScroll ( ) const
inline

◆ isPassiveEquipment()

bool Item::isPassiveEquipment ( ) const
inline

◆ isPotion()

bool Item::isPotion ( ) const
inline

◆ isReagent()

bool Item::isReagent ( ) const
inline

◆ IsRegularEnchanmentForAttribute()

bool Item::IsRegularEnchanmentForAttribute ( CharacterAttribute  attrToGet)

◆ isShield()

bool Item::isShield ( ) const
inline

◆ isSpellScroll()

bool Item::isSpellScroll ( ) const
inline

◆ IsStolen()

bool Item::IsStolen ( ) const
inline

◆ isWand()

bool Item::isWand ( ) const
inline

◆ isWeapon()

bool Item::isWeapon ( ) const
inline

◆ ItemEnchanted()

bool Item::ItemEnchanted ( ) const
inline

◆ PopulateArtifactBonusMap()

void Item::PopulateArtifactBonusMap ( )
static

◆ PopulateRegularBonusMap()

void Item::PopulateRegularBonusMap ( )
static

◆ PopulateSpecialBonusMap()

void Item::PopulateSpecialBonusMap ( )
static

◆ postGenerate()

void Item::postGenerate ( ItemSource  source)

Does post-processing for items, filling in special enchantments for items that should have them, and potion power and wand charges if those are not set.

Parameters
sourceWhere the item is coming from. MM7 used different item generation code for items in chests / lying on the floor / carried by monsters.

◆ rarity()

ItemRarity Item::rarity ( ) const

◆ Reset()

void Item::Reset ( )

◆ ResetEnchantAnimation()

void Item::ResetEnchantAnimation ( )
inline

◆ SetBroken()

void Item::SetBroken ( )
inline

◆ SetIdentified()

void Item::SetIdentified ( )
inline

◆ SetStolen()

void Item::SetStolen ( )
inline

◆ type()

ItemType Item::type ( ) const

◆ UpdateTempBonus()

void Item::UpdateTempBonus ( Time  time)

Member Data Documentation

◆ enchantmentExpirationTime

Time Item::enchantmentExpirationTime

◆ equippedSlot

ItemSlot Item::equippedSlot = ITEM_SLOT_INVALID

◆ flags

ItemFlags Item::flags = 0

◆ goldAmount

int Item::goldAmount = 0

◆ itemId

ItemId Item::itemId = ITEM_NULL

◆ lichJarCharacterIndex

int Item::lichJarCharacterIndex = -1

◆ maxCharges

int Item::maxCharges = 0

◆ numCharges

int Item::numCharges = 0

◆ placedInChest

bool Item::placedInChest = false

◆ potionPower

int Item::potionPower = 0

◆ specialEnchantment

ItemEnchantment Item::specialEnchantment = ITEM_ENCHANTMENT_NULL

◆ standardEnchantment

std::optional<CharacterAttribute> Item::standardEnchantment

◆ standardEnchantmentStrength

int Item::standardEnchantmentStrength = 0

The documentation for this struct was generated from the following files: