OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Functions
ItemEnumFunctions.h File Reference
#include <cassert>
#include <string>
#include <initializer_list>
#include "Engine/Objects/CharacterEnums.h"
#include "Engine/Spells/SpellEnums.h"
#include "Utility/Segment.h"
#include "CharacterEnumFunctions.h"
#include "ItemEnums.h"

Functions

std::string displayNameForDamageType (DamageType damageType, Localization *localization)
 
bool isRandomTreasureLevel (ItemTreasureLevel level)
 
bool isRegular (ItemId type)
 
bool isRecipe (ItemId type)
 
bool isWand (ItemId type)
 
bool isPotion (ItemId type)
 
bool isReagent (ItemId type)
 
bool isEnchantingPotion (ItemId type)
 
bool isMessageScroll (ItemId type)
 
bool isArtifact (ItemId type)
 
bool isSpawnableArtifact (ItemId type)
 
bool isGold (ItemId type)
 
bool isRandomItem (ItemId type)
 
bool isSpellbook (ItemId item)
 
bool isQuestItem (ItemId item)
 
bool isAncientWeapon (ItemId item)
 
ItemTreasureLevel randomItemTreasureLevel (ItemId type)
 
Segment< ItemIdspellbooksForSchool (MagicSchool school, CharacterSkillMastery maxMastery=CHARACTER_SKILL_MASTERY_GRANDMASTER)
 
Segment< ItemIdallRecipeScrolls ()
 
Segment< ItemIdallSpawnableItems ()
 
Segment< ItemIdallSpawnableArtifacts ()
 
std::initializer_list< ItemIdallLevel1Reagents ()
 
ItemEnchantment potionEnchantment (ItemId enchantingPotion)
 
SpellId spellForSpellbook (ItemId spellbook)
 
SpellId spellForScroll (ItemId scroll)
 
SpellId spellForWand (ItemId wand)
 
CharacterAttribute statForPureStatPotion (ItemId pureStatPotion)
 
bool isPassiveEquipment (ItemType type)
 
bool isArmor (ItemType type)
 
bool isWeapon (ItemType type)
 
Segment< ItemSlotallRingSlots ()
 
ItemSlot ringSlot (int index)
 
Segment< ItemSlotallItemSlots ()
 
Segment< RandomItemTypeallSpawnableRandomItemTypes ()
 

Function Documentation

◆ allItemSlots()

Segment< ItemSlot > allItemSlots ( )
inline

◆ allLevel1Reagents()

std::initializer_list< ItemId > allLevel1Reagents ( )
inline
Returns
List of lowest level (power=1) alchemical reagents.

◆ allRecipeScrolls()

Segment< ItemId > allRecipeScrolls ( )
inline

◆ allRingSlots()

Segment< ItemSlot > allRingSlots ( )
inline

◆ allSpawnableArtifacts()

Segment< ItemId > allSpawnableArtifacts ( )
inline
Returns
Range of all artifacts and relics that can be randomly generated as loot (e.g. picked up from a dragon corpse). Note that not all artifacts can be generated this way, e.g. Hermes' Sandals can only be picked up from a Mega Dragon's corpse.

◆ allSpawnableItems()

Segment< ItemId > allSpawnableItems ( )
inline
Returns
Range of all items that can be randomly generated as loot. Note that not all of the entries might actually be valid.

◆ allSpawnableRandomItemTypes()

Segment< RandomItemType > allSpawnableRandomItemTypes ( )
inline

◆ displayNameForDamageType()

std::string displayNameForDamageType ( DamageType  damageType,
Localization localization 
)

◆ isAncientWeapon()

bool isAncientWeapon ( ItemId  item)
inline

◆ isArmor()

bool isArmor ( ItemType  type)
inline
Parameters
typeType to check.
Returns
Whether the provided type represents wearable armor, e.g. any passive equipment except amulets and rings.

◆ isArtifact()

bool isArtifact ( ItemId  type)
inline

◆ isEnchantingPotion()

bool isEnchantingPotion ( ItemId  type)
inline

◆ isGold()

bool isGold ( ItemId  type)
inline

◆ isMessageScroll()

bool isMessageScroll ( ItemId  type)
inline

◆ isPassiveEquipment()

bool isPassiveEquipment ( ItemType  type)
inline
Parameters
typeType to check.
Returns
Whether the provided type represents a passive equipment, e.g. shields, armor, rings, amulets, etc.

◆ isPotion()

bool isPotion ( ItemId  type)
inline

◆ isQuestItem()

bool isQuestItem ( ItemId  item)
inline

◆ isRandomItem()

bool isRandomItem ( ItemId  type)
inline

◆ isRandomTreasureLevel()

bool isRandomTreasureLevel ( ItemTreasureLevel  level)
inline

◆ isReagent()

bool isReagent ( ItemId  type)
inline

◆ isRecipe()

bool isRecipe ( ItemId  type)
inline

◆ isRegular()

bool isRegular ( ItemId  type)
inline

Checks if item is a regular item - a weapon or equipment that's not a quest item or an artifact.

Regular items can be enchanted, unlike other types of items.

Parameters
typeItem type to check.
Returns
Whether the provided item is a regular item.

◆ isSpawnableArtifact()

bool isSpawnableArtifact ( ItemId  type)
inline

◆ isSpellbook()

bool isSpellbook ( ItemId  item)
inline

◆ isWand()

bool isWand ( ItemId  type)
inline

◆ isWeapon()

bool isWeapon ( ItemType  type)
inline
Parameters
typeType to check.
Returns
Whether the provided type represents a weapon. Note that wands are not considered weapons.

◆ potionEnchantment()

ItemEnchantment potionEnchantment ( ItemId  enchantingPotion)
inline

◆ randomItemTreasureLevel()

ItemTreasureLevel randomItemTreasureLevel ( ItemId  type)
inline

◆ ringSlot()

ItemSlot ringSlot ( int  index)
inline

◆ spellbooksForSchool()

Segment< ItemId > spellbooksForSchool ( MagicSchool  school,
CharacterSkillMastery  maxMastery = CHARACTER_SKILL_MASTERY_GRANDMASTER 
)
inline

◆ spellForScroll()

SpellId spellForScroll ( ItemId  scroll)

◆ spellForSpellbook()

SpellId spellForSpellbook ( ItemId  spellbook)

◆ spellForWand()

SpellId spellForWand ( ItemId  wand)

◆ statForPureStatPotion()

CharacterAttribute statForPureStatPotion ( ItemId  pureStatPotion)
inline