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

#include <Item.h>

+ Inheritance diagram for Item:

Public Member Functions

Item * CloneItem (uint32 count, Player const *player=nullptr) const
 
 Item ()
 
virtual bool Create (ObjectGuid::LowType guidlow, uint32 itemId, Player const *owner)
 
std::string const & GetNameForLocaleIdx (LocaleConstant locale) const override
 
ItemTemplate const * GetTemplate () 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)
 
void SetBinding (bool val)
 
bool HasItemFlag (ItemFieldFlags flag) const
 
void SetItemFlag (ItemFieldFlags flags)
 
void RemoveItemFlag (ItemFieldFlags flags)
 
void ReplaceAllItemFlags (ItemFieldFlags flags)
 
bool IsSoulBound () const
 
bool IsBoundAccountWide () const
 
bool IsBindedNotWith (Player const *player) const
 
bool IsBoundByEnchant () const
 
virtual void SaveToDB (CharacterDatabaseTransaction trans)
 
virtual bool LoadFromDB (ObjectGuid::LowType guid, ObjectGuid owner_guid, Field *fields, uint32 entry)
 
virtual void DeleteFromDB (CharacterDatabaseTransaction trans)
 
void DeleteFromInventoryDB (CharacterDatabaseTransaction trans)
 
void SaveRefundDataToDB ()
 
void DeleteRefundDataFromDB (CharacterDatabaseTransaction *trans)
 
Bag * ToBag ()
 
Bag const * ToBag () const
 
bool IsRefundable () const
 
bool IsBOPTradeable () const
 
bool IsWrapped () const
 
bool IsLocked () const
 
bool IsBag () 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
 
uint32 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 ()
 
uint32 GetSpell ()
 
int32 GetItemRandomPropertyId () const
 
uint32 GetItemSuffixFactor () const
 
void SetItemRandomProperties (int32 randomPropId)
 
void UpdateItemSuffixFactor ()
 
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
 
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)
 
int32 GetSpellCharges (uint8 index=0) const
 
void SetSpellCharges (uint8 index, int32 value)
 
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 IsPotion () const
 
bool IsWeaponVellum () const
 
bool IsArmorVellum () const
 
bool IsConjuredConsumable () const
 
uint32 GetItemLevel () const
 
uint32 GetDisplayId () const
 
void SetNotRefundable (Player *owner, bool changestate=true, CharacterDatabaseTransaction *trans=nullptr)
 
void SetRefundRecipient (ObjectGuid const &guid)
 
void SetPaidMoney (uint32 money)
 
void SetPaidExtendedCost (uint32 iece)
 
ObjectGuid const & GetRefundRecipient () const
 
uint32 GetPaidMoney () const
 
uint32 GetPaidExtendedCost () const
 
void UpdatePlayedTime (Player *owner)
 
uint32 GetPlayedTime ()
 
bool IsRefundExpired ()
 
void SetSoulboundTradeable (GuidSet const &allowedLooters)
 
void ClearSoulboundTradeable (Player *currentOwner)
 
bool CheckSoulboundTradeExpire ()
 
void BuildUpdate (UpdateDataMapType &) override
 
bool AddToObjectUpdate () override
 
void RemoveFromObjectUpdate () override
 
uint32 GetScriptId () const
 
uint32 GetBuyPrice () const
 
uint32 GetSellPrice (bool forVendor=false) const
 
void SetPetitionId (uint32 petitionId)
 
void SetPetitionNumSignatures (uint32 signatures)
 
std::string GetDebugInfo () const override
 
- Public Member Functions inherited from Object
virtual ~Object ()
 
bool IsInWorld () const
 
virtual void AddToWorld ()
 
virtual void RemoveFromWorld ()
 
ObjectGuid GetGUID () const
 
PackedGuid const & GetPackGUID () const
 
uint32 GetEntry () const
 
void SetEntry (uint32 entry)
 
float GetObjectScale () const
 
virtual void SetObjectScale (float scale)
 
virtual uint32 GetDynamicFlags () const
 
bool HasDynamicFlag (uint32 flag) const
 
virtual void SetDynamicFlag (uint32 flag)
 
virtual void RemoveDynamicFlag (uint32 flag)
 
virtual void ReplaceAllDynamicFlags (uint32 flag)
 
TypeID GetTypeId () const
 
bool isType (uint16 mask) const
 
virtual void BuildCreateUpdateBlockForPlayer (UpdateData *data, Player *target) const
 
void SendUpdateToPlayer (Player *player)
 
void BuildValuesUpdateBlockForPlayer (UpdateData *data, Player const *target) const
 
void BuildOutOfRangeUpdateBlock (UpdateData *data) const
 
void BuildMovementUpdateBlock (UpdateData *data, uint32 flags=0) const
 
virtual void DestroyForPlayer (Player *target, bool onDeath=false) const
 
int32 GetInt32Value (uint16 index) const
 
uint32 GetUInt32Value (uint16 index) const
 
uint64 GetUInt64Value (uint16 index) const
 
float GetFloatValue (uint16 index) const
 
uint8 GetByteValue (uint16 index, uint8 offset) const
 
uint16 GetUInt16Value (uint16 index, uint8 offset) const
 
ObjectGuid GetGuidValue (uint16 index) const
 
void SetInt32Value (uint16 index, int32 value)
 
void SetUInt32Value (uint16 index, uint32 value)
 
void UpdateUInt32Value (uint16 index, uint32 value)
 
void SetUInt64Value (uint16 index, uint64 value)
 
void SetFloatValue (uint16 index, float value)
 
void SetByteValue (uint16 index, uint8 offset, uint8 value)
 
void SetUInt16Value (uint16 index, uint8 offset, uint16 value)
 
void SetInt16Value (uint16 index, uint8 offset, int16 value)
 
void SetGuidValue (uint16 index, ObjectGuid value)
 
void SetStatFloatValue (uint16 index, float value)
 
void SetStatInt32Value (uint16 index, int32 value)
 
bool AddGuidValue (uint16 index, ObjectGuid value)
 
bool RemoveGuidValue (uint16 index, ObjectGuid value)
 
void ApplyModUInt32Value (uint16 index, int32 val, bool apply)
 
void ApplyModInt32Value (uint16 index, int32 val, bool apply)
 
void ApplyModUInt16Value (uint16 index, uint8 offset, int16 val, bool apply)
 
void ApplyModPositiveFloatValue (uint16 index, float val, bool apply)
 
void ApplyModSignedFloatValue (uint16 index, float val, bool apply)
 
void SetFlag (uint16 index, uint32 newFlag)
 
void RemoveFlag (uint16 index, uint32 oldFlag)
 
void ToggleFlag (uint16 index, uint32 flag)
 
bool HasFlag (uint16 index, uint32 flag) const
 
void ApplyModFlag (uint16 index, uint32 flag, bool apply)
 
void SetByteFlag (uint16 index, uint8 offset, uint8 newFlag)
 
void RemoveByteFlag (uint16 index, uint8 offset, uint8 newFlag)
 
void ToggleByteFlag (uint16 index, uint8 offset, uint8 flag)
 
bool HasByteFlag (uint16 index, uint8 offset, uint8 flag) const
 
void ApplyModByteFlag (uint16 index, uint8 offset, uint8 flag, bool apply)
 
void SetFlag64 (uint16 index, uint64 newFlag)
 
void RemoveFlag64 (uint16 index, uint64 oldFlag)
 
void ToggleFlag64 (uint16 index, uint64 flag)
 
bool HasFlag64 (uint16 index, uint64 flag) const
 
void ApplyModFlag64 (uint16 index, uint64 flag, bool apply)
 
void ClearUpdateMask (bool remove)
 
uint16 GetValuesCount () const
 
void SetIsNewObject (bool enable)
 
void BuildFieldsUpdate (Player *, UpdateDataMapType &) const
 
void SetFieldNotifyFlag (uint16 flag)
 
void RemoveFieldNotifyFlag (uint16 flag)
 
void ForceValuesUpdateAtIndex (uint32)
 
bool IsWorldObject () const
 
WorldObject * ToWorldObject ()
 
WorldObject const * ToWorldObject () const
 
bool IsItem () const
 
Item * ToItem ()
 
Item const * ToItem () const
 
bool IsPlayer () const
 
Player * ToPlayer ()
 
Player const * ToPlayer () const
 
bool IsCreature () const
 
Creature * ToCreature ()
 
Creature const * ToCreature () const
 
bool IsUnit () const
 
Unit * ToUnit ()
 
Unit const * ToUnit () const
 
bool IsGameObject () const
 
GameObject * ToGameObject ()
 
GameObject const * ToGameObject () const
 
bool IsCorpse () const
 
Corpse * ToCorpse ()
 
Corpse const * ToCorpse () const
 
bool IsDynObject () const
 
DynamicObject * ToDynObject ()
 
DynamicObject const * ToDynObject () const
 
Trinity::unique_weak_ptr< Object > GetWeakPtr () const
 

Static Public Member Functions

static Item * CreateItem (uint32 itemEntry, uint32 count, Player const *player=nullptr)
 
static void DeleteFromDB (CharacterDatabaseTransaction trans, ObjectGuid::LowType itemGuid)
 
static void DeleteFromInventoryDB (CharacterDatabaseTransaction trans, ObjectGuid::LowType itemGuid)
 
static uint32 GetBuyPrice (ItemTemplate const *proto)
 
static uint32 GetSellPrice (ItemTemplate const *proto)
 
- Static Public Member Functions inherited from Object
static ObjectGuid GetGUID (Object const *o)
 
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 Player * ToPlayer (Object *o)
 
static Player const * ToPlayer (Object const *o)
 
static Creature * ToCreature (Object *o)
 
static Creature const * ToCreature (Object const *o)
 
static Unit * ToUnit (Object *o)
 
static Unit const * ToUnit (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)
 

Public Attributes

Loot loot
 
bool m_lootGenerated
 

Private Attributes

std::string m_text
 
uint8 m_slot
 
Bag * m_container
 
ItemUpdateState uState
 
int16 uQueuePos
 
bool mb_in_trade
 
time_t m_lastPlayedTimeUpdate
 
ObjectGuid m_refundRecipient
 
uint32 m_paidMoney
 
uint32 m_paidExtendedCost
 
GuidSet allowedGUIDs
 

Friends

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

Additional Inherited Members

- Protected Member Functions inherited from Object
 Object ()
 
void _InitValues ()
 
void _Create (ObjectGuid const &guid)
 
bool _LoadIntoDataField (std::string const &data, uint32 startOffset, uint32 count)
 
uint32 GetUpdateFieldData (Player const *target, uint32 *&flags) const
 
void BuildMovementUpdate (ByteBuffer *data, uint16 flags) const
 
virtual void BuildValuesUpdate (uint8 updatetype, ByteBuffer *data, Player const *target) const
 
void AddToObjectUpdateIfNeeded ()
 
- Protected Attributes inherited from Object
uint16 m_objectType
 
TypeID m_objectTypeId
 
uint16 m_updateFlag
 
union { 
 
   int32 *   m_int32Values 
 
   uint32 *   m_uint32Values 
 
   float *   m_floatValues 
 
};  
 
UpdateMask _changesMask
 
uint16 m_valuesCount
 
uint16 _fieldNotifyFlags
 
bool m_objectUpdated
 

Detailed Description

Definition at line 61 of file Item.h.

Constructor & Destructor Documentation

◆ Item()

Member Function Documentation

◆ AddToObjectUpdate()

bool Item::AddToObjectUpdate ( )
overridevirtual

Implements Object.

Definition at line 1121 of file Item.cpp.

References GetOwner().

◆ BuildUpdate()

void Item::BuildUpdate ( UpdateDataMapType &  data_map)
overridevirtual

Reimplemented from Object.

Definition at line 1114 of file Item.cpp.

References Object::BuildFieldsUpdate(), Object::ClearUpdateMask(), and GetOwner().

◆ CalculateDurabilityRepairCost()

◆ CanBeMergedPartlyWith()

◆ CanBeTraded()

◆ CheckSoulboundTradeExpire()

bool Item::CheckSoulboundTradeExpire ( )

◆ ClearEnchantment()

◆ ClearSoulboundTradeable()

◆ CloneItem()

◆ Create()

◆ CreateItem()

◆ DeleteFromDB() [1/2]

void Item::DeleteFromDB ( CharacterDatabaseTransaction  trans)
virtual

Reimplemented in Bag.

Definition at line 519 of file Item.cpp.

References DeleteFromDB(), Object::GetGUID(), Loot::isLooted(), loot, and sLootItemStorage.

◆ DeleteFromDB() [2/2]

◆ DeleteFromInventoryDB() [1/2]

void Item::DeleteFromInventoryDB ( CharacterDatabaseTransaction  trans)

Definition at line 536 of file Item.cpp.

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

◆ DeleteFromInventoryDB() [2/2]

◆ DeleteRefundDataFromDB()

void Item::DeleteRefundDataFromDB ( CharacterDatabaseTransaction *  trans)

◆ FSetState()

void Item::FSetState ( ItemUpdateState  state)
inline

◆ GemsFitSockets()

◆ GetBagSlot()

◆ GetBuyPrice() [1/2]

uint32 Item::GetBuyPrice ( ) const

Definition at line 1138 of file Item.cpp.

References GetBuyPrice(), and GetTemplate().

Referenced by GetBuyPrice().

◆ GetBuyPrice() [2/2]

uint32 Item::GetBuyPrice ( ItemTemplate const *  proto)
static

Definition at line 1143 of file Item.cpp.

References ItemTemplate::GetBuyPrice().

◆ GetContainedIn()

ObjectGuid Item::GetContainedIn ( ) const
inline

Definition at line 80 of file Item.h.

References Object::GetGuidValue(), and ITEM_FIELD_CONTAINED.

◆ GetContainer()

Bag * Item::GetContainer ( )
inline

◆ GetCount()

uint32 Item::GetCount ( ) const
inline

Definition at line 136 of file Item.h.

References Object::GetUInt32Value(), and ITEM_FIELD_STACK_COUNT.

Referenced by Guild::_DoItemsMove(), Guild::BankMoveItemData::_ReserveSpace(), Player::_StoreItem(), Player::AddItemToBuyBackSlot(), AuctionEntry::BuildAuctionInfo(), Player::CanBankItem(), CanBeMergedPartlyWith(), Player::CanEquipItem(), 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(), Bag::GetItemCount(), Bag::GetItemCountWithLimitCategory(), AuctionBotBuyer::GetItemInformation(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleAutoBankItemOpcode(), WorldSession::HandleBuybackItem(), WorldSession::HandleMailTakeItem(), WorldSession::HandleSellItemOpcode(), Player::HasItemCount(), Player::HasItemOrGemWithIdEquipped(), Player::HasItemWithLimitCategoryEquipped(), Guild::BankMoveItemData::LogAction(), WorldPackets::Mail::MailAttachedItem::MailAttachedItem(), WorldSession::moveItems(), Player::MoveItemToInventory(), AuctionBotBuyer::RollBidChance(), AuctionBotBuyer::RollBuyChance(), SaveToDB(), AuctionHouseMgr::SendAuctionWonMail(), Player::SendNewItem(), Player::SplitItem(), Guild::BankMoveItemData::StoreItem(), and Player::SwapItem().

◆ GetCreator()

ObjectGuid Item::GetCreator ( ) const
inline

Definition at line 82 of file Item.h.

References Object::GetGuidValue(), and ITEM_FIELD_CREATOR.

Referenced by CloneItem().

◆ GetDebugInfo()

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

Reimplemented from Object.

Definition at line 1309 of file Item.cpp.

References GetBagSlot(), GetCount(), Object::GetDebugInfo(), GetOwnerGUID(), GetSlot(), IsEquipped(), and ObjectGuid::ToString().

Referenced by Bag::GetDebugInfo().

◆ GetDisplayId()

uint32 Item::GetDisplayId ( ) const
inline

Definition at line 202 of file Item.h.

References ItemTemplate::GetDisplayId().

◆ GetEnchantmentCharges()

◆ GetEnchantmentDuration()

◆ GetEnchantmentId()

◆ GetEnchantRequiredLevel()

uint32 Item::GetEnchantRequiredLevel ( ) const

◆ GetGemCountWithID()

◆ GetGemCountWithLimitCategory()

◆ GetGiftCreator()

ObjectGuid Item::GetGiftCreator ( ) const
inline

Definition at line 84 of file Item.h.

References Object::GetGuidValue(), and ITEM_FIELD_GIFTCREATOR.

Referenced by CloneItem().

◆ GetItemLevel()

uint32 Item::GetItemLevel ( ) const
inline

Definition at line 201 of file Item.h.

References ItemTemplate::GetBaseItemLevel().

Referenced by Player::GetAverageItemLevel().

◆ GetItemRandomPropertyId()

◆ GetItemSuffixFactor()

◆ GetMaxStackCount()

◆ GetNameForLocaleIdx()

◆ GetOwner()

◆ GetOwnerGUID()

◆ GetPaidExtendedCost()

uint32 Item::GetPaidExtendedCost ( ) const
inline

Definition at line 212 of file Item.h.

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

◆ GetPaidMoney()

uint32 Item::GetPaidMoney ( ) const
inline

◆ GetPlayedTime()

◆ GetPos()

◆ GetQueuePos()

uint16 Item::GetQueuePos ( ) const
inline

Definition at line 189 of file Item.h.

Referenced by debug_commandscript::HandleDebugGetItemStateCommand().

◆ GetRefundRecipient()

ObjectGuid const & Item::GetRefundRecipient ( ) const
inline

Definition at line 210 of file Item.h.

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

◆ GetScriptId()

uint32 Item::GetScriptId ( ) const
inline

◆ GetSellPrice() [1/2]

◆ GetSellPrice() [2/2]

uint32 Item::GetSellPrice ( ItemTemplate const *  proto)
static

Definition at line 1170 of file Item.cpp.

References ItemTemplate::GetSellPrice().

◆ GetSkill()

◆ GetSlot()

◆ GetSpell()

◆ GetSpellCharges()

◆ GetState()

◆ GetTemplate()

ItemTemplate const * Item::GetTemplate ( ) const

Definition at line 541 of file Item.cpp.

References Object::GetEntry(), and sObjectMgr.

Referenced by Player::_ApplyAllItemMods(), Player::_ApplyAllLevelScaleItemMods(), Player::_ApplyItemMods(), Player::_LoadItem(), Player::_RemoveAllItemMods(), Player::_SaveInventory(), Player::_StoreItem(), AddItemsSetItem(), Player::AddQuestAndCheckCompletion(), Player::ApplyEnchantment(), Player::ApplyEquipCooldown(), Player::ApplyItemEquipSpell(), Player::ApplyItemObtainSpells(), Player::AutoUnequipOffhandIfNeed(), AuctionHouseObject::BuildListAuctionItems(), CalculateDurabilityRepairCost(), Player::CanBankItem(), Player::CanEquipItem(), Player::CanEquipUniqueItem(), Player::CanStoreItem_InBag(), Player::CanStoreItem_InSpecificSlot(), Player::CanStoreItems(), Player::CanTitanGrip(), Player::CanUnequipItem(), Player::CanUseItem(), Player::CastItemUseSpell(), Player::CheckAmmoCompatibility(), Spell::CheckCast(), Spell::CheckItems(), Player::CorrectMetaGemEnchants(), Player::DestroyItem(), Spell::DoCreateItem(), WorldSession::DoLootRelease(), PlayerAI::DoRangedAttackIfReady(), Spell::EffectDisEnchant(), Spell::EffectEnchantItemPerm(), Spell::EffectFeedPet(), Spell::EffectLearnSpell(), Spell::EffectMilling(), Spell::EffectOpenLock(), Spell::EffectProspecting(), Player::EnchantmentFitsRequirements(), Player::EquipItem(), EquippedOk(), Player::FindEquipSlot(), GemsFitSockets(), Unit::GetAPMultiplier(), GetBuyPrice(), Player::GetItemCount(), Bag::GetItemCount(), GetNameForLocaleIdx(), GetSellPrice(), Player::GetShield(), GetSkill(), GetSpell(), Unit::GetUnitBlockChance(), Player::GetWeaponForAttack(), WorldSession::HandleAuctionSellItem(), debug_commandscript::HandleDebugItemExpireCommand(), WorldSession::HandleDestroyItemOpcode(), WorldSession::HandleOpenItemOpcode(), WorldSession::HandleOpenWrappedItemCallback(), WorldSession::HandleReadItem(), WorldSession::HandleSellItemOpcode(), WorldSession::HandleSendMail(), WorldSession::HandleSocketOpcode(), WorldSession::HandleUseItemOpcode(), WorldSession::HandleWrapItemOpcode(), Player::HasGemWithLimitCategoryEquipped(), Player::HasItemOrGemWithIdEquipped(), Player::HasItemTotemCategory(), Player::HasItemWithLimitCategoryEquipped(), IsFitToSpellRequirements(), IsLimitedToAnotherMapOrZone(), Trinity::Helpers::Entity::IsPlayerRangedAttacker(), Player::IsTwoHandUsed(), Player::IsUsingTwoHandedWeaponInOneHand(), LoadFromDB(), Bag::LoadFromDB(), Guild::BankMoveItemData::LogAction(), Player::RemoveItem(), Player::RemoveItemFromBuyBackSlot(), AuctionBotBuyer::RollBidChance(), AuctionBotBuyer::RollBuyChance(), Player::SendEquipError(), Player::SendLoot(), Player::SetRegularAttackTime(), AuctionBotSeller::SetStat(), Player::StoreNewItem(), Spell::SummonGuardian(), Player::SwapItem(), Spell::TakeAmmo(), Spell::TakeCastItem(), Spell::TakeReagents(), Player::ToggleMetaGemsActive(), Player::UpdateDamageDoneMods(), UpdateDuration(), Player::UpdateItemDuration(), Spell::UpdateSpellCastDataAmmo(), Player::UpdateWeaponSkill(), and Player::VisualizeItem().

◆ GetText()

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

Definition at line 169 of file Item.h.

◆ HasEnchantRequiredSkill()

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

◆ hasInvolvedQuest()

bool Item::hasInvolvedQuest ( uint32  ) const
inlineoverridevirtual

Reimplemented from Object.

Definition at line 196 of file Item.h.

◆ HasItemFlag()

bool Item::HasItemFlag ( ItemFieldFlags  flag) const
inline

Definition at line 91 of file Item.h.

References Object::HasFlag(), and ITEM_FIELD_FLAGS.

◆ hasQuest()

bool Item::hasQuest ( uint32  quest_id) const
inlineoverridevirtual

Reimplemented from Object.

Definition at line 195 of file Item.h.

References ItemTemplate::GetStartQuest().

◆ IsArmorVellum()

bool Item::IsArmorVellum ( ) const
inline

Definition at line 199 of file Item.h.

References ItemTemplate::IsArmorVellum().

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

◆ IsBag()

◆ IsBindedNotWith()

◆ IsBOPTradeable()

bool Item::IsBOPTradeable ( ) const
inline

◆ IsBoundAccountWide()

bool Item::IsBoundAccountWide ( ) const
inline

◆ IsBoundByEnchant()

bool Item::IsBoundByEnchant ( ) const

◆ IsBroken()

◆ IsConjuredConsumable()

bool Item::IsConjuredConsumable ( ) const
inline

Definition at line 200 of file Item.h.

References ItemTemplate::IsConjuredConsumable().

◆ IsCurrencyToken()

bool Item::IsCurrencyToken ( ) const
inline

Definition at line 118 of file Item.h.

References ItemTemplate::IsCurrencyToken().

◆ IsEquipped()

◆ IsFitToSpellRequirements()

◆ IsInBag()

bool Item::IsInBag ( ) const
inline

Definition at line 150 of file Item.h.

Referenced by IsEquipped().

◆ IsInTrade()

bool Item::IsInTrade ( ) const
inline

Definition at line 125 of file Item.h.

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

◆ IsInUpdateQueue()

bool Item::IsInUpdateQueue ( ) const
inline

Definition at line 188 of file Item.h.

Referenced by debug_commandscript::HandleDebugGetItemStateCommand().

◆ IsLimitedToAnotherMapOrZone()

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

Definition at line 1019 of file Item.cpp.

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

Referenced by Player::_LoadItem().

◆ IsLocked()

bool Item::IsLocked ( ) const
inline

◆ IsNotEmptyBag()

◆ IsPotion()

bool Item::IsPotion ( ) const
inline

Definition at line 197 of file Item.h.

References ItemTemplate::IsPotion().

Referenced by Spell::CheckCast().

◆ IsRefundable()

bool Item::IsRefundable ( ) const
inline

◆ IsRefundExpired()

bool Item::IsRefundExpired ( )

Definition at line 1257 of file Item.cpp.

References GetPlayedTime(), and HOUR.

Referenced by Player::RefundItem().

◆ IsSoulBound()

◆ IsWeaponVellum()

bool Item::IsWeaponVellum ( ) const
inline

Definition at line 198 of file Item.h.

References ItemTemplate::IsWeaponVellum().

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

◆ IsWrapped()

◆ LoadFromDB()

◆ RemoveFromObjectUpdate()

void Item::RemoveFromObjectUpdate ( )
overridevirtual

Implements Object.

Definition at line 1132 of file Item.cpp.

References GetOwner().

◆ RemoveItemFlag()

void Item::RemoveItemFlag ( ItemFieldFlags  flags)
inline

◆ ReplaceAllItemFlags()

void Item::ReplaceAllItemFlags ( ItemFieldFlags  flags)
inline

◆ SaveRefundDataToDB()

◆ SaveToDB()

◆ SendTimeUpdate()

◆ SendUpdateSockets()

◆ SetBinding()

◆ SetContainedIn()

◆ SetContainer()

void Item::SetContainer ( Bag *  container)
inline

Definition at line 148 of file Item.h.

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

◆ SetCount()

◆ SetCreatePlayedTime()

void Item::SetCreatePlayedTime ( uint32  createPlayedTime)
inline

◆ SetCreator()

void Item::SetCreator ( ObjectGuid  guid)
inline

◆ SetDurability()

void Item::SetDurability ( uint32  durability)
inline

◆ SetEnchantment()

◆ SetEnchantmentCharges()

◆ SetEnchantmentDuration()

void Item::SetEnchantmentDuration ( EnchantmentSlot  slot,
uint32  duration,
Player *  owner 
)

◆ SetExpiration()

void Item::SetExpiration ( uint32  expiration)
inline

Definition at line 88 of file Item.h.

References ITEM_FIELD_DURATION, and Object::SetUInt32Value().

Referenced by CloneItem(), Create(), LoadFromDB(), and UpdateDuration().

◆ SetGiftCreator()

◆ SetInTrade()

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

Definition at line 124 of file Item.h.

Referenced by clearAcceptTradeMode(), and setAcceptTradeMode().

◆ SetItemFlag()

void Item::SetItemFlag ( ItemFieldFlags  flags)
inline

◆ SetItemRandomProperties()

◆ SetMaxDurability()

void Item::SetMaxDurability ( uint32  maxDurability)
inline

◆ SetNotRefundable()

◆ SetOwnerGUID()

◆ SetPaidExtendedCost()

void Item::SetPaidExtendedCost ( uint32  iece)
inline

Definition at line 208 of file Item.h.

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

◆ SetPaidMoney()

void Item::SetPaidMoney ( uint32  money)
inline

Definition at line 207 of file Item.h.

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

◆ SetPetitionId()

void Item::SetPetitionId ( uint32  petitionId)
inline

Definition at line 235 of file Item.h.

References ITEM_FIELD_ENCHANTMENT_1_1, and Object::SetUInt32Value().

Referenced by WorldSession::HandlePetitionBuyOpcode().

◆ SetPetitionNumSignatures()

void Item::SetPetitionNumSignatures ( uint32  signatures)
inline

Definition at line 236 of file Item.h.

References ITEM_FIELD_ENCHANTMENT_1_1, and Object::SetUInt32Value().

◆ SetRefundRecipient()

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

Definition at line 206 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 1262 of file Item.cpp.

References allowedGUIDs, ITEM_FIELD_FLAG_BOP_TRADEABLE, and SetItemFlag().

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

◆ SetSpellCharges()

void Item::SetSpellCharges ( uint8  index,
int32  value 
)
inline

Definition at line 180 of file Item.h.

References ITEM_FIELD_SPELL_CHARGES, and Object::SetInt32Value().

Referenced by Create(), LoadFromDB(), and Spell::TakeCastItem().

◆ SetState()

◆ SetText()

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

Definition at line 170 of file Item.h.

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

◆ ToBag() [1/2]

◆ ToBag() [2/2]

Bag const * Item::ToBag ( ) const
inline

Definition at line 111 of file Item.h.

◆ UpdateDuration()

◆ UpdateItemSuffixFactor()

void Item::UpdateItemSuffixFactor ( )

◆ UpdatePlayedTime()

Friends And Related Symbol Documentation

◆ AddItemToUpdateQueueOf

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

Definition at line 675 of file Item.cpp.

Referenced by SetState().

◆ RemoveItemFromUpdateQueueOf

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

Definition at line 696 of file Item.cpp.

Referenced by SetState().

Member Data Documentation

◆ allowedGUIDs

GuidSet Item::allowedGUIDs
private

Definition at line 250 of file Item.h.

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

◆ loot

◆ m_container

Bag* Item::m_container
private

Definition at line 242 of file Item.h.

Referenced by GetBagSlot(), and Item().

◆ m_lastPlayedTimeUpdate

time_t Item::m_lastPlayedTimeUpdate
private

Definition at line 246 of file Item.h.

Referenced by GetPlayedTime(), Item(), and UpdatePlayedTime().

◆ m_lootGenerated

◆ m_paidExtendedCost

uint32 Item::m_paidExtendedCost
private

Definition at line 249 of file Item.h.

Referenced by Item().

◆ m_paidMoney

uint32 Item::m_paidMoney
private

Definition at line 248 of file Item.h.

Referenced by Item().

◆ m_refundRecipient

ObjectGuid Item::m_refundRecipient
private

Definition at line 247 of file Item.h.

◆ m_slot

uint8 Item::m_slot
private

Definition at line 241 of file Item.h.

Referenced by IsEquipped(), and Item().

◆ m_text

std::string Item::m_text
private

Definition at line 240 of file Item.h.

Referenced by SaveToDB().

◆ mb_in_trade

bool Item::mb_in_trade
private

Definition at line 245 of file Item.h.

Referenced by Item().

◆ uQueuePos

int16 Item::uQueuePos
private

Definition at line 244 of file Item.h.

Referenced by Item(), and SetState().

◆ uState

ItemUpdateState Item::uState
private

Definition at line 243 of file Item.h.

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


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