![]() |
TrinityCore
|
#include <Item.h>
Inheritance diagram for Item: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 | |
| Item::Item | ( | ) |
Definition at line 248 of file Item.cpp.
References GameTime::GetGameTime(), ITEM_END, ITEM_NEW, m_container, m_lastPlayedTimeUpdate, m_lootGenerated, Object::m_objectType, Object::m_objectTypeId, m_paidExtendedCost, m_paidMoney, m_slot, Object::m_updateFlag, Object::m_valuesCount, mb_in_trade, TYPEID_ITEM, TYPEMASK_ITEM, UPDATEFLAG_LOWGUID, uQueuePos, and uState.
|
overridevirtual |
|
overridevirtual |
Reimplemented from Object.
Definition at line 1114 of file Item.cpp.
References Object::BuildFieldsUpdate(), Object::ClearUpdateMask(), and GetOwner().
| uint32 Item::CalculateDurabilityRepairCost | ( | float | discount, |
| bool | useRateConfig = true |
||
| ) | const |
Definition at line 752 of file Item.cpp.
References DurabilityCostsEntry::ArmorSubClassCost, ASSERT, DurabilityQualityEntry::Data, ItemTemplate::GetBaseItemLevel(), ItemTemplate::GetClass(), ItemTemplate::GetQuality(), ItemTemplate::GetSubClass(), GetTemplate(), Object::GetUInt32Value(), ITEM_CLASS_ARMOR, ITEM_CLASS_WEAPON, ITEM_FIELD_DURABILITY, ITEM_FIELD_MAXDURABILITY, RATE_REPAIRCOST, sDurabilityCostsStore, sDurabilityQualityStore, sWorld, and DurabilityCostsEntry::WeaponSubClassCost.
Referenced by Player::DurabilityRepair(), and GetSellPrice().
| InventoryResult Item::CanBeMergedPartlyWith | ( | ItemTemplate const * | proto | ) | const |
Definition at line 836 of file Item.cpp.
References EQUIP_ERR_CANT_STACK, EQUIP_ERR_LOOT_GONE, EQUIP_ERR_OK, GetCount(), Object::GetEntry(), ItemTemplate::GetId(), ItemTemplate::GetMaxStackSize(), and m_lootGenerated.
Referenced by Player::CanStoreItem_InBag(), Player::CanStoreItem_InInventorySlots(), Player::CanStoreItem_InSpecificSlot(), and Player::CanStoreItems().
| bool Item::CanBeTraded | ( | bool | mail = false, |
| bool | trade = false |
||
| ) | const |
Definition at line 727 of file Item.cpp.
References EQUIP_ERR_OK, Object::GetGUID(), GetOwner(), GetPos(), IsBag(), Player::IsBagPos(), IsBOPTradeable(), IsBoundAccountWide(), IsBoundByEnchant(), IsSoulBound(), m_lootGenerated, and ToBag().
Referenced by WorldSession::HandleAuctionSellItem(), WorldSession::HandleSendMail(), and WorldSession::HandleSetTradeItemOpcode().
| bool Item::CheckSoulboundTradeExpire | ( | ) |
Definition at line 1281 of file Item.cpp.
References ClearSoulboundTradeable(), GetOwner(), Object::GetUInt32Value(), HOUR, and ITEM_FIELD_CREATE_PLAYED_TIME.
Referenced by Player::UpdateSoulboundTradeItems().
| void Item::ClearEnchantment | ( | EnchantmentSlot | slot | ) |
Definition at line 930 of file Item.cpp.
References GetEnchantmentId(), GetOwner(), ITEM_CHANGED, ITEM_FIELD_ENCHANTMENT_1_1, MAX_ENCHANTMENT_OFFSET, MAX_ITEM_ENCHANTMENT_EFFECTS, SetState(), and Object::SetUInt32Value().
Referenced by WorldSession::HandleCancelTempEnchantmentOpcode(), Player::RemoveItem(), and Player::SetVirtualItemSlot().
| void Item::ClearSoulboundTradeable | ( | Player * | currentOwner | ) |
Definition at line 1268 of file Item.cpp.
References allowedGUIDs, CHAR_DEL_ITEM_BOP_TRADE, CharacterDatabase, Object::GetGUID(), ITEM_CHANGED, ITEM_FIELD_FLAG_BOP_TRADEABLE, RemoveItemFlag(), SetState(), and PreparedStatementBase::setUInt32().
Referenced by Player::_LoadItem(), Player::_StoreItem(), CheckSoulboundTradeExpire(), Player::DestroyItem(), Spell::EffectEnchantItemPerm(), Spell::EffectEnchantItemPrismatic(), Player::EquipItem(), and WorldSession::HandleSocketOpcode().
Definition at line 1077 of file Item.cpp.
References CreateItem(), GetCreator(), Object::GetEntry(), GetGiftCreator(), GetItemRandomPropertyId(), Object::GetUInt32Value(), ITEM_FIELD_DURATION, ITEM_FIELD_FLAG_BOP_TRADEABLE, ITEM_FIELD_FLAG_REFUNDABLE, ITEM_FIELD_FLAGS, ReplaceAllItemFlags(), SetCreator(), SetExpiration(), SetGiftCreator(), and SetItemRandomProperties().
Referenced by Guild::BankMoveItemData::_StoreItem(), Player::_StoreItem(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleSellItemOpcode(), and Player::SplitItem().
|
virtual |
Reimplemented in Bag.
Definition at line 268 of file Item.cpp.
References Object::_Create(), ItemTemplate::Effects, ItemTemplate::GetDuration(), Object::GetGUID(), MAX_ITEM_PROTO_SPELLS, ItemTemplate::MaxDurability, SetContainedIn(), SetCount(), SetCreatePlayedTime(), SetDurability(), Object::SetEntry(), SetExpiration(), SetMaxDurability(), Object::SetObjectScale(), SetOwnerGUID(), SetSpellCharges(), and sObjectMgr.
Referenced by CreateItem().
Definition at line 1050 of file Item.cpp.
References ABORT, ASSERT_NODEBUGINFO, Create(), ItemTemplate::GetMaxStackSize(), Item, NewItemOrBag(), SetCount(), and sObjectMgr.
Referenced by AuctionBotSeller::AddNewAuctions(), Player::CanEquipNewItem(), CloneItem(), AchievementMgr::CompletedAchievement(), Spell::EffectSummonChangeItem(), Player::EquipNewItem(), WorldSession::HandleMailCreateTextItem(), send_commandscript::HandleSendItemsCommand(), MailDraft::prepareItems(), Player::SendItemRetrievalMail(), and Player::StoreNewItem().
|
virtual |
Reimplemented in Bag.
Definition at line 519 of file Item.cpp.
References DeleteFromDB(), Object::GetGUID(), Loot::isLooted(), loot, and sLootItemStorage.
|
static |
Definition at line 512 of file Item.cpp.
References CHAR_DEL_ITEM_INSTANCE, CharacterDatabase, and PreparedStatementBase::setUInt32().
Referenced by Player::_LoadItem(), Player::_LoadMailedItem(), Guild::BankMoveItemData::_StoreItem(), DeleteFromDB(), Bag::DeleteFromDB(), and WorldSession::HandleAuctionSellItem().
| void Item::DeleteFromInventoryDB | ( | CharacterDatabaseTransaction | trans | ) |
Definition at line 536 of file Item.cpp.
References DeleteFromInventoryDB(), and Object::GetGUID().
|
static |
Definition at line 529 of file Item.cpp.
References CHAR_DEL_CHAR_INVENTORY_BY_ITEM, CharacterDatabase, and PreparedStatementBase::setUInt32().
Referenced by Player::_LoadItem(), Player::AutoUnequipOffhandIfNeed(), DeleteFromInventoryDB(), and WorldSession::HandleAuctionSellItem().
| void Item::DeleteRefundDataFromDB | ( | CharacterDatabaseTransaction * | trans | ) |
Definition at line 1193 of file Item.cpp.
References CHAR_DEL_ITEM_REFUND_INSTANCE, CharacterDatabase, Object::GetGUID(), and PreparedStatementBase::setUInt32().
Referenced by SetNotRefundable().
|
inline |
Definition at line 190 of file Item.h.
Referenced by Player::_LoadItem(), Player::_LoadMailedItem(), Player::_SaveInventory(), and Guild::BankTab::SetItem().
| bool Item::GemsFitSockets | ( | ) | const |
Definition at line 940 of file Item.cpp.
References GetEnchantmentId(), ItemTemplate::GetGemProperties(), ItemTemplate::GetSocketColor(), GetTemplate(), MAX_GEM_SOCKETS, sGemPropertiesStore, sObjectMgr, SOCK_ENCHANTMENT_SLOT, SpellItemEnchantmentEntry::SrcItemID, sSpellItemEnchantmentStore, and GemPropertiesEntry::Type.
Referenced by WorldSession::HandleSocketOpcode().
| uint8 Item::GetBagSlot | ( | ) | const |
Definition at line 717 of file Item.cpp.
References GetSlot(), INVENTORY_SLOT_BAG_0, and m_container.
Referenced by Player::_SaveInventory(), Player::AddQuestAndCheckCompletion(), Player::DestroyItemCount(), WorldSession::DoLootRelease(), Spell::EffectSummonChangeItem(), GetDebugInfo(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleAutoEquipItemOpcode(), debug_commandscript::HandleDebugGetItemStateCommand(), debug_commandscript::HandleDebugItemExpireCommand(), WorldSession::HandleOpenWrappedItemCallback(), WorldSession::HandleSellItemOpcode(), WorldSession::HandleTurnInPetitionOpcode(), LootItemStorage::LoadStoredLoot(), Player::RefundItem(), Player::SendNewItem(), UpdateDuration(), and Bag::~Bag().
| uint32 Item::GetBuyPrice | ( | ) | const |
Definition at line 1138 of file Item.cpp.
References GetBuyPrice(), and GetTemplate().
Referenced by GetBuyPrice().
|
static |
Definition at line 1143 of file Item.cpp.
References ItemTemplate::GetBuyPrice().
|
inline |
Definition at line 80 of file Item.h.
References Object::GetGuidValue(), and ITEM_FIELD_CONTAINED.
|
inline |
Definition at line 144 of file Item.h.
Referenced by Player::_SaveInventory(), and debug_commandscript::HandleDebugGetItemStateCommand().
|
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().
|
inline |
Definition at line 82 of file Item.h.
References Object::GetGuidValue(), and ITEM_FIELD_CREATOR.
Referenced by CloneItem().
|
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().
|
inline |
Definition at line 202 of file Item.h.
References ItemTemplate::GetDisplayId().
|
inline |
Definition at line 167 of file Item.h.
References ENCHANTMENT_CHARGES_OFFSET, Object::GetUInt32Value(), ITEM_FIELD_ENCHANTMENT_1_1, and MAX_ENCHANTMENT_OFFSET.
Referenced by AuctionEntry::BuildAuctionInfo(), Spell::EffectSummonChangeItem(), WorldPackets::Mail::MailAttachedItem::MailAttachedItem(), SaveToDB(), SetEnchantment(), SetEnchantmentCharges(), and Player::SetVirtualItemSlot().
|
inline |
Definition at line 166 of file Item.h.
References ENCHANTMENT_DURATION_OFFSET, Object::GetUInt32Value(), ITEM_FIELD_ENCHANTMENT_1_1, and MAX_ENCHANTMENT_OFFSET.
Referenced by Player::AddEnchantmentDurations(), Player::ApplyEnchantment(), AuctionEntry::BuildAuctionInfo(), Spell::EffectSummonChangeItem(), WorldPackets::Mail::MailAttachedItem::MailAttachedItem(), SaveToDB(), SetEnchantment(), and SetEnchantmentDuration().
|
inline |
Definition at line 165 of file Item.h.
References ENCHANTMENT_ID_OFFSET, Object::GetUInt32Value(), ITEM_FIELD_ENCHANTMENT_1_1, and MAX_ENCHANTMENT_OFFSET.
Referenced by Player::AddEnchantmentDurations(), Player::ApplyEnchantment(), AuctionEntry::BuildAuctionInfo(), Player::CanEquipUniqueItem(), Player::CastItemCombatSpell(), Player::CastItemUseSpell(), Spell::CheckItems(), ClearEnchantment(), Player::CorrectMetaGemEnchants(), Spell::EffectEnchantHeldItem(), Spell::EffectSummonChangeItem(), Player::EnchantmentFitsRequirements(), GemsFitSockets(), GetEnchantRequiredLevel(), GetGemCountWithID(), GetGemCountWithLimitCategory(), spell_rog_deadly_poison::HandleAfterHit(), WorldSession::HandleCancelTempEnchantmentOpcode(), spell_sha_windfury_weapon::HandleProc(), WorldSession::HandleSocketOpcode(), HasEnchantRequiredSkill(), Player::HasGemWithLimitCategoryEquipped(), WorldPackets::Inspect::InspectItemData::InspectItemData(), IsBoundByEnchant(), WorldPackets::Mail::MailAttachedItem::MailAttachedItem(), SaveToDB(), SendUpdateSockets(), SetEnchantment(), Player::SetVirtualItemSlot(), Player::SetVisibleItemSlot(), Player::ToggleMetaGemsActive(), Player::UpdateDamageDoneMods(), and Player::UpdateSkillEnchantments().
| uint32 Item::GetEnchantRequiredLevel | ( | ) | const |
Definition at line 811 of file Item.cpp.
References GetEnchantmentId(), MAX_ENCHANTMENT_SLOT, PERM_ENCHANTMENT_SLOT, and sSpellItemEnchantmentStore.
Definition at line 977 of file Item.cpp.
References GetEnchantmentId(), MAX_GEM_SOCKETS, SOCK_ENCHANTMENT_SLOT, SpellItemEnchantmentEntry::SrcItemID, and sSpellItemEnchantmentStore.
Referenced by Bag::GetItemCount(), and Player::HasItemOrGemWithIdEquipped().
Definition at line 996 of file Item.cpp.
References GetEnchantmentId(), ItemTemplate::GetItemLimitCategory(), MAX_GEM_SOCKETS, sObjectMgr, SOCK_ENCHANTMENT_SLOT, SpellItemEnchantmentEntry::SrcItemID, and sSpellItemEnchantmentStore.
Referenced by Player::CanEquipUniqueItem(), and Player::HasGemWithLimitCategoryEquipped().
|
inline |
Definition at line 84 of file Item.h.
References Object::GetGuidValue(), and ITEM_FIELD_GIFTCREATOR.
Referenced by CloneItem().
|
inline |
Definition at line 201 of file Item.h.
References ItemTemplate::GetBaseItemLevel().
Referenced by Player::GetAverageItemLevel().
|
inline |
Definition at line 157 of file Item.h.
References Object::GetInt32Value(), and ITEM_FIELD_RANDOM_PROPERTIES_ID.
Referenced by Player::ApplyEnchantment(), AuctionEntry::BuildAuctionInfo(), AuctionEntry::BuildAuctionMailSubject(), AuctionHouseObject::BuildListAuctionItems(), CloneItem(), WorldPackets::Inspect::InspectItemData::InspectItemData(), LoadFromDB(), WorldPackets::Mail::MailAttachedItem::MailAttachedItem(), SaveToDB(), AuctionHouseMgr::SendAuctionCancelledToBidderMail(), and Player::SendNewItem().
|
inline |
Definition at line 158 of file Item.h.
References Object::GetUInt32Value(), and ITEM_FIELD_PROPERTY_SEED.
Referenced by Player::ApplyEnchantment(), AuctionEntry::BuildAuctionInfo(), WorldPackets::Inspect::InspectItemData::InspectItemData(), WorldPackets::Mail::MailAttachedItem::MailAttachedItem(), Player::RemoveItem(), Player::SendNewItem(), SetItemRandomProperties(), and UpdateItemSuffixFactor().
|
inline |
Definition at line 138 of file Item.h.
References ItemTemplate::GetMaxStackSize().
Referenced by Guild::BankMoveItemData::_ReserveSpace(), Guild::BankMoveItemData::CanStore(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleWrapItemOpcode(), and Spell::TakeAmmo().
|
overridevirtual |
Implements Object.
Definition at line 297 of file Item.cpp.
References ItemTemplate::GetName(), and GetTemplate().
Referenced by Spell::EffectEnchantItemPerm(), Spell::EffectEnchantItemPrismatic(), Spell::EffectEnchantItemTmp(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleMailTakeItem(), WorldSession::moveItems(), and AuctionHouseMgr::SendAuctionWonMail().
| Player * Item::GetOwner | ( | ) | const |
Definition at line 546 of file Item.cpp.
References ObjectAccessor::FindPlayer(), and GetOwnerGUID().
Referenced by AddToObjectUpdate(), BuildUpdate(), CanBeTraded(), Spell::CheckItems(), CheckSoulboundTradeExpire(), ClearEnchantment(), Spell::EffectEnchantItemPerm(), Spell::EffectEnchantItemPrismatic(), Spell::EffectEnchantItemTmp(), Spell::EffectOpenLock(), RemoveFromObjectUpdate(), SendUpdateSockets(), SetCount(), SetEnchantment(), SetEnchantmentCharges(), and SetItemRandomProperties().
|
inline |
Definition at line 78 of file Item.h.
References Object::GetGuidValue(), and ITEM_FIELD_OWNER.
Referenced by Spell::CheckItems(), Spell::EffectSummonChangeItem(), GetDebugInfo(), GetOwner(), debug_commandscript::HandleDebugGetItemStateCommand(), WorldSession::HandleSellItemOpcode(), WorldSession::HandleWrapItemOpcode(), IsBindedNotWith(), Player::MoveItemToInventory(), SaveToDB(), SetEnchantment(), Bag::StoreItem(), and Player::UpdateSoulboundTradeItems().
|
inline |
Definition at line 212 of file Item.h.
Referenced by Player::RefundItem(), SaveRefundDataToDB(), and Player::SendRefundInfo().
|
inline |
Definition at line 211 of file Item.h.
Referenced by Player::RefundItem(), SaveRefundDataToDB(), Player::SendItemRefundResult(), and Player::SendRefundInfo().
| uint32 Item::GetPlayedTime | ( | ) |
Definition at line 1250 of file Item.cpp.
References GameTime::GetGameTime(), Object::GetUInt32Value(), ITEM_FIELD_CREATE_PLAYED_TIME, and m_lastPlayedTimeUpdate.
Referenced by Player::_LoadItem(), IsRefundExpired(), and Player::SendRefundInfo().
|
inline |
Definition at line 147 of file Item.h.
Referenced by CanBeTraded(), Spell::EffectSummonChangeItem(), WorldSession::HandleAutoBankItemOpcode(), WorldSession::HandleAutoEquipItemOpcode(), WorldSession::HandleAutoEquipItemSlotOpcode(), WorldSession::HandleAutoStoreBagItemOpcode(), WorldSession::HandleEquipmentSetUse(), WorldSession::HandleOpenItemOpcode(), and WorldSession::HandleRepairItemOpcode().
|
inline |
Definition at line 189 of file Item.h.
Referenced by debug_commandscript::HandleDebugGetItemStateCommand().
|
inline |
Definition at line 210 of file Item.h.
Referenced by Player::RefundItem(), SaveRefundDataToDB(), and Player::SendRefundInfo().
|
inline |
Definition at line 228 of file Item.h.
References ItemTemplate::ScriptId.
Referenced by ScriptMgr::OnCastItemCombatSpell(), ScriptMgr::OnItemRemove(), ScriptMgr::OnItemUse(), and ScriptMgr::OnQuestAccept().
| uint32 Item::GetSellPrice | ( | bool | forVendor = false | ) | const |
Definition at line 1148 of file Item.cpp.
References CalculateDurabilityRepairCost(), ItemTemplate::Effects, GetSellPrice(), GetSpellCharges(), and GetTemplate().
Referenced by Player::AddItemToBuyBackSlot(), AuctionHouseMgr::GetAuctionDeposit(), GetSellPrice(), WorldSession::HandleSellItemOpcode(), AuctionBotBuyer::RollBidChance(), and AuctionBotBuyer::RollBuyChance().
|
static |
Definition at line 1170 of file Item.cpp.
References ItemTemplate::GetSellPrice().
| uint32 Item::GetSkill | ( | ) |
Definition at line 552 of file Item.cpp.
References ItemTemplate::GetSkill(), and GetTemplate().
Referenced by Player::CanUseItem(), Player::GetBaseWeaponSkillValue(), Unit::GetWeaponSkillValue(), and Player::UpdateWeaponSkill().
|
inline |
Definition at line 143 of file Item.h.
Referenced by Player::_SaveInventory(), Player::AddQuestAndCheckCompletion(), Player::ApplyEnchantment(), Player::CanBankItem(), spell_sha_flametongue_weapon::CheckProc(), spell_sha_windfury_weapon::CheckProc(), Player::DestroyItemCount(), WorldSession::DoLootRelease(), Player::DurabilityPointsLoss(), Spell::EffectSummonChangeItem(), GetBagSlot(), GetDebugInfo(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleAutoEquipItemOpcode(), debug_commandscript::HandleDebugGetItemStateCommand(), debug_commandscript::HandleDebugItemExpireCommand(), WorldSession::HandleOpenWrappedItemCallback(), WorldSession::HandleSellItemOpcode(), WorldSession::HandleSocketOpcode(), WorldSession::HandleTurnInPetitionOpcode(), Player::RefundItem(), Player::SendNewItem(), UpdateDuration(), and Bag::~Bag().
| uint32 Item::GetSpell | ( | ) |
Definition at line 558 of file Item.cpp.
References ItemTemplate::GetClass(), ItemTemplate::GetSubClass(), GetTemplate(), ITEM_CLASS_ARMOR, ITEM_CLASS_WEAPON, ITEM_SUBCLASS_ARMOR_CLOTH, ITEM_SUBCLASS_ARMOR_LEATHER, ITEM_SUBCLASS_ARMOR_MAIL, ITEM_SUBCLASS_ARMOR_PLATE, ITEM_SUBCLASS_ARMOR_SHIELD, ITEM_SUBCLASS_WEAPON_AXE, ITEM_SUBCLASS_WEAPON_AXE2, ITEM_SUBCLASS_WEAPON_BOW, ITEM_SUBCLASS_WEAPON_CROSSBOW, ITEM_SUBCLASS_WEAPON_DAGGER, ITEM_SUBCLASS_WEAPON_GUN, ITEM_SUBCLASS_WEAPON_MACE, ITEM_SUBCLASS_WEAPON_MACE2, ITEM_SUBCLASS_WEAPON_POLEARM, ITEM_SUBCLASS_WEAPON_SPEAR, ITEM_SUBCLASS_WEAPON_STAFF, ITEM_SUBCLASS_WEAPON_SWORD, ITEM_SUBCLASS_WEAPON_SWORD2, ITEM_SUBCLASS_WEAPON_THROWN, and ITEM_SUBCLASS_WEAPON_WAND.
Definition at line 179 of file Item.h.
References Object::GetInt32Value(), and ITEM_FIELD_SPELL_CHARGES.
Referenced by AuctionEntry::BuildAuctionInfo(), Spell::CheckItems(), GetSellPrice(), WorldPackets::Mail::MailAttachedItem::MailAttachedItem(), SaveToDB(), and Spell::TakeCastItem().
|
inline |
Definition at line 186 of file Item.h.
Referenced by Player::_SaveInventory(), debug_commandscript::HandleDebugGetItemStateCommand(), and WorldSession::HandleWrapItemOpcode().
| 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().
| bool Item::HasEnchantRequiredSkill | ( | Player const * | player | ) | const |
Definition at line 799 of file Item.cpp.
References GetEnchantmentId(), Player::GetSkillValue(), MAX_ENCHANTMENT_SLOT, PERM_ENCHANTMENT_SLOT, and sSpellItemEnchantmentStore.
|
inlineoverridevirtual |
|
inline |
Definition at line 91 of file Item.h.
References Object::HasFlag(), and ITEM_FIELD_FLAGS.
|
inlineoverridevirtual |
Reimplemented from Object.
Definition at line 195 of file Item.h.
References ItemTemplate::GetStartQuest().
|
inline |
Definition at line 199 of file Item.h.
References ItemTemplate::IsArmorVellum().
Referenced by Spell::CheckItems(), and Spell::EffectEnchantItemPerm().
|
inline |
Definition at line 117 of file Item.h.
References ItemTemplate::GetInventoryType(), and INVTYPE_BAG.
Referenced by Player::CanBankItem(), CanBeTraded(), WorldSession::HandleAutoEquipItemOpcode(), WorldSession::HandleWrapItemOpcode(), and Player::SwapItem().
| bool Item::IsBindedNotWith | ( | Player const * | player | ) | const |
Definition at line 1093 of file Item.cpp.
References allowedGUIDs, Object::GetGUID(), GetOwnerGUID(), IsBOPTradeable(), IsBoundAccountWide(), and IsSoulBound().
Referenced by Player::CanBankItem(), Player::CanEquipItem(), Player::CanStoreItem(), Player::CanStoreItems(), Player::CanUseItem(), and WorldSession::HandleSetTradeItemOpcode().
|
inline |
Definition at line 114 of file Item.h.
References ITEM_FIELD_FLAG_BOP_TRADEABLE.
Referenced by Player::_LoadItem(), CanBeTraded(), IsBindedNotWith(), and Player::MoveItemToInventory().
|
inline |
Definition at line 97 of file Item.h.
References ItemTemplate::HasFlag(), and ITEM_FLAG_IS_BOUND_TO_ACCOUNT.
Referenced by CanBeTraded(), WorldSession::HandleSendMail(), and IsBindedNotWith().
| bool Item::IsBoundByEnchant | ( | ) | const |
Definition at line 825 of file Item.cpp.
References ENCHANTMENT_CAN_SOULBOUND, GetEnchantmentId(), MAX_ENCHANTMENT_SLOT, PERM_ENCHANTMENT_SLOT, and sSpellItemEnchantmentStore.
Referenced by CanBeTraded().
|
inline |
Definition at line 120 of file Item.h.
References Object::GetUInt32Value(), ITEM_FIELD_DURABILITY, and ITEM_FIELD_MAXDURABILITY.
Referenced by Player::_ApplyItemMods(), Player::ApplyEnchantment(), Player::CheckAmmoCompatibility(), Spell::CheckItems(), Player::DurabilityRepair(), Player::EnchantmentFitsRequirements(), Aura::GetProcEffectMask(), Player::GetShield(), Unit::GetUnitBlockChance(), Player::GetWeaponForAttack(), Player::SetRegularAttackTime(), and Spell::TakeAmmo().
|
inline |
Definition at line 200 of file Item.h.
References ItemTemplate::IsConjuredConsumable().
|
inline |
Definition at line 118 of file Item.h.
References ItemTemplate::IsCurrencyToken().
| bool Item::IsEquipped | ( | ) | const |
Definition at line 722 of file Item.cpp.
References EQUIPMENT_SLOT_END, IsInBag(), and m_slot.
Referenced by Player::ApplyEnchantment(), Player::CanEquipUniqueItem(), spell_sha_flametongue_weapon::CheckProc(), spell_sha_windfury_weapon::CheckProc(), Player::DurabilityPointsLoss(), Spell::EffectEnchantHeldItem(), GetDebugInfo(), WorldSession::HandleSocketOpcode(), WorldSession::HandleUseItemOpcode(), and WorldSession::HandleWrapItemOpcode().
| bool Item::IsFitToSpellRequirements | ( | SpellInfo const * | spellInfo | ) | const |
Definition at line 853 of file Item.cpp.
References SpellInfo::EquippedItemClass, SpellInfo::EquippedItemInventoryTypeMask, SpellInfo::EquippedItemSubClassMask, ItemTemplate::GetClass(), ItemTemplate::GetInventoryType(), ItemTemplate::GetSubClass(), GetTemplate(), SpellInfo::HasEffect(), INVTYPE_WEAPON, INVTYPE_WEAPONMAINHAND, INVTYPE_WEAPONOFFHAND, ItemTemplate::IsArmorVellum(), ItemTemplate::IsWeaponVellum(), ITEM_CLASS_ARMOR, ITEM_CLASS_WEAPON, SPELL_EFFECT_ENCHANT_ITEM, SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC, and SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY.
Referenced by Player::CheckAttackFitToAuraRequirement(), Spell::CheckItems(), Aura::GetProcEffectMask(), Player::HasItemFitToSpellRequirements(), and SpellInfo::IsItemFitToSpellRequirements().
|
inline |
Definition at line 150 of file Item.h.
Referenced by IsEquipped().
|
inline |
Definition at line 125 of file Item.h.
Referenced by Player::CanStoreItems(), and Player::HasItemCount().
|
inline |
Definition at line 188 of file Item.h.
Referenced by debug_commandscript::HandleDebugGetItemStateCommand().
Definition at line 1019 of file Item.cpp.
References ItemTemplate::GetArea(), ItemTemplate::GetMap(), and GetTemplate().
Referenced by Player::_LoadItem().
|
inline |
Definition at line 116 of file Item.h.
References ITEM_FIELD_FLAG_UNLOCKED.
Referenced by Spell::CheckCast(), WorldSession::HandleOpenItemOpcode(), and WorldPackets::Mail::MailAttachedItem::MailAttachedItem().
| bool Item::IsNotEmptyBag | ( | ) | const |
Definition at line 304 of file Item.cpp.
References ToBag().
Referenced by Player::CanBankItem(), Player::CanStoreItem(), Player::CanStoreItem_InBag(), Player::CanStoreItem_InInventorySlots(), Player::CanStoreItem_InSpecificSlot(), Player::CanUnequipItem(), Player::DestroyItem(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleSellItemOpcode(), and WorldSession::HandleSendMail().
|
inline |
Definition at line 197 of file Item.h.
References ItemTemplate::IsPotion().
Referenced by Spell::CheckCast().
|
inline |
Definition at line 113 of file Item.h.
References ITEM_FIELD_FLAG_REFUNDABLE.
Referenced by Player::_LoadItem(), WorldSession::HandleSellItemOpcode(), Player::RefundItem(), Player::SendRefundInfo(), and SetNotRefundable().
| bool Item::IsRefundExpired | ( | ) |
Definition at line 1257 of file Item.cpp.
References GetPlayedTime(), and HOUR.
Referenced by Player::RefundItem().
|
inline |
Definition at line 96 of file Item.h.
References ITEM_FIELD_FLAG_SOULBOUND.
Referenced by Player::_LoadItem(), CanBeTraded(), Guild::BankMoveItemData::CanStore(), WorldSession::HandleSendMail(), WorldSession::HandleUseItemOpcode(), WorldSession::HandleWrapItemOpcode(), IsBindedNotWith(), LoadFromDB(), and Player::StoreNewItem().
|
inline |
Definition at line 198 of file Item.h.
References ItemTemplate::IsWeaponVellum().
Referenced by Spell::CheckItems(), and Spell::EffectEnchantItemPerm().
|
inline |
Definition at line 115 of file Item.h.
References ITEM_FIELD_FLAG_WRAPPED.
Referenced by Player::DestroyItem(), WorldSession::HandleOpenItemOpcode(), WorldSession::HandleOpenWrappedItemCallback(), WorldSession::HandleSendMail(), LoadFromDB(), and SaveToDB().
|
virtual |
Reimplemented in Bag.
Definition at line 415 of file Item.cpp.
References Object::_Create(), Object::_LoadIntoDataField(), CHAR_UPD_ITEM_INSTANCE_ON_LOAD, CharacterDatabase, ItemTemplate::GetBonding(), ItemTemplate::GetDuration(), Object::GetEntry(), Object::GetGUID(), GetItemRandomPropertyId(), GetTemplate(), Field::GetUInt16(), Field::GetUInt32(), Object::GetUInt32Value(), ObjectGuid::IsEmpty(), IsSoulBound(), IsWrapped(), ITEM_FIELD_DURABILITY, ITEM_FIELD_DURATION, ITEM_FIELD_ENCHANTMENT_1_1, ITEM_FIELD_FLAG_SOULBOUND, ITEM_FIELD_FLAGS, ITEM_FIELD_RANDOM_PROPERTIES_ID, MAX_ENCHANTMENT_OFFSET, MAX_ENCHANTMENT_SLOT, MAX_ITEM_PROTO_SPELLS, ItemTemplate::MaxDurability, NO_BIND, RemoveItemFlag(), ReplaceAllItemFlags(), SetCount(), SetCreatePlayedTime(), SetCreator(), SetDurability(), Object::SetEntry(), SetExpiration(), SetGiftCreator(), Object::SetInt32Value(), SetMaxDurability(), Object::SetObjectScale(), SetOwnerGUID(), SetSpellCharges(), SetText(), PreparedStatementBase::setUInt32(), TC_LOG_ERROR, TC_LOG_WARN, Trinity::Tokenize(), and UpdateItemSuffixFactor().
Referenced by Player::_LoadItem(), Player::_LoadMailedItem(), AuctionHouseMgr::LoadAuctionItems(), Bag::LoadFromDB(), and Guild::BankTab::LoadItemFromDB().
|
overridevirtual |
|
inline |
Definition at line 93 of file Item.h.
References flags, ITEM_FIELD_FLAGS, and Object::RemoveFlag().
Referenced by Player::_LoadItem(), ClearSoulboundTradeable(), LoadFromDB(), and SetNotRefundable().
|
inline |
Definition at line 94 of file Item.h.
References flags, ITEM_FIELD_FLAGS, and Object::SetUInt32Value().
Referenced by CloneItem(), WorldSession::HandleOpenWrappedItemCallback(), WorldSession::HandleWrapItemOpcode(), and LoadFromDB().
| void Item::SaveRefundDataToDB | ( | ) |
Definition at line 1175 of file Item.cpp.
References CHAR_DEL_ITEM_REFUND_INSTANCE, CHAR_INS_ITEM_REFUND_INSTANCE, CharacterDatabase, Object::GetGUID(), GetPaidExtendedCost(), GetPaidMoney(), GetRefundRecipient(), PreparedStatementBase::setUInt16(), and PreparedStatementBase::setUInt32().
Referenced by Player::_StoreOrEquipNewItem().
|
virtual |
Reimplemented in Bag.
Definition at line 329 of file Item.cpp.
References CHAR_DEL_GIFT, CHAR_DEL_ITEM_INSTANCE, CHAR_REP_ITEM_INSTANCE, CHAR_UPD_GIFT_OWNER, CHAR_UPD_ITEM_INSTANCE, CharacterDatabase, GetCount(), ObjectGuid::GetCounter(), GetEnchantmentCharges(), GetEnchantmentDuration(), GetEnchantmentId(), Object::GetEntry(), Object::GetGUID(), Object::GetGuidValue(), GetItemRandomPropertyId(), GetOwnerGUID(), GetSpellCharges(), Object::GetUInt32Value(), Loot::isLooted(), IsWrapped(), ITEM_CHANGED, ITEM_FIELD_CREATE_PLAYED_TIME, ITEM_FIELD_CREATOR, ITEM_FIELD_DURABILITY, ITEM_FIELD_DURATION, ITEM_FIELD_FLAGS, ITEM_FIELD_GIFTCREATOR, ITEM_NEW, ITEM_REMOVED, ITEM_UNCHANGED, loot, m_text, MAX_ENCHANTMENT_SLOT, MAX_ITEM_PROTO_SPELLS, PreparedStatementBase::setInt16(), SetState(), PreparedStatementBase::setString(), PreparedStatementBase::setUInt16(), PreparedStatementBase::setUInt32(), sLootItemStorage, and uState.
Referenced by Player::_LoadItem(), Player::_LoadMailedItem(), Player::_SaveInventory(), AuctionBotSeller::AddNewAuctions(), Player::AutoUnequipOffhandIfNeed(), AchievementMgr::CompletedAchievement(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleWrapItemOpcode(), Bag::SaveToDB(), MailDraft::SendReturnToSender(), and Guild::BankTab::SetItem().
| void Item::SendTimeUpdate | ( | Player * | owner | ) |
Definition at line 1038 of file Item.cpp.
References WorldPackets::Item::ItemTimeUpdate::DurationLeft, Object::GetGUID(), Object::GetUInt32Value(), ITEM_FIELD_DURATION, WorldPackets::Item::ItemTimeUpdate::ItemGuid, Player::SendDirectMessage(), and WorldPackets::Item::ItemTimeUpdate::Write().
Referenced by Player::AddItemDurations().
| void Item::SendUpdateSockets | ( | ) |
Definition at line 1025 of file Item.cpp.
References BONUS_ENCHANTMENT_SLOT, GetEnchantmentId(), Object::GetGUID(), GetOwner(), Player::SendDirectMessage(), SMSG_SOCKET_GEMS_RESULT, and SOCK_ENCHANTMENT_SLOT.
Referenced by WorldSession::HandleSocketOpcode().
|
inline |
Definition at line 90 of file Item.h.
References Object::ApplyModFlag(), ITEM_FIELD_FLAG_SOULBOUND, and ITEM_FIELD_FLAGS.
Referenced by Player::_StoreItem(), misc_commandscript::HandleAddItemCommand(), misc_commandscript::HandleAddItemSetCommand(), misc_commandscript::HandleAddItemToCommand(), WorldSession::HandleUseItemOpcode(), and Player::VisualizeItem().
|
inline |
Definition at line 81 of file Item.h.
References ITEM_FIELD_CONTAINED, and Object::SetGuidValue().
Referenced by Player::_StoreItem(), Create(), Bag::Create(), Player::DestroyItem(), Player::RemoveItem(), Guild::BankTab::SetItem(), Bag::StoreItem(), and Player::VisualizeItem().
|
inline |
Definition at line 148 of file Item.h.
Referenced by Player::_StoreItem(), Bag::RemoveItem(), Bag::StoreItem(), and Player::VisualizeItem().
| void Item::SetCount | ( | uint32 | value | ) |
Definition at line 1293 of file Item.cpp.
References Object::GetGUID(), GetOwner(), ITEM_FIELD_STACK_COUNT, Object::SetUInt32Value(), and TRADE_SLOT_INVALID.
Referenced by Guild::BankMoveItemData::_StoreItem(), Player::_StoreItem(), Create(), Bag::Create(), CreateItem(), Player::DestroyItemCount(), Spell::EffectScriptEffect(), Player::EquipItem(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleSellItemOpcode(), LoadFromDB(), Player::SplitItem(), and Player::SwapItem().
|
inline |
Definition at line 176 of file Item.h.
References ITEM_FIELD_CREATE_PLAYED_TIME, and Object::SetUInt32Value().
Referenced by Create(), LoadFromDB(), WorldSession::moveItems(), Player::StoreNewItem(), and UpdatePlayedTime().
|
inline |
Definition at line 83 of file Item.h.
References ITEM_FIELD_CREATOR, and Object::SetGuidValue().
Referenced by CloneItem(), Spell::DoCreateItem(), WorldSession::HandleMailCreateTextItem(), and LoadFromDB().
|
inline |
Definition at line 121 of file Item.h.
References ITEM_FIELD_DURABILITY, and Object::SetUInt32Value().
Referenced by Create(), Bag::Create(), Player::DurabilityPointsLoss(), Player::DurabilityRepair(), and LoadFromDB().
| void Item::SetEnchantment | ( | EnchantmentSlot | slot, |
| uint32 | id, | ||
| uint32 | duration, | ||
| uint32 | charges, | ||
| ObjectGuid | caster = ObjectGuid::Empty |
||
| ) |
Definition at line 889 of file Item.cpp.
References ObjectGuid::Empty, ENCHANTMENT_CHARGES_OFFSET, ENCHANTMENT_DURATION_OFFSET, ENCHANTMENT_ID_OFFSET, GetEnchantmentCharges(), GetEnchantmentDuration(), GetEnchantmentId(), Object::GetEntry(), GetOwner(), GetOwnerGUID(), Player::GetSession(), ITEM_CHANGED, ITEM_FIELD_ENCHANTMENT_1_1, MAX_ENCHANTMENT_OFFSET, MAX_INSPECTED_ENCHANTMENT_SLOT, WorldSession::SendEnchantmentLog(), SetState(), and Object::SetUInt32Value().
Referenced by Spell::EffectEnchantHeldItem(), Spell::EffectEnchantItemPerm(), Spell::EffectEnchantItemPrismatic(), Spell::EffectEnchantItemTmp(), Spell::EffectSummonChangeItem(), WorldSession::HandleSocketOpcode(), and SetItemRandomProperties().
| void Item::SetEnchantmentCharges | ( | EnchantmentSlot | slot, |
| uint32 | charges | ||
| ) |
Definition at line 921 of file Item.cpp.
References ENCHANTMENT_CHARGES_OFFSET, GetEnchantmentCharges(), GetOwner(), ITEM_CHANGED, ITEM_FIELD_ENCHANTMENT_1_1, MAX_ENCHANTMENT_OFFSET, SetState(), and Object::SetUInt32Value().
Referenced by Player::SetVirtualItemSlot().
| void Item::SetEnchantmentDuration | ( | EnchantmentSlot | slot, |
| uint32 | duration, | ||
| Player * | owner | ||
| ) |
Definition at line 911 of file Item.cpp.
References ENCHANTMENT_DURATION_OFFSET, GetEnchantmentDuration(), ITEM_CHANGED, ITEM_FIELD_ENCHANTMENT_1_1, MAX_ENCHANTMENT_OFFSET, SetState(), and Object::SetUInt32Value().
Referenced by Player::RemoveEnchantmentDurations().
|
inline |
Definition at line 88 of file Item.h.
References ITEM_FIELD_DURATION, and Object::SetUInt32Value().
Referenced by CloneItem(), Create(), LoadFromDB(), and UpdateDuration().
|
inline |
Definition at line 85 of file Item.h.
References ITEM_FIELD_GIFTCREATOR, and Object::SetGuidValue().
Referenced by CloneItem(), WorldSession::HandleAcceptTradeOpcode(), WorldSession::HandleOpenWrappedItemCallback(), WorldSession::HandleWrapItemOpcode(), and LoadFromDB().
|
inline |
Definition at line 124 of file Item.h.
Referenced by clearAcceptTradeMode(), and setAcceptTradeMode().
|
inline |
Definition at line 92 of file Item.h.
References flags, ITEM_FIELD_FLAGS, and Object::SetFlag().
Referenced by Player::_StoreOrEquipNewItem(), Spell::EffectOpenLock(), WorldSession::HandleMailCreateTextItem(), and SetSoulboundTradeable().
| void Item::SetItemRandomProperties | ( | int32 | randomPropId | ) |
Definition at line 598 of file Item.cpp.
References ItemRandomPropertiesEntry::Enchantment, ItemRandomSuffixEntry::Enchantment, Object::GetInt32Value(), GetItemSuffixFactor(), GetOwner(), ItemRandomPropertiesEntry::ID, ItemRandomSuffixEntry::ID, ITEM_CHANGED, ITEM_FIELD_RANDOM_PROPERTIES_ID, PROP_ENCHANTMENT_SLOT_0, PROP_ENCHANTMENT_SLOT_2, SetEnchantment(), Object::SetInt32Value(), SetState(), sItemRandomPropertiesStore, sItemRandomSuffixStore, and UpdateItemSuffixFactor().
Referenced by AuctionBotSeller::AddNewAuctions(), CloneItem(), and Player::StoreNewItem().
|
inline |
Definition at line 122 of file Item.h.
References ITEM_FIELD_MAXDURABILITY, and Object::SetUInt32Value().
Referenced by Create(), Bag::Create(), WorldSession::HandleOpenWrappedItemCallback(), and LoadFromDB().
| void Item::SetNotRefundable | ( | Player * | owner, |
| bool | changestate = true, |
||
| CharacterDatabaseTransaction * | trans = nullptr |
||
| ) |
Definition at line 1204 of file Item.cpp.
References DeleteRefundDataFromDB(), Player::DeleteRefundReference(), ObjectGuid::Empty, Object::GetGUID(), IsRefundable(), ITEM_CHANGED, ITEM_FIELD_FLAG_REFUNDABLE, RemoveItemFlag(), SetPaidExtendedCost(), SetPaidMoney(), SetRefundRecipient(), and SetState().
Referenced by Player::_StoreItem(), Player::DestroyItem(), Player::EquipItem(), Player::RefundItem(), Player::SendRefundInfo(), and UpdatePlayedTime().
|
inline |
Definition at line 79 of file Item.h.
References ITEM_FIELD_OWNER, and Object::SetGuidValue().
Referenced by Player::_StoreItem(), Create(), Bag::Create(), Player::EquipItem(), LoadFromDB(), Player::MoveItemToInventory(), Guild::BankTab::SetItem(), Bag::StoreItem(), and Player::VisualizeItem().
|
inline |
Definition at line 208 of file Item.h.
Referenced by Player::_LoadItem(), Player::_StoreOrEquipNewItem(), and SetNotRefundable().
|
inline |
Definition at line 207 of file Item.h.
Referenced by Player::_LoadItem(), Player::_StoreOrEquipNewItem(), and SetNotRefundable().
|
inline |
Definition at line 235 of file Item.h.
References ITEM_FIELD_ENCHANTMENT_1_1, and Object::SetUInt32Value().
Referenced by WorldSession::HandlePetitionBuyOpcode().
|
inline |
Definition at line 236 of file Item.h.
References ITEM_FIELD_ENCHANTMENT_1_1, and Object::SetUInt32Value().
|
inline |
Definition at line 206 of file Item.h.
Referenced by Player::_LoadItem(), Player::_StoreOrEquipNewItem(), and SetNotRefundable().
|
inline |
Definition at line 146 of file Item.h.
Referenced by Player::_StoreItem(), Player::DestroyItem(), Player::RemoveItem(), Bag::StoreItem(), and Player::VisualizeItem().
| 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().
Definition at line 180 of file Item.h.
References ITEM_FIELD_SPELL_CHARGES, and Object::SetInt32Value().
Referenced by Create(), LoadFromDB(), and Spell::TakeCastItem().
| void Item::SetState | ( | ItemUpdateState | state, |
| Player * | forplayer = nullptr |
||
| ) |
Definition at line 644 of file Item.cpp.
References AddItemToUpdateQueueOf, Player::DeleteRefundReference(), Object::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::EffectOpenLock(), Player::EquipItem(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleMailTakeItem(), WorldSession::HandleOpenWrappedItemCallback(), WorldSession::HandlePetitionBuyOpcode(), WorldSession::HandleSellItemOpcode(), WorldSession::HandleUseItemOpcode(), WorldSession::HandleWrapItemOpcode(), Player::MoveItemToInventory(), Player::RemoveItemFromBuyBackSlot(), SaveToDB(), SetEnchantment(), SetEnchantmentCharges(), SetEnchantmentDuration(), SetItemRandomProperties(), SetNotRefundable(), Player::SplitItem(), Player::SwapItem(), Spell::TakeCastItem(), UpdateDuration(), UpdatePlayedTime(), and Player::VisualizeItem().
|
inline |
Definition at line 170 of file Item.h.
Referenced by WorldSession::HandleMailCreateTextItem(), and LoadFromDB().
|
inline |
Definition at line 110 of file Item.h.
Referenced by Player::_LoadInventory(), CanBeTraded(), Player::GetBagByPos(), debug_commandscript::HandleDebugGetItemStateCommand(), IsNotEmptyBag(), and Player::SwapItem().
Definition at line 311 of file Item.cpp.
References Player::DestroyItem(), GetBagSlot(), Object::GetEntry(), GetSlot(), GetTemplate(), Object::GetUInt32Value(), ITEM_CHANGED, ITEM_FIELD_DURATION, SetExpiration(), SetState(), sScriptMgr, and TC_LOG_DEBUG.
Referenced by Player::UpdateItemDuration().
| void Item::UpdateItemSuffixFactor | ( | ) |
Definition at line 636 of file Item.cpp.
References GenerateEnchSuffixFactor(), Object::GetEntry(), GetItemSuffixFactor(), ITEM_FIELD_PROPERTY_SEED, and Object::SetUInt32Value().
Referenced by LoadFromDB(), and SetItemRandomProperties().
| void Item::UpdatePlayedTime | ( | Player * | owner | ) |
Definition at line 1222 of file Item.cpp.
References GameTime::GetGameTime(), Object::GetUInt32Value(), HOUR, ITEM_CHANGED, ITEM_FIELD_CREATE_PLAYED_TIME, m_lastPlayedTimeUpdate, SetCreatePlayedTime(), SetNotRefundable(), and SetState().
Referenced by Player::_SaveInventory(), and Player::SendRefundInfo().
Definition at line 675 of file Item.cpp.
Referenced by SetState().
Definition at line 696 of file Item.cpp.
Referenced by SetState().
|
private |
Definition at line 250 of file Item.h.
Referenced by ClearSoulboundTradeable(), IsBindedNotWith(), and SetSoulboundTradeable().
| Loot Item::loot |
Definition at line 182 of file Item.h.
Referenced by DeleteFromDB(), WorldSession::DoLootRelease(), WorldSession::HandleAutostoreLootItemOpcode(), LootItemStorage::LoadStoredLoot(), SaveToDB(), and Player::SendLoot().
|
private |
Definition at line 242 of file Item.h.
Referenced by GetBagSlot(), and Item().
|
private |
Definition at line 246 of file Item.h.
Referenced by GetPlayedTime(), Item(), and UpdatePlayedTime().
| bool Item::m_lootGenerated |
Definition at line 183 of file Item.h.
Referenced by CanBeMergedPartlyWith(), CanBeTraded(), Player::CanStoreItems(), Player::CanTakeMoreSimilarItems(), WorldSession::DoLootRelease(), Item(), LootItemStorage::LoadStoredLoot(), Player::SendLoot(), and Player::SplitItem().
|
private |
|
private |
|
private |
Definition at line 241 of file Item.h.
Referenced by IsEquipped(), and Item().
|
private |
Definition at line 240 of file Item.h.
Referenced by SaveToDB().
|
private |
Definition at line 244 of file Item.h.
Referenced by Item(), and SetState().
|
private |
Definition at line 243 of file Item.h.
Referenced by Item(), SaveToDB(), and SetState().