TrinityCore
Loading...
Searching...
No Matches
ItemTemplate Struct Reference

#include <ItemTemplate.h>

Public Member Functions

uint32 GetId () const
 
uint32 GetClass () const
 
uint32 GetSubClass () const
 
ItemSheatheType GetSheatheType () const
 
uint32 GetQuality () const
 
uint32 GetOtherFactionItemId () const
 
float GetPriceRandomValue () const
 
float GetPriceVariance () const
 
uint32 GetBuyCount () const
 
uint32 GetBuyPrice () const
 
uint32 GetSellPrice () const
 
InventoryType GetInventoryType () const
 
int32 GetAllowableClass () const
 
Trinity::RaceMask< int32, 2 > GetAllowableRace () const
 
uint32 GetBaseItemLevel () const
 
int32 GetBaseRequiredLevel () const
 
uint32 GetRequiredSkill () const
 
uint32 GetRequiredSkillRank () const
 
uint32 GetRequiredSpell () const
 
uint32 GetRequiredReputationFaction () const
 
uint32 GetRequiredReputationRank () const
 
uint32 GetMaxCount () const
 
uint32 GetContainerSlots () const
 
int32 GetStatModifierBonusStat (uint32 index) const
 
int32 GetStatPercentEditor (uint32 index) const
 
float GetStatPercentageOfSocket (uint32 index) const
 
uint32 GetScalingStatContentTuning () const
 
uint32 GetPlayerLevelToItemLevelCurveId () const
 
uint32 GetItemLevelOffsetCurveId () const
 
uint32 GetItemLevelOffsetItemLevel () const
 
uint32 GetItemSquishEraId () const
 
uint32 GetDamageType () const
 
uint32 GetDelay () const
 
float GetRangedModRange () const
 
ItemBondingType GetBonding () const
 
char const * GetName (LocaleConstant locale) const
 
uint32 GetPageText () const
 
uint32 GetStartQuest () const
 
uint32 GetLockID () const
 
uint32 GetItemSet () const
 
uint32 GetArea (uint32 index) const
 
uint32 GetMap () const
 
uint32 GetBagFamily () const
 
uint32 GetTotemCategory () const
 
SocketColor GetSocketColor (uint32 index) const
 
uint32 GetSocketBonus () const
 
uint32 GetGemProperties () const
 
float GetQualityModifier () const
 
uint32 GetDuration () const
 
uint32 GetItemLimitCategory () const
 
HolidayIds GetHolidayID () const
 
float GetDmgVariance () const
 
uint8 GetArtifactID () const
 
uint8 GetRequiredExpansion () const
 
bool CanChangeEquipStateInCombat () const
 
bool IsCurrencyToken () const
 
uint32 GetMaxStackSize () const
 
uint32 GetSkill () const
 
bool IsVellum () const
 
bool IsConjuredConsumable () const
 
bool IsCraftingReagent () const
 
bool HasSignature () const
 
bool IsWeapon () const
 
bool IsArmor () const
 
bool IsRangedWeapon () const
 
bool HasFlag (ItemFlags flag) const
 
bool HasFlag (ItemFlags2 flag) const
 
bool HasFlag (ItemFlags3 flag) const
 
bool HasFlag (ItemFlags4 flag) const
 
bool HasFlag (ItemFlagsCustom customFlag) const
 
char const * GetDefaultLocaleName () const
 
uint32 GetArmor (uint32 itemLevel) const
 
float GetDPS (uint32 itemLevel) const
 
void GetDamage (uint32 itemLevel, float &minDamage, float &maxDamage) const
 
bool IsUsableByLootSpecialization (Player const *player, bool alwaysAllowBoundToAccount) const
 
TransmogOutfitSlotOption GetWeaponTransmogOutfitSlotOption () const
 

Static Public Member Functions

static std::size_t CalculateItemSpecBit (ChrSpecializationEntry const *spec)
 

Public Attributes

ItemEntry const * BasicData
 
ItemSparseEntry const * ExtendedData
 
uint32 MaxDurability
 
std::vector< ItemEffectEntry const * > Effects
 
uint32 ScriptId
 
uint32 FoodType
 
uint32 MinMoneyLoot
 
uint32 MaxMoneyLoot
 
uint32 FlagsCu
 
float SpellPPMRate
 
uint32 RandomBonusListTemplateId
 
std::bitset< MAX_CLASSES *MAX_SPECIALIZATIONS > Specializations [3]
 
uint32 ItemSpecClassMask
 
int32 QuestLogItemId
 

Detailed Description

Definition at line 845 of file ItemTemplate.h.

Member Function Documentation

◆ CalculateItemSpecBit()

std::size_t ItemTemplate::CalculateItemSpecBit ( ChrSpecializationEntry const *  spec)
static

◆ CanChangeEquipStateInCombat()

bool ItemTemplate::CanChangeEquipStateInCombat ( ) const

◆ GetAllowableClass()

int32 ItemTemplate::GetAllowableClass ( ) const
inline

◆ GetAllowableRace()

Trinity::RaceMask< int32, 2 > ItemTemplate::GetAllowableRace ( ) const
inline

Definition at line 863 of file ItemTemplate.h.

References ItemSparseEntry::AllowableRace.

Referenced by Player::CanRollNeedForItem(), and Player::CanUseItem().

◆ GetArea()

uint32 ItemTemplate::GetArea ( uint32  index) const
inline

◆ GetArmor()

◆ GetArtifactID()

◆ GetBagFamily()

uint32 ItemTemplate::GetBagFamily ( ) const
inline

◆ GetBaseItemLevel()

◆ GetBaseRequiredLevel()

int32 ItemTemplate::GetBaseRequiredLevel ( ) const
inline

◆ GetBonding()

◆ GetBuyCount()

◆ GetBuyPrice()

◆ GetClass()

◆ GetContainerSlots()

uint32 ItemTemplate::GetContainerSlots ( ) const
inline

◆ GetDamage()

void ItemTemplate::GetDamage ( uint32  itemLevel,
float &  minDamage,
float &  maxDamage 
) const

Definition at line 260 of file ItemTemplate.cpp.

References GetDelay(), GetDmgVariance(), and GetDPS().

Referenced by Player::_ApplyWeaponDamage().

◆ GetDamageType()

uint32 ItemTemplate::GetDamageType ( ) const
inline

Definition at line 881 of file ItemTemplate.h.

References ItemSparseEntry::DamageDamageType.

◆ GetDefaultLocaleName()

◆ GetDelay()

◆ GetDmgVariance()

float ItemTemplate::GetDmgVariance ( ) const
inline

Definition at line 901 of file ItemTemplate.h.

References ItemSparseEntry::DmgVariance.

Referenced by GetDamage().

◆ GetDPS()

◆ GetDuration()

uint32 ItemTemplate::GetDuration ( ) const
inline

Definition at line 898 of file ItemTemplate.h.

References ItemSparseEntry::DurationInInventory.

Referenced by Item::Create(), and Item::LoadFromDB().

◆ GetGemProperties()

uint32 ItemTemplate::GetGemProperties ( ) const
inline

◆ GetHolidayID()

HolidayIds ItemTemplate::GetHolidayID ( ) const
inline

Definition at line 900 of file ItemTemplate.h.

References ItemSparseEntry::RequiredHoliday.

Referenced by Player::CanUseItem().

◆ GetId()

◆ GetInventoryType()

◆ GetItemLevelOffsetCurveId()

uint32 ItemTemplate::GetItemLevelOffsetCurveId ( ) const
inline

Definition at line 878 of file ItemTemplate.h.

References ItemSparseEntry::ItemLevelOffsetCurveID.

Referenced by BonusData::Initialize().

◆ GetItemLevelOffsetItemLevel()

uint32 ItemTemplate::GetItemLevelOffsetItemLevel ( ) const
inline

Definition at line 879 of file ItemTemplate.h.

References ItemSparseEntry::ItemLevelOffsetItemLevel.

Referenced by BonusData::Initialize().

◆ GetItemLimitCategory()

uint32 ItemTemplate::GetItemLimitCategory ( ) const
inline

◆ GetItemSet()

◆ GetItemSquishEraId()

uint32 ItemTemplate::GetItemSquishEraId ( ) const
inline

Definition at line 880 of file ItemTemplate.h.

References ItemSparseEntry::ItemSquishEraID.

Referenced by BonusData::Initialize().

◆ GetLockID()

uint32 ItemTemplate::GetLockID ( ) const
inline

◆ GetMap()

uint32 ItemTemplate::GetMap ( ) const
inline

◆ GetMaxCount()

◆ GetMaxStackSize()

◆ GetName()

◆ GetOtherFactionItemId()

uint32 ItemTemplate::GetOtherFactionItemId ( ) const
inline

Definition at line 855 of file ItemTemplate.h.

References ItemSparseEntry::FactionRelated.

◆ GetPageText()

uint32 ItemTemplate::GetPageText ( ) const
inline

Definition at line 886 of file ItemTemplate.h.

References ItemSparseEntry::PageID.

Referenced by WorldSession::HandleReadItem().

◆ GetPlayerLevelToItemLevelCurveId()

uint32 ItemTemplate::GetPlayerLevelToItemLevelCurveId ( ) const
inline

Definition at line 877 of file ItemTemplate.h.

References ItemSparseEntry::PlayerLevelToItemLevelCurveID.

Referenced by BonusData::Initialize().

◆ GetPriceRandomValue()

float ItemTemplate::GetPriceRandomValue ( ) const
inline

Definition at line 856 of file ItemTemplate.h.

References ItemSparseEntry::PriceRandomValue.

Referenced by Item::GetBuyPrice().

◆ GetPriceVariance()

float ItemTemplate::GetPriceVariance ( ) const
inline

Definition at line 857 of file ItemTemplate.h.

References ItemSparseEntry::PriceVariance.

Referenced by Item::GetBuyPrice().

◆ GetQuality()

◆ GetQualityModifier()

float ItemTemplate::GetQualityModifier ( ) const
inline

Definition at line 897 of file ItemTemplate.h.

References ItemSparseEntry::QualityModifier.

◆ GetRangedModRange()

float ItemTemplate::GetRangedModRange ( ) const
inline

Definition at line 883 of file ItemTemplate.h.

References ItemSparseEntry::ItemRange.

◆ GetRequiredExpansion()

uint8 ItemTemplate::GetRequiredExpansion ( ) const
inline

◆ GetRequiredReputationFaction()

uint32 ItemTemplate::GetRequiredReputationFaction ( ) const
inline

Definition at line 869 of file ItemTemplate.h.

References ItemSparseEntry::MinFactionID.

Referenced by Player::BuyItemFromVendorSlot(), and Player::CanUseItem().

◆ GetRequiredReputationRank()

uint32 ItemTemplate::GetRequiredReputationRank ( ) const
inline

Definition at line 870 of file ItemTemplate.h.

References ItemSparseEntry::MinReputation.

Referenced by Player::BuyItemFromVendorSlot(), and Player::CanUseItem().

◆ GetRequiredSkill()

uint32 ItemTemplate::GetRequiredSkill ( ) const
inline

◆ GetRequiredSkillRank()

◆ GetRequiredSpell()

uint32 ItemTemplate::GetRequiredSpell ( ) const
inline

Definition at line 868 of file ItemTemplate.h.

References ItemSparseEntry::RequiredAbility.

Referenced by Player::CanRollNeedForItem(), and Player::CanUseItem().

◆ GetScalingStatContentTuning()

uint32 ItemTemplate::GetScalingStatContentTuning ( ) const
inline

Definition at line 876 of file ItemTemplate.h.

References ItemSparseEntry::ContentTuningID.

Referenced by BonusData::Initialize().

◆ GetSellPrice()

◆ GetSheatheType()

ItemSheatheType ItemTemplate::GetSheatheType ( ) const
inline

Definition at line 853 of file ItemTemplate.h.

References ItemEntry::SheatheType.

Referenced by TransmogMgr::ValidateSlots().

◆ GetSkill()

◆ GetSocketBonus()

uint32 ItemTemplate::GetSocketBonus ( ) const
inline

Definition at line 895 of file ItemTemplate.h.

References ItemSparseEntry::SocketMatchEnchantmentId.

Referenced by WorldSession::HandleSocketGems().

◆ GetSocketColor()

SocketColor ItemTemplate::GetSocketColor ( uint32  index) const
inline

◆ GetStartQuest()

uint32 ItemTemplate::GetStartQuest ( ) const
inline

◆ GetStatModifierBonusStat()

int32 ItemTemplate::GetStatModifierBonusStat ( uint32  index) const
inline

◆ GetStatPercentageOfSocket()

float ItemTemplate::GetStatPercentageOfSocket ( uint32  index) const
inline

◆ GetStatPercentEditor()

int32 ItemTemplate::GetStatPercentEditor ( uint32  index) const
inline

Definition at line 874 of file ItemTemplate.h.

References ASSERT, MAX_ITEM_PROTO_STATS, and ItemSparseEntry::StatPercentEditor.

Referenced by BonusData::Initialize().

◆ GetSubClass()

◆ GetTotemCategory()

uint32 ItemTemplate::GetTotemCategory ( ) const
inline

Definition at line 893 of file ItemTemplate.h.

References ItemSparseEntry::TotemCategoryID.

Referenced by Player::HasItemTotemCategory().

◆ GetWeaponTransmogOutfitSlotOption()

◆ HasFlag() [1/5]

bool ItemTemplate::HasFlag ( ItemFlags  flag) const
inline

Definition at line 958 of file ItemTemplate.h.

References ItemSparseEntry::Flags.

Referenced by Player::_StoreOrEquipNewItem(), Player::ApplyEquipCooldown(), Player::ApplyItemEquipSpell(), Player::ApplyItemLootedSpell(), Player::ApplyItemLootedSpell(), Player::ApplyItemObtainSpells(), Player::AutoUnequipOffhandIfNeed(), Player::BuyItemFromVendorSlot(), CollectionMgr::CanAddAppearance(), ItemBonusMgr::CanApplyBonusTreeToItem(), Player::CanEquipItem(), Player::CanEquipUniqueItem(), Player::CanSelectQuestPackageItem(), Player::CanUseItem(), Player::CastItemCombatSpell(), Player::CastItemUseSpell(), Spell::CheckItems(), Player::DestroyItem(), WorldSession::DoLootRelease(), Spell::EffectMilling(), Spell::EffectProspecting(), Item::GetBaseDisenchantLoot(), Item::GetBuyPrice(), GetDPS(), Item::GetItemLevel(), Item::GetSellPrice(), WorldSession::HandleAuctionSellCommodity(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleDestroyItemOpcode(), WorldSession::HandleOpenItemOpcode(), WorldSession::HandleSendMail(), WorldSession::HandleSocketGems(), WorldSession::HandleWrapItem(), HasSignature(), AuctionBotSeller::Initialize(), BonusData::Initialize(), Item::IsFitToSpellRequirements(), LinkValidator< LinkTags::item >::IsTextValid(), IsUsableByLootSpecialization(), Item::IsValidTransmogrificationTarget(), LootItem::ItemAllowedForPlayer(), LootItem::LootItem(), Player::ProcessItemCast(), WorldSession::SendListInventory(), Player::SendNewItem(), Player::SendQuestUpdateAddItem(), Player::StoreNewItem(), Spell::TakeReagents(), LootRoll::TryToStart(), and Player::UpdateItemDuration().

◆ HasFlag() [2/5]

bool ItemTemplate::HasFlag ( ItemFlags2  flag) const
inline

Definition at line 959 of file ItemTemplate.h.

References ItemSparseEntry::Flags.

◆ HasFlag() [3/5]

bool ItemTemplate::HasFlag ( ItemFlags3  flag) const
inline

Definition at line 960 of file ItemTemplate.h.

References ItemSparseEntry::Flags.

◆ HasFlag() [4/5]

bool ItemTemplate::HasFlag ( ItemFlags4  flag) const
inline

Definition at line 961 of file ItemTemplate.h.

References ItemSparseEntry::Flags.

◆ HasFlag() [5/5]

bool ItemTemplate::HasFlag ( ItemFlagsCustom  customFlag) const
inline

Definition at line 962 of file ItemTemplate.h.

◆ HasSignature()

bool ItemTemplate::HasSignature ( ) const

◆ IsArmor()

bool ItemTemplate::IsArmor ( ) const
inline

Definition at line 938 of file ItemTemplate.h.

References ITEM_CLASS_ARMOR.

Referenced by LootItem::ItemAllowedForPlayer().

◆ IsConjuredConsumable()

bool ItemTemplate::IsConjuredConsumable ( ) const
inline

Definition at line 933 of file ItemTemplate.h.

References ITEM_CLASS_CONSUMABLE, and ITEM_FLAG_CONJURED.

◆ IsCraftingReagent()

bool ItemTemplate::IsCraftingReagent ( ) const
inline

◆ IsCurrencyToken()

bool ItemTemplate::IsCurrencyToken ( ) const
inline

Definition at line 923 of file ItemTemplate.h.

References BAG_FAMILY_MASK_CURRENCY_TOKENS.

Referenced by LootItemStorage::AddNewStoredLoot().

◆ IsRangedWeapon()

bool ItemTemplate::IsRangedWeapon ( ) const
inline

◆ IsUsableByLootSpecialization()

◆ IsVellum()

bool ItemTemplate::IsVellum ( ) const
inline

Definition at line 932 of file ItemTemplate.h.

References ITEM_FLAG3_CAN_STORE_ENCHANTS.

◆ IsWeapon()

bool ItemTemplate::IsWeapon ( ) const
inline

Member Data Documentation

◆ BasicData

ItemEntry const* ItemTemplate::BasicData

Definition at line 847 of file ItemTemplate.h.

Referenced by ObjectMgr::LoadItemTemplates().

◆ Effects

◆ ExtendedData

ItemSparseEntry const* ItemTemplate::ExtendedData

Definition at line 848 of file ItemTemplate.h.

Referenced by GetDefaultLocaleName(), GetName(), and ObjectMgr::LoadItemTemplates().

◆ FlagsCu

uint32 ItemTemplate::FlagsCu

◆ FoodType

uint32 ItemTemplate::FoodType

◆ ItemSpecClassMask

uint32 ItemTemplate::ItemSpecClassMask

◆ MaxDurability

◆ MaxMoneyLoot

uint32 ItemTemplate::MaxMoneyLoot

◆ MinMoneyLoot

uint32 ItemTemplate::MinMoneyLoot

◆ QuestLogItemId

◆ RandomBonusListTemplateId

uint32 ItemTemplate::RandomBonusListTemplateId

◆ ScriptId

uint32 ItemTemplate::ScriptId

◆ Specializations

std::bitset<MAX_CLASSES * MAX_SPECIALIZATIONS> ItemTemplate::Specializations[3]

Definition at line 916 of file ItemTemplate.h.

Referenced by IsUsableByLootSpecialization(), and ObjectMgr::LoadItemTemplates().

◆ SpellPPMRate

float ItemTemplate::SpellPPMRate

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