TrinityCore
Loading...
Searching...
No Matches
Item Class Reference

#include <Item.h>

+ Inheritance diagram for Item:

Classes

struct  ValuesUpdateForPlayerWithMaskSender
 

Public Member Functions

Item * CloneItem (uint32 count, Player const *player=nullptr) const
 
 Item ()
 
 ~Item ()
 
virtual bool Create (ObjectGuid::LowType guidlow, uint32 itemId, ItemContext context, Player const *owner)
 
std::string GetNameForLocaleIdx (LocaleConstant locale) const override
 
ItemTemplate const * GetTemplate () const
 
BonusData const * GetBonus () const
 
ObjectGuid GetOwnerGUID () const
 
void SetOwnerGUID (ObjectGuid guid)
 
ObjectGuid GetContainedIn () const
 
void SetContainedIn (ObjectGuid guid)
 
ObjectGuid GetCreator () const
 
void SetCreator (ObjectGuid guid)
 
ObjectGuid GetGiftCreator () const
 
void SetGiftCreator (ObjectGuid guid)
 
Player * GetOwner () const
 
void SetExpiration (uint32 expiration)
 
ItemBondingType GetBonding () const
 
void SetBinding (bool val)
 
bool HasItemFlag (ItemFieldFlags flag) const
 
void SetItemFlag (ItemFieldFlags flags)
 
void RemoveItemFlag (ItemFieldFlags flags)
 
void ReplaceAllItemFlags (ItemFieldFlags flags)
 
bool HasItemZoneFlag (ItemZoneFlags flag) const
 
void SetItemZoneFlag (ItemZoneFlags flags)
 
void RemoveItemZoneFlag (ItemZoneFlags flags)
 
void ReplaceAllItemZoneFlags (ItemZoneFlags flags)
 
bool IsSoulBound () const
 
bool IsBoundAccountWide () const
 
bool IsBattlenetAccountBound () const
 
bool IsBindedNotWith (Player const *player) const
 
bool IsBoundByEnchant () const
 
virtual void SaveToDB (CharacterDatabaseTransaction trans)
 
virtual bool LoadFromDB (ObjectGuid::LowType guid, ObjectGuid ownerGuid, Field *fields, uint32 entry)
 
void LoadAdditionalDataFromDB (Player const *owner, ItemAdditionalLoadInfo *addionalData)
 
void LoadArtifactData (Player const *owner, uint64 xp, uint32 artifactAppearanceId, uint32 artifactTier, std::vector< ArtifactPowerData > &powers)
 
void CheckArtifactRelicSlotUnlock (Player const *owner)
 
void AddBonuses (uint32 bonusListID)
 
std::vector< int32 > const & GetBonusListIDs () const
 
void SetBonuses (std::vector< int32 > bonusListIDs)
 
void ClearBonuses ()
 
virtual void DeleteFromDB (CharacterDatabaseTransaction trans)
 
void DeleteFromInventoryDB (CharacterDatabaseTransaction trans)
 
void SaveRefundDataToDB ()
 
void DeleteRefundDataFromDB (CharacterDatabaseTransaction *trans)
 
Bag * ToBag ()
 
Bag const * ToBag () const
 
AzeriteItem * ToAzeriteItem ()
 
AzeriteItem const * ToAzeriteItem () const
 
AzeriteEmpoweredItem * ToAzeriteEmpoweredItem ()
 
AzeriteEmpoweredItem const * ToAzeriteEmpoweredItem () const
 
bool IsRefundable () const
 
bool IsBOPTradeable () const
 
bool IsWrapped () const
 
bool IsLocked () const
 
bool IsBag () const
 
bool IsAzeriteItem () const
 
bool IsAzeriteEmpoweredItem () const
 
bool IsCurrencyToken () const
 
bool IsNotEmptyBag () const
 
bool IsBroken () const
 
void SetDurability (uint32 durability)
 
void SetMaxDurability (uint32 maxDurability)
 
bool CanBeTraded (bool mail=false, bool trade=false) const
 
void SetInTrade (bool b=true)
 
bool IsInTrade () const
 
uint64 CalculateDurabilityRepairCost (float discount, bool useRateConfig=true) const
 
bool HasEnchantRequiredSkill (Player const *player) const
 
uint32 GetEnchantRequiredLevel () const
 
bool IsFitToSpellRequirements (SpellInfo const *spellInfo) const
 
bool IsLimitedToAnotherMapOrZone (uint32 cur_mapId, uint32 cur_zoneId) const
 
bool GemsFitSockets () const
 
uint32 GetCount () const
 
void SetCount (uint32 value)
 
uint32 GetMaxStackCount () const
 
uint8 GetGemCountWithID (uint32 GemID) const
 
uint8 GetGemCountWithLimitCategory (uint32 limitCategory) const
 
InventoryResult CanBeMergedPartlyWith (ItemTemplate const *proto) const
 
uint8 GetSlot () const
 
Bag * GetContainer ()
 
uint8 GetBagSlot () const
 
void SetSlot (uint8 slot)
 
uint16 GetPos () const
 
void SetContainer (Bag *container)
 
bool IsInBag () const
 
bool IsEquipped () const
 
uint32 GetSkill ()
 
ItemRandomBonusListId GetItemRandomBonusListId () const
 
void SetItemRandomBonusList (ItemRandomBonusListId bonusListId)
 
void SetEnchantment (EnchantmentSlot slot, uint32 id, uint32 duration, uint32 charges, ObjectGuid caster=ObjectGuid::Empty)
 
void SetEnchantmentDuration (EnchantmentSlot slot, uint32 duration, Player *owner)
 
void SetEnchantmentCharges (EnchantmentSlot slot, uint32 charges)
 
void ClearEnchantment (EnchantmentSlot slot)
 
uint32 GetEnchantmentId (EnchantmentSlot slot) const
 
uint32 GetEnchantmentDuration (EnchantmentSlot slot) const
 
uint32 GetEnchantmentCharges (EnchantmentSlot slot) const
 
UF::SocketedGem const * GetGem (uint16 slot) const
 
void SetGem (uint16 slot, ItemDynamicFieldGems const *gem, uint32 gemScalingLevel)
 
std::string const & GetText () const
 
void SetText (std::string const &text)
 
void SendUpdateSockets ()
 
void SendTimeUpdate (Player *owner)
 
void UpdateDuration (Player *owner, uint32 diff)
 
void SetCreatePlayedTime (uint32 createPlayedTime)
 
void SetCreateTime (int64 createTime)
 
int32 GetSpellCharges (ItemEffectEntry const *effect=nullptr) const
 
void SetSpellCharges (ItemEffectEntry const *effect, int32 value)
 
Loot * GetLootForPlayer (Player const *) const override
 
ItemUpdateState GetState () const
 
void SetState (ItemUpdateState state, Player *forplayer=nullptr)
 
bool IsInUpdateQueue () const
 
uint16 GetQueuePos () const
 
void FSetState (ItemUpdateState state)
 
bool hasQuest (uint32 quest_id) const override
 
bool hasInvolvedQuest (uint32) const override
 
bool IsVellum () const
 
bool IsConjuredConsumable () const
 
uint32 GetQuality () const
 
uint32 GetItemLevel (Player const *owner) const
 
int32 GetRequiredLevel () const
 
int32 GetItemStatType (uint32 index) const
 
float GetItemStatValue (uint32 index, Player const *owner) const
 
uint32 GetSocketColor (uint32 index) const
 
uint32 GetAppearanceModId () const
 
void SetAppearanceModId (uint32 appearanceModId)
 
uint32 GetDisplayId (Player const *owner) const
 
ItemModifiedAppearanceEntry const * GetItemModifiedAppearance () const
 
float GetRepairCostMultiplier () const
 
uint32 GetScalingContentTuningId () const
 
Optional< uint32 > GetDisenchantLootId () const
 
Optional< uint16 > GetDisenchantSkillRequired () const
 
void SetFixedLevel (uint8 level)
 
std::span< ItemEffectEntry const *const > GetEffects () const
 
uint32 GetItemLimitCategory () const
 
void SetNotRefundable (Player *owner, bool changestate=true, CharacterDatabaseTransaction *trans=nullptr, bool addToCollection=true)
 
void SetRefundRecipient (ObjectGuid const &guid)
 
void SetPaidMoney (uint64 money)
 
void SetPaidExtendedCost (uint32 iece)
 
ObjectGuid const & GetRefundRecipient () const
 
uint64 GetPaidMoney () const
 
uint32 GetPaidExtendedCost () const
 
uint32 GetPlayedTime () const
 
bool IsRefundExpired () const
 
void SetSoulboundTradeable (GuidSet const &allowedLooters)
 
void ClearSoulboundTradeable (Player *currentOwner)
 
bool CheckSoulboundTradeExpire ()
 
void BuildUpdate (UpdateDataMapType &) override
 
void BuildValuesUpdateWithFlag (UF::UpdateFieldFlag flags, ByteBuffer &data, Player const *target) const override
 
void BuildValuesUpdateForPlayerWithMask (UpdateData *data, UF::ObjectData::Mask const &requestedObjectMask, UF::ItemData::Mask const &requestedItemMask, Player const *target, bool ignoreNestedChangesMask) const
 
bool AddToObjectUpdate () override
 
void RemoveFromObjectUpdate () override
 
uint32 GetScriptId () const
 
bool IsValidTransmogrificationTarget () const
 
uint32 GetBuyPrice (Player const *owner, bool &standardPrice) const
 
uint32 GetSellPrice (Player const *owner, bool forVendor=false) const
 
uint32 GetVisibleEntry (Player const *owner) const
 
uint16 GetVisibleAppearanceModId (Player const *owner) const
 
uint32 GetVisibleModifiedAppearanceId (Player const *owner) const
 
int32 GetVisibleSecondaryModifiedAppearanceId (Player const *owner) const
 
uint32 GetVisibleEnchantmentId (Player const *owner) const
 
uint16 GetVisibleItemVisual (Player const *owner) const
 
uint32 GetModifier (ItemModifier modifier) const
 
void SetModifier (ItemModifier modifier, uint32 value)
 
ObjectGuid GetChildItem () const
 
void SetChildItem (ObjectGuid childItem)
 
bool IsArtifactDisabled () const
 
UF::ArtifactPower const * GetArtifactPower (uint32 artifactPowerId) const
 
void AddArtifactPower (ArtifactPowerData const *artifactPower)
 
void SetArtifactPower (uint16 artifactPowerId, uint8 purchasedRank, uint8 currentRankWithBonus)
 
void InitArtifactPowers (uint8 artifactId, uint8 artifactTier)
 
uint32 GetTotalUnlockedArtifactPowers () const
 
uint32 GetTotalPurchasedArtifactPowers () const
 
void ApplyArtifactPowerEnchantmentBonuses (EnchantmentSlot slot, uint32 enchantId, bool apply, Player *owner)
 
void CopyArtifactDataFromParent (Item *parent)
 
void SetArtifactXP (uint64 xp)
 
void GiveArtifactXp (uint64 amount, Item *sourceItem, uint32 artifactCategoryId)
 
ItemContext GetContext () const
 
void SetContext (ItemContext context)
 
void SetPetitionId (uint32 petitionId)
 
void SetPetitionNumSignatures (uint32 signatures)
 
std::string GetDebugInfo () const override
 
- Public Member Functions inherited from Object
virtual ~Object ()
 
void AddToWorld () override
 
void RemoveFromWorld () override
 
uint32 GetEntry () const
 
void SetEntry (uint32 entry)
 
float GetObjectScale () const
 
virtual void SetObjectScale (float scale)
 
uint32 GetDynamicFlags () const
 
bool HasDynamicFlag (uint32 flag) const
 
void SetDynamicFlag (uint32 flag)
 
void RemoveDynamicFlag (uint32 flag)
 
void ReplaceAllDynamicFlags (uint32 flag)
 
void BuildValuesUpdateBlockForPlayerWithFlag (UpdateData *data, UF::UpdateFieldFlag flags, Player const *target) const
 
WorldObject * ToWorldObject ()
 
WorldObject const * ToWorldObject () const
 
Item * ToItem ()
 
Item const * ToItem () const
 
Unit * ToUnit ()
 
Unit const * ToUnit () const
 
Creature * ToCreature ()
 
Creature const * ToCreature () const
 
Player * ToPlayer ()
 
Player const * ToPlayer () const
 
GameObject * ToGameObject ()
 
GameObject const * ToGameObject () const
 
Corpse * ToCorpse ()
 
Corpse const * ToCorpse () const
 
DynamicObject * ToDynObject ()
 
DynamicObject const * ToDynObject () const
 
AreaTrigger * ToAreaTrigger ()
 
AreaTrigger const * ToAreaTrigger () const
 
SceneObject * ToSceneObject ()
 
SceneObject const * ToSceneObject () const
 
Conversation * ToConversation ()
 
Conversation const * ToConversation () const
 
std::string GetDebugInfo () const override
 
Trinity::unique_weak_ptr< Object > GetWeakPtr () const
 
virtual SpawnTrackingStateData const * GetSpawnTrackingStateDataForPlayer (Player const *player) const
 
- Public Member Functions inherited from BaseEntity
virtual ~BaseEntity ()
 
bool IsInWorld () const
 
ObjectGuid const & GetGUID () const
 
TypeID GetTypeId () const
 
bool isType (TypeMask mask) const
 
bool IsWorldObject () const
 
bool IsItem () const
 
bool IsUnit () const
 
bool IsCreature () const
 
bool IsPlayer () const
 
bool IsGameObject () const
 
bool IsDynObject () const
 
bool IsCorpse () const
 
bool IsAreaTrigger () const
 
bool IsSceneObject () const
 
bool IsConversation () const
 
bool IsMeshObject () const
 
virtual void BuildCreateUpdateBlockForPlayer (UpdateData *data, Player *target) const
 
void SendUpdateToPlayer (Player *player) const
 
void BuildValuesUpdateBlockForPlayer (UpdateData *data, Player const *target) const
 
void BuildDestroyUpdateBlock (UpdateData *data) const
 
void BuildOutOfRangeUpdateBlock (UpdateData *data) const
 
ByteBuffer & PrepareValuesUpdateBuffer (UpdateData *data) const
 
virtual void DestroyForPlayer (Player const *target) const
 
void SendOutOfRangeForPlayer (Player const *target) const
 
void ClearUpdateMask (bool remove)
 
void SetIsNewObject (bool enable)
 
bool IsDestroyedObject () const
 
void SetDestroyedObject (bool destroyed)
 
void BuildUpdateChangesMask ()
 
void BuildFieldsUpdate (Player *player, UpdateDataMapType &data_map) const
 
template<typename T >
void ForceUpdateFieldChange (UF::UpdateFieldPrivateSetter< T > const &)
 

Static Public Member Functions

static Item * CreateItem (uint32 itemEntry, uint32 count, ItemContext context, Player const *player=nullptr, bool addDefaultBonuses=true)
 
static void DeleteFromDB (CharacterDatabaseTransaction trans, ObjectGuid::LowType itemGuid)
 
static void DeleteFromInventoryDB (CharacterDatabaseTransaction trans, ObjectGuid::LowType itemGuid)
 
static uint32 GetItemLevel (ItemTemplate const *itemTemplate, BonusData const &bonusData, uint32 level, uint32 fixedLevel, int32 minItemLevel, int32 minItemLevelCutoff, int32 maxItemLevel, bool pvpBonus, uint32 azeriteLevel, uint32 overrideContentTuningId)
 
static ItemDisenchantLootEntry const * GetBaseDisenchantLoot (ItemTemplate const *itemTemplate, uint32 quality, uint32 itemLevel)
 
static bool CanTransmogrifyItemWithItem (Item const *item, ItemModifiedAppearanceEntry const *itemModifiedAppearance)
 
static uint32 GetBuyPrice (ItemTemplate const *proto, uint32 quality, uint32 itemLevel, bool &standardPrice)
 
static uint32 GetSellPrice (ItemTemplate const *proto, uint32 quality, uint32 itemLevel)
 
- Static Public Member Functions inherited from Object
static WorldObject * ToWorldObject (Object *o)
 
static WorldObject const * ToWorldObject (Object const *o)
 
static Item * ToItem (Object *o)
 
static Item const * ToItem (Object const *o)
 
static Unit * ToUnit (Object *o)
 
static Unit const * ToUnit (Object const *o)
 
static Creature * ToCreature (Object *o)
 
static Creature const * ToCreature (Object const *o)
 
static Player * ToPlayer (Object *o)
 
static Player const * ToPlayer (Object const *o)
 
static GameObject * ToGameObject (Object *o)
 
static GameObject const * ToGameObject (Object const *o)
 
static Corpse * ToCorpse (Object *o)
 
static Corpse const * ToCorpse (Object const *o)
 
static DynamicObject * ToDynObject (Object *o)
 
static DynamicObject const * ToDynObject (Object const *o)
 
static AreaTrigger * ToAreaTrigger (Object *o)
 
static AreaTrigger const * ToAreaTrigger (Object const *o)
 
static SceneObject * ToSceneObject (Object *o)
 
static SceneObject const * ToSceneObject (Object const *o)
 
static Conversation * ToConversation (Object *o)
 
static Conversation const * ToConversation (Object const *o)
 
- Static Public Member Functions inherited from BaseEntity
static ObjectGuid GetGUID (BaseEntity const *o)
 

Public Attributes

std::unique_ptr< Loot > m_loot
 
bool m_lootGenerated
 
UF::UpdateField< UF::ItemData, uint32(WowCS::EntityFragment::CGObject), TYPEID_ITEM > m_itemData
 
- Public Attributes inherited from Object
UF::UpdateField< UF::ObjectData, int32(WowCS::EntityFragment::CGObject), TYPEID_OBJECT > m_objectData
 
- Public Attributes inherited from BaseEntity
UF::UpdateFieldHolder m_values
 

Protected Member Functions

UF::UpdateFieldFlag GetUpdateFieldFlagsFor (Player const *target) const final
 
void BuildValuesCreate (UF::UpdateFieldFlag flags, ByteBuffer &data, Player const *target) const override
 
void BuildValuesUpdate (UF::UpdateFieldFlag flags, ByteBuffer &data, Player const *target) const override
 
void ClearValuesChangesMask () override
 
- Protected Member Functions inherited from Object
 Object ()
 
void BuildEntityFragmentsForValuesUpdateForPlayerWithMask (ByteBuffer &data, EnumFlag< UF::UpdateFieldFlag > flags) const
 
- Protected Member Functions inherited from BaseEntity
 BaseEntity ()
 
void _Create (ObjectGuid const &guid)
 
template<typename T >
void SetUpdateFieldValue (UF::UpdateFieldPrivateSetter< T > setter, typename UF::UpdateFieldPrivateSetter< T >::value_type value)
 
template<typename T >
void SetUpdateFieldFlagValue (UF::UpdateFieldPrivateSetter< T > setter, typename UF::UpdateFieldPrivateSetter< T >::value_type flag)
 
template<typename T >
void RemoveUpdateFieldFlagValue (UF::UpdateFieldPrivateSetter< T > setter, typename UF::UpdateFieldPrivateSetter< T >::value_type flag)
 
template<typename T >
UF::DynamicUpdateFieldSetter< T >::insert_result AddDynamicUpdateFieldValue (UF::DynamicUpdateFieldSetter< T > setter)
 
template<typename T >
UF::DynamicUpdateFieldSetter< T >::insert_result InsertDynamicUpdateFieldValue (UF::DynamicUpdateFieldSetter< T > setter, uint32 index)
 
template<typename T >
void RemoveDynamicUpdateFieldValue (UF::DynamicUpdateFieldSetter< T > setter, uint32 index)
 
template<typename T >
void ClearDynamicUpdateFieldValues (UF::DynamicUpdateFieldSetter< T > setter)
 
template<typename K , typename V >
void RemoveMapUpdateFieldValue (UF::MapUpdateFieldSetter< K, V > setter, std::type_identity_t< K > const &key)
 
template<typename T >
void InsertSetUpdateFieldValue (UF::SetUpdateFieldSetter< T > setter, std::type_identity_t< T > const &key)
 
template<typename T >
void RemoveSetUpdateFieldValue (UF::SetUpdateFieldSetter< T > setter, std::type_identity_t< T > const &key)
 
template<typename T >
void RemoveOptionalUpdateFieldValue (UF::OptionalUpdateFieldSetter< T > setter)
 
template<typename T >
void SetUpdateFieldStatValue (UF::UpdateFieldPrivateSetter< T > setter, typename UF::UpdateFieldPrivateSetter< T >::value_type value)
 
template<typename T >
void ApplyModUpdateFieldValue (UF::UpdateFieldPrivateSetter< T > setter, typename UF::UpdateFieldPrivateSetter< T >::value_type mod, bool apply)
 
template<typename T >
void ApplyPercentModUpdateFieldValue (UF::UpdateFieldPrivateSetter< T > setter, float percent, bool apply)
 
template<typename Action >
void DoWithSuppressingObjectUpdates (Action &&action)
 
void BuildMovementUpdate (ByteBuffer &data, CreateObjectBits flags, Player const *target) const
 
void AddToObjectUpdateIfNeeded ()
 

Protected Attributes

BonusData _bonusData
 
- Protected Attributes inherited from BaseEntity
TypeID m_objectTypeId = NUM_CLIENT_OBJECT_TYPES
 
CreateObjectBits m_updateFlag = {}
 
WowCS::EntityFragmentsHolder m_entityFragments
 
bool m_objectUpdated = false
 

Private Member Functions

int32 GetArtifactPowerIndex (uint32 artifactPowerId) const
 

Private Attributes

std::string m_text
 
uint8 m_slot
 
Bag * m_container
 
ItemUpdateState uState
 
int16 uQueuePos
 
bool mb_in_trade
 
ObjectGuid m_refundRecipient
 
uint64 m_paidMoney
 
uint32 m_paidExtendedCost
 
GuidSet allowedGUIDs
 
ItemRandomBonusListId m_randomBonusListId
 
ObjectGuid m_childItem
 
std::array< uint32, MAX_ITEM_PROTO_SOCKETS > m_gemScalingLevels
 

Friends

void AddItemToUpdateQueueOf (Item *item, Player *player)
 
void RemoveItemFromUpdateQueueOf (Item *item, Player *player)
 

Additional Inherited Members

- Static Protected Member Functions inherited from BaseEntity
static void BuildEntityFragments (ByteBuffer &data, std::span< WowCS::EntityFragment const > fragments)
 

Detailed Description

Definition at line 184 of file Item.h.

Constructor & Destructor Documentation

◆ Item()

◆ ~Item()

Item::~Item ( )
default

Member Function Documentation

◆ AddArtifactPower()

◆ AddBonuses()

◆ AddToObjectUpdate()

bool Item::AddToObjectUpdate ( )
overridevirtual

Implements BaseEntity.

Definition at line 1883 of file Item.cpp.

References GetOwner().

◆ ApplyArtifactPowerEnchantmentBonuses()

◆ BuildUpdate()

void Item::BuildUpdate ( UpdateDataMapType &  data_map)
overridevirtual

◆ BuildValuesCreate()

void Item::BuildValuesCreate ( UF::UpdateFieldFlag  flags,
ByteBuffer &  data,
Player const *  target 
) const
overrideprotectedvirtual

Implements Object.

Definition at line 1807 of file Item.cpp.

References flags, m_itemData, and Object::m_objectData.

◆ BuildValuesUpdate()

void Item::BuildValuesUpdate ( UF::UpdateFieldFlag  flags,
ByteBuffer &  data,
Player const *  target 
) const
overrideprotectedvirtual

◆ BuildValuesUpdateForPlayerWithMask()

◆ BuildValuesUpdateWithFlag()

void Item::BuildValuesUpdateWithFlag ( UF::UpdateFieldFlag  flags,
ByteBuffer &  data,
Player const *  target 
) const
overridevirtual

◆ CalculateDurabilityRepairCost()

◆ CanBeMergedPartlyWith()

◆ CanBeTraded()

◆ CanTransmogrifyItemWithItem()

◆ CheckArtifactRelicSlotUnlock()

void Item::CheckArtifactRelicSlotUnlock ( Player const *  owner)

◆ CheckSoulboundTradeExpire()

bool Item::CheckSoulboundTradeExpire ( )

Definition at line 1983 of file Item.cpp.

References ClearSoulboundTradeable(), GetOwner(), HOUR, and m_itemData.

Referenced by Player::UpdateSoulboundTradeItems().

◆ ClearBonuses()

◆ ClearEnchantment()

◆ ClearSoulboundTradeable()

◆ ClearValuesChangesMask()

void Item::ClearValuesChangesMask ( )
overrideprotectedvirtual

◆ CloneItem()

◆ CopyArtifactDataFromParent()

void Item::CopyArtifactDataFromParent ( Item *  parent)

◆ Create()

◆ CreateItem()

◆ DeleteFromDB() [1/2]

void Item::DeleteFromDB ( CharacterDatabaseTransaction  trans)
virtual

Reimplemented in AzeriteEmpoweredItem, AzeriteItem, and Bag.

Definition at line 1211 of file Item.cpp.

References DeleteFromDB(), BaseEntity::GetGUID(), m_loot, and sLootItemStorage.

◆ DeleteFromDB() [2/2]

◆ DeleteFromInventoryDB() [1/2]

void Item::DeleteFromInventoryDB ( CharacterDatabaseTransaction  trans)

Definition at line 1228 of file Item.cpp.

References DeleteFromInventoryDB(), and BaseEntity::GetGUID().

◆ DeleteFromInventoryDB() [2/2]

◆ DeleteRefundDataFromDB()

void Item::DeleteRefundDataFromDB ( CharacterDatabaseTransaction *  trans)

◆ FSetState()

void Item::FSetState ( ItemUpdateState  state)
inline

◆ GemsFitSockets()

◆ GetAppearanceModId()

uint32 Item::GetAppearanceModId ( ) const
inline

Definition at line 360 of file Item.h.

Referenced by CopyArtifactDataFromParent(), and GetVisibleAppearanceModId().

◆ GetArtifactPower()

UF::ArtifactPower const * Item::GetArtifactPower ( uint32  artifactPowerId) const

◆ GetArtifactPowerIndex()

int32 Item::GetArtifactPowerIndex ( uint32  artifactPowerId) const
private

◆ GetBagSlot()

◆ GetBaseDisenchantLoot()

◆ GetBonding()

ItemBondingType Item::GetBonding ( ) const
inline

◆ GetBonus()

◆ GetBonusListIDs()

◆ GetBuyPrice() [1/2]

◆ GetBuyPrice() [2/2]

uint32 Item::GetBuyPrice ( Player const *  owner,
bool &  standardPrice 
) const

Definition at line 2101 of file Item.cpp.

References GetBuyPrice(), GetItemLevel(), GetQuality(), and GetTemplate().

Referenced by GetBuyPrice(), and GetSellPrice().

◆ GetChildItem()

◆ GetContainedIn()

ObjectGuid Item::GetContainedIn ( ) const
inline

Definition at line 205 of file Item.h.

◆ GetContainer()

Bag * Item::GetContainer ( )
inline

◆ GetContext()

◆ GetCount()

uint32 Item::GetCount ( ) const
inline

Definition at line 289 of file Item.h.

Referenced by Guild::_DoItemsMove(), Guild::BankMoveItemData::_ReserveSpace(), Guild::_SendBankContentUpdate(), Player::_StoreItem(), Player::AddItemToBuyBackSlot(), AuctionHouseObject::BuyCommodity(), Player::CanBankItem(), CanBeMergedPartlyWith(), Player::CanEquipItem(), Player::CanSellItemToVendor(), Guild::BankMoveItemData::CanStore(), Player::CanStoreItem(), Player::CanStoreItem_InBag(), Player::CanStoreItem_InInventorySlots(), Player::CanStoreItem_InSpecificSlot(), Player::CanStoreItems(), Player::CanTakeMoreSimilarItems(), Player::CanUnequipItem(), Spell::CheckItems(), Player::DestroyItem(), Player::DestroyItemCount(), WorldSession::DoLootRelease(), Spell::EffectMilling(), Spell::EffectProspecting(), Spell::EffectScriptEffect(), Player::EquipItem(), GetDebugInfo(), Player::GetItemCount(), Player::GetItemCountWithLimitCategory(), WorldSession::HandleAuctionSellCommodity(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleAutoBankItemOpcode(), WorldSession::HandleBuybackItem(), WorldSession::HandleMailTakeItem(), WorldSession::HandleSellAllJunkItems(), WorldSession::HandleSellItemOpcode(), Player::HasItemWithLimitCategoryEquipped(), Guild::BankMoveItemData::LogAction(), WorldPackets::Mail::MailAttachedItem::MailAttachedItem(), WorldSession::moveItems(), Player::MoveItemToInventory(), SaveToDB(), Player::SellItemToVendor(), BlackMarketMgr::SendAuctionWonMail(), Player::SendNewItem(), Player::SplitItem(), Guild::BankMoveItemData::StoreItem(), and Player::SwapItem().

◆ GetCreator()

ObjectGuid Item::GetCreator ( ) const
inline

◆ GetDebugInfo()

std::string Item::GetDebugInfo ( ) const
overridevirtual

◆ GetDisenchantLootId()

◆ GetDisenchantSkillRequired()

◆ GetDisplayId()

◆ GetEffects()

◆ GetEnchantmentCharges()

uint32 Item::GetEnchantmentCharges ( EnchantmentSlot  slot) const
inline

◆ GetEnchantmentDuration()

◆ GetEnchantmentId()

◆ GetEnchantRequiredLevel()

uint32 Item::GetEnchantRequiredLevel ( ) const

◆ GetGem()

UF::SocketedGem const * Item::GetGem ( uint16  slot) const

Definition at line 1571 of file Item.cpp.

References ASSERT, m_itemData, and MAX_GEM_SOCKETS.

Referenced by Player::ApplyEnchantment(), and WorldSession::HandleSocketGems().

◆ GetGemCountWithID()

uint8 Item::GetGemCountWithID ( uint32  GemID) const

Definition at line 1666 of file Item.cpp.

References m_itemData.

Referenced by Player::GetItemCount().

◆ GetGemCountWithLimitCategory()

uint8 Item::GetGemCountWithLimitCategory ( uint32  limitCategory) const

Definition at line 1674 of file Item.cpp.

References m_itemData.

Referenced by Player::CanEquipUniqueItem(), and Player::HasGemWithLimitCategoryEquipped().

◆ GetGiftCreator()

ObjectGuid Item::GetGiftCreator ( ) const
inline

Definition at line 209 of file Item.h.

Referenced by CloneItem(), WorldSession::HandleWrapItem(), and SaveToDB().

◆ GetItemLevel() [1/2]

◆ GetItemLevel() [2/2]

◆ GetItemLimitCategory()

◆ GetItemModifiedAppearance()

◆ GetItemRandomBonusListId()

ItemRandomBonusListId Item::GetItemRandomBonusListId ( ) const
inline

Definition at line 308 of file Item.h.

◆ GetItemStatType()

int32 Item::GetItemStatType ( uint32  index) const
inline

Definition at line 357 of file Item.h.

References ASSERT, and MAX_ITEM_PROTO_STATS.

Referenced by Player::_ApplyItemBonuses(), and GetItemStatValue().

◆ GetItemStatValue()

◆ GetLootForPlayer()

Loot * Item::GetLootForPlayer ( Player const *  ) const
inlineoverridevirtual

Reimplemented from Object.

Definition at line 336 of file Item.h.

◆ GetMaxStackCount()

uint32 Item::GetMaxStackCount ( ) const
inline

◆ GetModifier()

◆ GetNameForLocaleIdx()

std::string Item::GetNameForLocaleIdx ( LocaleConstant  locale) const
overridevirtual

◆ GetOwner()

◆ GetOwnerGUID()

◆ GetPaidExtendedCost()

uint32 Item::GetPaidExtendedCost ( ) const
inline

Definition at line 381 of file Item.h.

Referenced by Player::RefundItem(), SaveRefundDataToDB(), and Player::SendRefundInfo().

◆ GetPaidMoney()

uint64 Item::GetPaidMoney ( ) const
inline

◆ GetPlayedTime()

uint32 Item::GetPlayedTime ( ) const

Definition at line 1953 of file Item.cpp.

References m_itemData.

Referenced by Player::_LoadItem().

◆ GetPos()

◆ GetQuality()

◆ GetQueuePos()

uint16 Item::GetQueuePos ( ) const
inline

Definition at line 342 of file Item.h.

Referenced by debug_commandscript::HandleDebugGetItemStateCommand().

◆ GetRefundRecipient()

ObjectGuid const & Item::GetRefundRecipient ( ) const
inline

Definition at line 379 of file Item.h.

Referenced by Player::RefundItem(), SaveRefundDataToDB(), and Player::SendRefundInfo().

◆ GetRepairCostMultiplier()

float Item::GetRepairCostMultiplier ( ) const
inline

Definition at line 364 of file Item.h.

Referenced by CalculateDurabilityRepairCost().

◆ GetRequiredLevel()

◆ GetScalingContentTuningId()

uint32 Item::GetScalingContentTuningId ( ) const
inline

Definition at line 365 of file Item.h.

Referenced by Player::CanEquipItem().

◆ GetScriptId()

uint32 Item::GetScriptId ( ) const
inline

◆ GetSellPrice() [1/2]

uint32 Item::GetSellPrice ( ItemTemplate const *  proto,
uint32  quality,
uint32  itemLevel 
)
static

◆ GetSellPrice() [2/2]

◆ GetSkill()

uint32 Item::GetSkill ( )

Definition at line 1244 of file Item.cpp.

References ItemTemplate::GetSkill(), and GetTemplate().

Referenced by Player::CanUseItem().

◆ GetSlot()

◆ GetSocketColor()

◆ GetSpellCharges()

◆ GetState()

◆ GetTemplate()

ItemTemplate const * Item::GetTemplate ( ) const

Definition at line 1233 of file Item.cpp.

References Object::GetEntry(), and sObjectMgr.

Referenced by Player::_ApplyAllItemMods(), Player::_ApplyAllLevelScaleItemMods(), Player::_ApplyItemBonuses(), Player::_ApplyItemMods(), Player::_ApplyWeaponDamage(), Player::_LoadItem(), Player::_RemoveAllItemMods(), Player::_SaveInventory(), AddItemsSetItem(), Player::AddQuestAndCheckCompletion(), Player::ApplyEnchantment(), Player::ApplyEquipCooldown(), Player::ApplyItemEquipSpell(), Player::ApplyItemLootedSpell(), Player::ApplyItemObtainSpells(), Player::AutoUnequipOffhandIfNeed(), CalculateDurabilityRepairCost(), Player::CanBankItem(), Player::CanEquipItem(), Player::CanEquipUniqueItem(), Player::CanStoreItem_InBag(), Player::CanStoreItem_InSpecificSlot(), Player::CanStoreItems(), Player::CanTitanGrip(), CanTransmogrifyItemWithItem(), Player::CanUnequipItem(), Player::CanUseItem(), Player::CastItemCombatSpell(), Player::CastItemUseSpell(), CheckArtifactRelicSlotUnlock(), Spell::CheckCast(), Spell::CheckItems(), ClearBonuses(), AzeriteEmpoweredItem::ClearSelectedAzeritePowers(), Player::DestroyItem(), WorldSession::DoLootRelease(), PlayerAI::DoRangedAttackIfReady(), Spell::EffectEnchantItemPerm(), Spell::EffectEnchantItemPrismatic(), Spell::EffectEnchantItemTmp(), Spell::EffectFeedPet(), Spell::EffectMilling(), Spell::EffectOpenLock(), Spell::EffectProspecting(), Player::EquipItem(), Player::FindEquipSlot(), AuctionsBucketKey::ForItem(), GemsFitSockets(), Unit::GetAPMultiplier(), GetBuyPrice(), Player::GetCraftingReagentItemsToDeposit(), GetDisenchantLootId(), GetDisenchantSkillRequired(), Player::GetItemCount(), GetItemLevel(), GetItemStatValue(), GetNameForLocaleIdx(), GetSellPrice(), Player::GetShield(), GetSkill(), Spell::GetSpellCastDataAmmo(), Unit::GetUnitBlockChance(), Player::GetUseableItemByPos(), Player::GetWeaponForAttack(), WorldSession::HandleArtifactAddPower(), WorldSession::HandleArtifactSetAppearance(), WorldSession::HandleAuctionSellCommodity(), WorldSession::HandleAuctionSellItem(), debug_commandscript::HandleDebugItemExpireCommand(), WorldSession::HandleDestroyItemOpcode(), spell_gen_fishing::HandleDummy(), spell_sha_flametongue_weapon::HandleEffectHitTarget(), WorldSession::HandleOpenItemOpcode(), WorldSession::HandleOpenWrappedItemCallback(), WorldSession::HandleReadItem(), WorldSession::HandleSendMail(), WorldSession::HandleSocketGems(), WorldSession::HandleTransmogrifyItems(), WorldSession::HandleWrapItem(), Player::HasGemWithLimitCategoryEquipped(), Player::HasItemTotemCategory(), IsArtifactDisabled(), IsFitToSpellRequirements(), IsLimitedToAnotherMapOrZone(), ConditionMgr::IsPlayerMeetingCondition(), Player::IsTwoHandUsed(), Player::IsUsingTwoHandedWeaponInOneHand(), IsValidTransmogrificationTarget(), LoadAdditionalDataFromDB(), LoadArtifactData(), Bag::LoadFromDB(), LoadFromDB(), Guild::BankMoveItemData::LogAction(), WorldSession::moveItems(), Player::ProcessItemCast(), Player::RemoveItem(), Player::RemoveItemFromBuyBackSlot(), RemoveItemsSetItem(), AuctionBotBuyer::RollBidChance(), AuctionBotBuyer::RollBuyChance(), SaveToDB(), BlackMarketMgr::SendAuctionWonMail(), Player::SendNewItem(), Player::SetRegularAttackTime(), Player::SetVisibleItemSlot(), Player::StoreNewItem(), Spell::SummonGuardian(), Player::SwapItem(), Spell::TakeCastItem(), Spell::TakeReagents(), Player::UpdateAverageItemLevelTotal(), Player::UpdateDamageDoneMods(), UpdateDuration(), and Player::UpdateItemDuration().

◆ GetText()

std::string const & Item::GetText ( ) const
inline

Definition at line 320 of file Item.h.

◆ GetTotalPurchasedArtifactPowers()

uint32 Item::GetTotalPurchasedArtifactPowers ( ) const

◆ GetTotalUnlockedArtifactPowers()

uint32 Item::GetTotalUnlockedArtifactPowers ( ) const

◆ GetUpdateFieldFlagsFor()

◆ GetVisibleAppearanceModId()

◆ GetVisibleEnchantmentId()

uint32 Item::GetVisibleEnchantmentId ( Player const *  owner) const

◆ GetVisibleEntry()

◆ GetVisibleItemVisual()

uint16 Item::GetVisibleItemVisual ( Player const *  owner) const

◆ GetVisibleModifiedAppearanceId()

uint32 Item::GetVisibleModifiedAppearanceId ( Player const *  owner) const

◆ GetVisibleSecondaryModifiedAppearanceId()

int32 Item::GetVisibleSecondaryModifiedAppearanceId ( Player const *  owner) const

◆ GiveArtifactXp()

◆ HasEnchantRequiredSkill()

bool Item::HasEnchantRequiredSkill ( Player const *  player) const

◆ hasInvolvedQuest()

bool Item::hasInvolvedQuest ( uint32  ) const
inlineoverridevirtual

Reimplemented from Object.

Definition at line 349 of file Item.h.

◆ HasItemFlag()

◆ HasItemZoneFlag()

bool Item::HasItemZoneFlag ( ItemZoneFlags  flag) const
inline

Definition at line 228 of file Item.h.

◆ hasQuest()

bool Item::hasQuest ( uint32  quest_id) const
inlineoverridevirtual

Reimplemented from Object.

Definition at line 348 of file Item.h.

◆ InitArtifactPowers()

◆ IsArtifactDisabled()

bool Item::IsArtifactDisabled ( ) const

◆ IsAzeriteEmpoweredItem()

bool Item::IsAzeriteEmpoweredItem ( ) const
inline

◆ IsAzeriteItem()

bool Item::IsAzeriteItem ( ) const
inline

Definition at line 269 of file Item.h.

References BaseEntity::GetTypeId(), and TYPEID_AZERITE_ITEM.

◆ IsBag()

◆ IsBattlenetAccountBound()

bool Item::IsBattlenetAccountBound ( ) const
inline

Definition at line 235 of file Item.h.

References ITEM_FLAG2_BNET_ACCOUNT_TRADE_OK.

Referenced by WorldSession::HandleSendMail().

◆ IsBindedNotWith()

◆ IsBOPTradeable()

bool Item::IsBOPTradeable ( ) const
inline

◆ IsBoundAccountWide()

bool Item::IsBoundAccountWide ( ) const
inline

Definition at line 234 of file Item.h.

References ITEM_FLAG_IS_BOUND_TO_ACCOUNT.

Referenced by CanBeTraded(), WorldSession::HandleSendMail(), and IsBindedNotWith().

◆ IsBoundByEnchant()

bool Item::IsBoundByEnchant ( ) const

◆ IsBroken()

◆ IsConjuredConsumable()

bool Item::IsConjuredConsumable ( ) const
inline

Definition at line 351 of file Item.h.

◆ IsCurrencyToken()

bool Item::IsCurrencyToken ( ) const
inline

Definition at line 271 of file Item.h.

Referenced by Player::CanBankItem().

◆ IsEquipped()

◆ IsFitToSpellRequirements()

◆ IsInBag()

bool Item::IsInBag ( ) const
inline

Definition at line 303 of file Item.h.

Referenced by IsEquipped().

◆ IsInTrade()

bool Item::IsInTrade ( ) const
inline

Definition at line 278 of file Item.h.

Referenced by Player::CanStoreItems(), and Player::HasItemCount().

◆ IsInUpdateQueue()

bool Item::IsInUpdateQueue ( ) const
inline

Definition at line 341 of file Item.h.

Referenced by debug_commandscript::HandleDebugGetItemStateCommand().

◆ IsLimitedToAnotherMapOrZone()

bool Item::IsLimitedToAnotherMapOrZone ( uint32  cur_mapId,
uint32  cur_zoneId 
) const

Definition at line 1692 of file Item.cpp.

References ItemTemplate::GetArea(), ItemTemplate::GetMap(), and GetTemplate().

Referenced by Player::_LoadItem().

◆ IsLocked()

bool Item::IsLocked ( ) const
inline

◆ IsNotEmptyBag()

◆ IsRefundable()

◆ IsRefundExpired()

bool Item::IsRefundExpired ( ) const

Definition at line 1958 of file Item.cpp.

References GameTime::GetGameTime(), HOUR, and m_itemData.

Referenced by Player::_LoadItem(), Player::RefundItem(), and Player::SendRefundInfo().

◆ IsSoulBound()

◆ IsValidTransmogrificationTarget()

◆ IsVellum()

bool Item::IsVellum ( ) const
inline

Definition at line 350 of file Item.h.

Referenced by Spell::CheckItems(), and Spell::EffectEnchantItemPerm().

◆ IsWrapped()

◆ LoadAdditionalDataFromDB()

◆ LoadArtifactData()

◆ LoadFromDB()

bool Item::LoadFromDB ( ObjectGuid::LowType  guid,
ObjectGuid  ownerGuid,
Field *  fields,
uint32  entry 
)
virtual

Reimplemented in Bag.

Definition at line 907 of file Item.cpp.

References _bonusData, BaseEntity::_Create(), BIND_NONE, CHAR_UPD_ITEM_INSTANCE_ON_LOAD, CharacterDatabase, UF::ItemEnchantment::Charges, ItemDynamicFieldGems::Context, UF::ItemEnchantment::Duration, BonusData::EffectCount, UF::ItemData::Enchantment, GetBonding(), ItemTemplate::GetDuration(), Object::GetEntry(), BaseEntity::GetGUID(), GetTemplate(), Field::GetUInt16(), Field::GetUInt32(), Field::GetUInt8(), UF::ItemEnchantment::ID, BonusData::Initialize(), ObjectGuid::IsEmpty(), IsSoulBound(), IsWrapped(), ITEM_FIELD_FLAG_CHILD, ITEM_FIELD_FLAG_SOULBOUND, ITEM_MODIFIER_ARTIFACT_KNOWLEDGE_LEVEL, ITEM_MODIFIER_BATTLE_PET_BREED_DATA, ITEM_MODIFIER_BATTLE_PET_DISPLAY_ID, ITEM_MODIFIER_BATTLE_PET_LEVEL, ITEM_MODIFIER_BATTLE_PET_SPECIES_ID, ITEM_MODIFIER_ENCHANT_ILLUSION_ALL_SPECS, ITEM_MODIFIER_ENCHANT_ILLUSION_SPEC_1, ITEM_MODIFIER_ENCHANT_ILLUSION_SPEC_2, ITEM_MODIFIER_ENCHANT_ILLUSION_SPEC_3, ITEM_MODIFIER_ENCHANT_ILLUSION_SPEC_4, ITEM_MODIFIER_ENCHANT_ILLUSION_SPEC_5, ITEM_MODIFIER_TIMEWALKER_LEVEL, ITEM_MODIFIER_TRANSMOG_APPEARANCE_ALL_SPECS, ITEM_MODIFIER_TRANSMOG_APPEARANCE_SPEC_1, ITEM_MODIFIER_TRANSMOG_APPEARANCE_SPEC_2, ITEM_MODIFIER_TRANSMOG_APPEARANCE_SPEC_3, ITEM_MODIFIER_TRANSMOG_APPEARANCE_SPEC_4, ITEM_MODIFIER_TRANSMOG_APPEARANCE_SPEC_5, ITEM_MODIFIER_TRANSMOG_SECONDARY_APPEARANCE_ALL_SPECS, ITEM_MODIFIER_TRANSMOG_SECONDARY_APPEARANCE_SPEC_1, ITEM_MODIFIER_TRANSMOG_SECONDARY_APPEARANCE_SPEC_2, ITEM_MODIFIER_TRANSMOG_SECONDARY_APPEARANCE_SPEC_3, ITEM_MODIFIER_TRANSMOG_SECONDARY_APPEARANCE_SPEC_4, ITEM_MODIFIER_TRANSMOG_SECONDARY_APPEARANCE_SPEC_5, ItemId, ItemDynamicFieldGems::ItemId, m_itemData, m_randomBonusListId, BaseEntity::m_values, MAX_ENCHANTMENT_OFFSET, MAX_ENCHANTMENT_SLOT, MAX_GEM_SOCKETS, ItemTemplate::MaxDurability, UF::ItemData::MaxDurability, UF::UpdateFieldHolder::ModifyValue(), RemoveItemFlag(), ReplaceAllItemFlags(), SetBonuses(), SetContext(), SetCount(), SetCreatePlayedTime(), SetCreateTime(), SetCreator(), SetDurability(), Object::SetEntry(), SetExpiration(), SetGem(), SetGiftCreator(), SetModifier(), Object::SetObjectScale(), SetOwnerGUID(), SetText(), PreparedStatementBase::setUInt32(), PreparedStatementBase::setUInt64(), BaseEntity::SetUpdateFieldValue(), UF::ItemData::SpellCharges, TC_LOG_ERROR, and Trinity::Tokenize().

Referenced by Player::_LoadItem(), Player::_LoadMailedItem(), AuctionHouseMgr::LoadAuctions(), Bag::LoadFromDB(), and Guild::BankTab::LoadItemFromDB().

◆ RemoveFromObjectUpdate()

void Item::RemoveFromObjectUpdate ( )
overridevirtual

Implements BaseEntity.

Definition at line 1894 of file Item.cpp.

References GetOwner().

◆ RemoveItemFlag()

◆ RemoveItemZoneFlag()

void Item::RemoveItemZoneFlag ( ItemZoneFlags  flags)
inline

◆ ReplaceAllItemFlags()

void Item::ReplaceAllItemFlags ( ItemFieldFlags  flags)
inline

◆ ReplaceAllItemZoneFlags()

void Item::ReplaceAllItemZoneFlags ( ItemZoneFlags  flags)
inline

Definition at line 231 of file Item.h.

References flags, m_itemData, BaseEntity::SetUpdateFieldValue(), and UF::ItemData::ZoneFlags.

◆ SaveRefundDataToDB()

◆ SaveToDB()

void Item::SaveToDB ( CharacterDatabaseTransaction  trans)
virtual

Reimplemented in AzeriteEmpoweredItem, AzeriteItem, and Bag.

Definition at line 639 of file Item.cpp.

References _bonusData, CHAR_DEL_GIFT, CHAR_DEL_ITEM_INSTANCE, CHAR_DEL_ITEM_INSTANCE_ARTIFACT, CHAR_DEL_ITEM_INSTANCE_ARTIFACT_POWERS, CHAR_DEL_ITEM_INSTANCE_GEMS, CHAR_DEL_ITEM_INSTANCE_MODIFIERS, CHAR_DEL_ITEM_INSTANCE_TRANSMOG, CHAR_INS_ITEM_INSTANCE_ARTIFACT, CHAR_INS_ITEM_INSTANCE_ARTIFACT_POWERS, CHAR_INS_ITEM_INSTANCE_GEMS, CHAR_INS_ITEM_INSTANCE_MODIFIERS, CHAR_INS_ITEM_INSTANCE_TRANSMOG, CHAR_REP_ITEM_INSTANCE, CHAR_UPD_GIFT_OWNER, CHAR_UPD_ITEM_INSTANCE, CharacterDatabase, DoNotSaveToDB, BonusData::EffectCount, ItemTemplate::GetArtifactID(), GetBonusListIDs(), GetCount(), ObjectGuid::GetCounter(), GetCreator(), GetEnchantmentCharges(), GetEnchantmentDuration(), GetEnchantmentId(), Object::GetEntry(), SpellItemEnchantmentEntry::GetFlags(), GetGiftCreator(), BaseEntity::GetGUID(), GetModifier(), GetOwnerGUID(), GetTemplate(), IsWrapped(), ITEM_CHANGED, ITEM_MODIFIER_ARTIFACT_APPEARANCE_ID, ITEM_MODIFIER_ARTIFACT_KNOWLEDGE_LEVEL, ITEM_MODIFIER_ARTIFACT_TIER, ITEM_MODIFIER_BATTLE_PET_BREED_DATA, ITEM_MODIFIER_BATTLE_PET_DISPLAY_ID, ITEM_MODIFIER_BATTLE_PET_LEVEL, ITEM_MODIFIER_BATTLE_PET_SPECIES_ID, ITEM_MODIFIER_ENCHANT_ILLUSION_ALL_SPECS, ITEM_MODIFIER_ENCHANT_ILLUSION_SPEC_1, ITEM_MODIFIER_ENCHANT_ILLUSION_SPEC_2, ITEM_MODIFIER_ENCHANT_ILLUSION_SPEC_3, ITEM_MODIFIER_ENCHANT_ILLUSION_SPEC_4, ITEM_MODIFIER_ENCHANT_ILLUSION_SPEC_5, ITEM_MODIFIER_TIMEWALKER_LEVEL, ITEM_MODIFIER_TRANSMOG_APPEARANCE_ALL_SPECS, ITEM_MODIFIER_TRANSMOG_APPEARANCE_SPEC_1, ITEM_MODIFIER_TRANSMOG_APPEARANCE_SPEC_2, ITEM_MODIFIER_TRANSMOG_APPEARANCE_SPEC_3, ITEM_MODIFIER_TRANSMOG_APPEARANCE_SPEC_4, ITEM_MODIFIER_TRANSMOG_APPEARANCE_SPEC_5, ITEM_MODIFIER_TRANSMOG_SECONDARY_APPEARANCE_ALL_SPECS, ITEM_MODIFIER_TRANSMOG_SECONDARY_APPEARANCE_SPEC_1, ITEM_MODIFIER_TRANSMOG_SECONDARY_APPEARANCE_SPEC_2, ITEM_MODIFIER_TRANSMOG_SECONDARY_APPEARANCE_SPEC_3, ITEM_MODIFIER_TRANSMOG_SECONDARY_APPEARANCE_SPEC_4, ITEM_MODIFIER_TRANSMOG_SECONDARY_APPEARANCE_SPEC_5, ITEM_NEW, ITEM_REMOVED, ITEM_UNCHANGED, m_gemScalingLevels, m_itemData, m_loot, m_randomBonusListId, m_text, MAX_ENCHANTMENT_SLOT, MAX_GEM_SOCKETS, PreparedStatementBase::setInt64(), SetState(), PreparedStatementBase::setString(), PreparedStatementBase::setUInt16(), PreparedStatementBase::setUInt32(), PreparedStatementBase::setUInt64(), PreparedStatementBase::setUInt8(), sLootItemStorage, sSpellItemEnchantmentStore, and uState.

Referenced by Player::_LoadItem(), Player::_LoadMailedItem(), Player::_SaveInventory(), Player::AutoUnequipOffhandIfNeed(), PlayerAchievementMgr::CompletedAchievement(), WorldSession::HandleAuctionSellCommodity(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleWrapItem(), AzeriteEmpoweredItem::SaveToDB(), AzeriteItem::SaveToDB(), Bag::SaveToDB(), BlackMarketMgr::SendAuctionWonMail(), MailDraft::SendReturnToSender(), and Guild::BankTab::SetItem().

◆ SendTimeUpdate()

◆ SendUpdateSockets()

◆ SetAppearanceModId()

void Item::SetAppearanceModId ( uint32  appearanceModId)
inline

◆ SetArtifactPower()

◆ SetArtifactXP()

◆ SetBinding()

◆ SetBonuses()

◆ SetChildItem()

void Item::SetChildItem ( ObjectGuid  childItem)
inline

Definition at line 439 of file Item.h.

Referenced by Player::StoreNewItem().

◆ SetContainedIn()

◆ SetContainer()

void Item::SetContainer ( Bag *  container)
inline

Definition at line 301 of file Item.h.

Referenced by Player::_StoreItem(), Bag::RemoveItem(), Bag::StoreItem(), and Player::VisualizeItem().

◆ SetContext()

void Item::SetContext ( ItemContext  context)
inline

Definition at line 457 of file Item.h.

References UF::ItemData::Context, m_itemData, and BaseEntity::SetUpdateFieldValue().

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

◆ SetCount()

◆ SetCreatePlayedTime()

void Item::SetCreatePlayedTime ( uint32  createPlayedTime)
inline

◆ SetCreateTime()

void Item::SetCreateTime ( int64  createTime)
inline

Definition at line 328 of file Item.h.

References UF::ItemData::CreateTime, m_itemData, and BaseEntity::SetUpdateFieldValue().

Referenced by Create(), and LoadFromDB().

◆ SetCreator()

void Item::SetCreator ( ObjectGuid  guid)
inline

◆ SetDurability()

void Item::SetDurability ( uint32  durability)
inline

◆ SetEnchantment()

◆ SetEnchantmentCharges()

◆ SetEnchantmentDuration()

◆ SetExpiration()

void Item::SetExpiration ( uint32  expiration)
inline

◆ SetFixedLevel()

◆ SetGem()

◆ SetGiftCreator()

◆ SetInTrade()

void Item::SetInTrade ( bool  b = true)
inline

Definition at line 277 of file Item.h.

Referenced by clearAcceptTradeMode(), and setAcceptTradeMode().

◆ SetItemFlag()

◆ SetItemRandomBonusList()

void Item::SetItemRandomBonusList ( ItemRandomBonusListId  bonusListId)

Definition at line 1250 of file Item.cpp.

References AddBonuses().

Referenced by AuctionBotSeller::AddNewAuctions(), CloneItem(), and Player::StoreNewItem().

◆ SetItemZoneFlag()

void Item::SetItemZoneFlag ( ItemZoneFlags  flags)
inline

◆ SetMaxDurability()

void Item::SetMaxDurability ( uint32  maxDurability)
inline

◆ SetModifier()

◆ SetNotRefundable()

◆ SetOwnerGUID()

◆ SetPaidExtendedCost()

void Item::SetPaidExtendedCost ( uint32  iece)
inline

Definition at line 377 of file Item.h.

Referenced by Player::_LoadItem(), Player::_StoreOrEquipNewItem(), and SetNotRefundable().

◆ SetPaidMoney()

void Item::SetPaidMoney ( uint64  money)
inline

Definition at line 376 of file Item.h.

Referenced by Player::_LoadItem(), Player::_StoreOrEquipNewItem(), and SetNotRefundable().

◆ SetPetitionId()

void Item::SetPetitionId ( uint32  petitionId)
inline

◆ SetPetitionNumSignatures()

void Item::SetPetitionNumSignatures ( uint32  signatures)
inline

◆ SetRefundRecipient()

void Item::SetRefundRecipient ( ObjectGuid const &  guid)
inline

Definition at line 375 of file Item.h.

Referenced by Player::_LoadItem(), Player::_StoreOrEquipNewItem(), and SetNotRefundable().

◆ SetSlot()

void Item::SetSlot ( uint8  slot)
inline

◆ SetSoulboundTradeable()

void Item::SetSoulboundTradeable ( GuidSet const &  allowedLooters)

Definition at line 1963 of file Item.cpp.

References allowedGUIDs, ITEM_FIELD_FLAG_BOP_TRADEABLE, and SetItemFlag().

Referenced by Player::_LoadItem(), and Player::StoreNewItem().

◆ SetSpellCharges()

◆ SetState()

void Item::SetState ( ItemUpdateState  state,
Player *  forplayer = nullptr 
)

Definition at line 1258 of file Item.cpp.

References AddItemToUpdateQueueOf, Player::DeleteRefundReference(), BaseEntity::GetGUID(), ITEM_NEW, ITEM_REMOVED, ITEM_UNCHANGED, RemoveItemFromUpdateQueueOf, uQueuePos, and uState.

Referenced by Player::_StoreItem(), ClearEnchantment(), ClearSoulboundTradeable(), Player::DestroyItem(), Player::DestroyItemCount(), Player::DurabilityPointsLoss(), Player::DurabilityRepair(), Spell::EffectApplyEnchantIllusion(), Spell::EffectLearnAzeriteEssencePower(), Spell::EffectOpenLock(), Spell::EffectRespecAzeriteEmpoweredItem(), Player::EquipItem(), GiveArtifactXp(), AzeriteItem::GiveXP(), WorldSession::HandleArtifactAddPower(), WorldSession::HandleArtifactSetAppearance(), WorldSession::HandleAuctionSellCommodity(), WorldSession::HandleAzeriteEmpoweredItemSelectPower(), WorldSession::HandleAzeriteEmpoweredItemViewed(), WorldSession::HandleAzeriteEssenceActivateEssence(), WorldSession::HandleAzeriteEssenceUnlockMilestone(), WorldSession::HandleConfirmArtifactRespec(), WorldSession::HandleMailTakeItem(), WorldSession::HandleOpenWrappedItemCallback(), WorldSession::HandlePetitionBuy(), WorldSession::HandleRemoveNewItem(), WorldSession::HandleTransmogrifyItems(), WorldSession::HandleWrapItem(), Player::MoveItemToInventory(), Player::ProcessItemCast(), Player::RemoveItemFromBuyBackSlot(), SaveToDB(), Player::SellItemToVendor(), SetEnchantment(), SetEnchantmentCharges(), SetEnchantmentDuration(), SetNotRefundable(), Player::SplitItem(), Player::SwapItem(), Spell::TakeCastItem(), UpdateDuration(), and Player::VisualizeItem().

◆ SetText()

void Item::SetText ( std::string const &  text)
inline

Definition at line 321 of file Item.h.

Referenced by WorldSession::HandleMailCreateTextItem(), and LoadFromDB().

◆ ToAzeriteEmpoweredItem() [1/2]

◆ ToAzeriteEmpoweredItem() [2/2]

AzeriteEmpoweredItem const * Item::ToAzeriteEmpoweredItem ( ) const
inline

Definition at line 262 of file Item.h.

◆ ToAzeriteItem() [1/2]

◆ ToAzeriteItem() [2/2]

AzeriteItem const * Item::ToAzeriteItem ( ) const
inline

Definition at line 260 of file Item.h.

◆ ToBag() [1/2]

◆ ToBag() [2/2]

Bag const * Item::ToBag ( ) const
inline

Definition at line 258 of file Item.h.

◆ UpdateDuration()

void Item::UpdateDuration ( Player *  owner,
uint32  diff 
)

Friends And Related Symbol Documentation

◆ AddItemToUpdateQueueOf

void AddItemToUpdateQueueOf ( Item *  item,
Player *  player 
)
friend

Definition at line 1289 of file Item.cpp.

Referenced by SetState().

◆ RemoveItemFromUpdateQueueOf

void RemoveItemFromUpdateQueueOf ( Item *  item,
Player *  player 
)
friend

Definition at line 1310 of file Item.cpp.

Referenced by SetState().

Member Data Documentation

◆ _bonusData

◆ allowedGUIDs

GuidSet Item::allowedGUIDs
private

Definition at line 479 of file Item.h.

Referenced by ClearSoulboundTradeable(), IsBindedNotWith(), and SetSoulboundTradeable().

◆ m_childItem

ObjectGuid Item::m_childItem
private

Definition at line 481 of file Item.h.

◆ m_container

Bag* Item::m_container
private

Definition at line 472 of file Item.h.

Referenced by GetBagSlot(), and Item().

◆ m_gemScalingLevels

std::array<uint32, MAX_ITEM_PROTO_SOCKETS> Item::m_gemScalingLevels
private

Definition at line 482 of file Item.h.

Referenced by Item(), SaveToDB(), and SetGem().

◆ m_itemData

Definition at line 464 of file Item.h.

Referenced by Guild::_SendBankContentUpdate(), AddArtifactPower(), AddBonuses(), Player::AddItemDurations(), ApplyArtifactPowerEnchantmentBonuses(), Player::ApplyArtifactPowers(), AzeriteEmpoweredItem::BuildValuesCreate(), AzeriteItem::BuildValuesCreate(), Bag::BuildValuesCreate(), BuildValuesCreate(), AzeriteEmpoweredItem::BuildValuesUpdate(), AzeriteItem::BuildValuesUpdate(), Bag::BuildValuesUpdate(), BuildValuesUpdate(), BuildValuesUpdateForPlayerWithMask(), AzeriteEmpoweredItem::BuildValuesUpdateForPlayerWithMask(), AzeriteItem::BuildValuesUpdateForPlayerWithMask(), Bag::BuildValuesUpdateForPlayerWithMask(), AzeriteItem::BuildValuesUpdateWithFlag(), BuildValuesUpdateWithFlag(), CalculateDurabilityRepairCost(), Player::CanEquipUniqueItem(), CheckSoulboundTradeExpire(), ClearBonuses(), ClearEnchantment(), ClearValuesChangesMask(), CloneItem(), Player::DurabilityLoss(), Player::DurabilityPointsLoss(), Player::DurabilityRepair(), Spell::EffectSummonChangeItem(), Player::EnchantmentFitsRequirements(), GemsFitSockets(), GetArtifactPower(), GetArtifactPowerIndex(), GetGem(), GetGemCountWithID(), GetGemCountWithLimitCategory(), GetModifier(), GetPlayedTime(), GetSpellCharges(), GetTotalPurchasedArtifactPowers(), GetTotalUnlockedArtifactPowers(), GiveArtifactXp(), WorldSession::HandleArtifactAddPower(), WorldSession::HandleAuctionSellCommodity(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleConfirmArtifactRespec(), WorldSession::HandleSendMail(), WorldSession::HandleWrapItem(), InitArtifactPowers(), WorldPackets::Item::ItemInstance::Initialize(), WorldPackets::Inspect::InspectItemData::InspectItemData(), IsRefundExpired(), LoadArtifactData(), LoadFromDB(), WorldPackets::Mail::MailAttachedItem::MailAttachedItem(), WorldSession::moveItems(), RemoveItemFlag(), RemoveItemZoneFlag(), ReplaceAllItemFlags(), ReplaceAllItemZoneFlags(), SaveToDB(), Player::SendRefundInfo(), SendTimeUpdate(), SetAppearanceModId(), SetArtifactPower(), SetArtifactXP(), SetBonuses(), SetContainedIn(), SetContext(), SetCount(), SetCreatePlayedTime(), SetCreateTime(), SetCreator(), SetDurability(), SetEnchantment(), SetEnchantmentCharges(), SetEnchantmentDuration(), SetExpiration(), SetGem(), SetGiftCreator(), SetItemFlag(), SetItemZoneFlag(), SetMaxDurability(), SetModifier(), SetOwnerGUID(), SetPetitionId(), SetPetitionNumSignatures(), SetSpellCharges(), Player::SwapItem(), and UpdateDuration().

◆ m_loot

◆ m_lootGenerated

◆ m_paidExtendedCost

uint32 Item::m_paidExtendedCost
private

Definition at line 478 of file Item.h.

Referenced by Item().

◆ m_paidMoney

uint64 Item::m_paidMoney
private

Definition at line 477 of file Item.h.

Referenced by Item().

◆ m_randomBonusListId

ItemRandomBonusListId Item::m_randomBonusListId
private

Definition at line 480 of file Item.h.

Referenced by CloneItem(), Item(), LoadFromDB(), and SaveToDB().

◆ m_refundRecipient

ObjectGuid Item::m_refundRecipient
private

Definition at line 476 of file Item.h.

◆ m_slot

uint8 Item::m_slot
private

Definition at line 471 of file Item.h.

Referenced by IsEquipped(), and Item().

◆ m_text

std::string Item::m_text
private

Definition at line 470 of file Item.h.

Referenced by SaveToDB().

◆ mb_in_trade

bool Item::mb_in_trade
private

Definition at line 475 of file Item.h.

Referenced by Item().

◆ uQueuePos

int16 Item::uQueuePos
private

Definition at line 474 of file Item.h.

Referenced by Item(), and SetState().

◆ uState

ItemUpdateState Item::uState
private

Definition at line 473 of file Item.h.

Referenced by Item(), SaveToDB(), and SetState().


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