AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "Item.h"
Static Public Member Functions | |
static Item * | CreateItem (uint32 item, uint32 count, Player const *player=nullptr, bool clone=false, uint32 randomPropertyId=0) |
static void | DeleteFromDB (CharacterDatabaseTransaction trans, ObjectGuid::LowType itemGuid) |
static void | DeleteFromInventoryDB (CharacterDatabaseTransaction trans, ObjectGuid::LowType itemGuid) |
static int32 | GenerateItemRandomPropertyId (uint32 item_id) |
Static Public Member Functions inherited from Object | |
static ObjectGuid | GetGUID (Object const *o) |
Public Attributes | |
Loot | loot |
bool | m_lootGenerated |
Public Attributes inherited from Object | |
DataMap | CustomData |
Private Attributes | |
std::string | m_text |
uint8 | m_slot |
Bag * | m_container |
ItemUpdateState | uState |
int32 | uQueuePos |
bool | mb_in_trade |
time_t | m_lastPlayedTimeUpdate |
uint32 | m_refundRecipient |
uint32 | m_paidMoney |
uint32 | m_paidExtendedCost |
AllowedLooterSet | allowedGUIDs |
Additional Inherited Members | |
Protected Member Functions inherited from Object | |
Object () | |
void | _InitValues () |
void | _Create (ObjectGuid::LowType guidlow, uint32 entry, HighGuid guidhigh) |
std::string | _ConcatFields (uint16 startIndex, uint16 size) const |
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 *target) |
virtual void | AddToObjectUpdate ()=0 |
virtual void | RemoveFromObjectUpdate ()=0 |
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 | ( | ) |
References GameTime::GetGameTime(), ITEM_END, ITEM_NEW, m_container, m_lastPlayedTimeUpdate, m_lootGenerated, Object::m_objectType, Object::m_objectTypeId, m_paidExtendedCost, m_paidMoney, m_refundRecipient, m_slot, Object::m_updateFlag, Object::m_valuesCount, mb_in_trade, TYPEID_ITEM, TYPEMASK_ITEM, UPDATEFLAG_LOWGUID, uQueuePos, and uState.
|
overridevirtual |
Implements Object.
References GetOwner().
void Item::AddToUpdateQueueOf | ( | Player * | player | ) |
References ASSERT, Object::GetGUID(), GetOwnerGUID(), IsInUpdateQueue(), LOG_DEBUG, Player::m_itemUpdateQueue, Player::m_itemUpdateQueueBlocked, ObjectGuid::ToString(), and uQueuePos.
Referenced by SetState().
|
overridevirtual |
Reimplemented from Object.
References Object::BuildFieldsUpdate(), Object::ClearUpdateMask(), and GetOwner().
InventoryResult Item::CanBeMergedPartlyWith | ( | ItemTemplate const * | proto | ) | const |
References EQUIP_ERR_ALREADY_LOOTED, EQUIP_ERR_ITEM_CANT_STACK, EQUIP_ERR_OK, GetCount(), Object::GetEntry(), ItemTemplate::GetMaxStackSize(), ItemTemplate::ItemId, 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 |
References EQUIP_ERR_OK, Object::GetGUID(), GetOwner(), GetPos(), IsBag(), Player::IsBagPos(), IsBOPTradable(), IsBoundAccountWide(), IsBoundByEnchant(), IsBoundByTempEnchant(), and IsSoulBound().
Referenced by WorldSession::HandleAuctionSellItem(), WorldSession::HandleSendMail(), and WorldSession::HandleSetTradeItemOpcode().
bool Item::CheckSoulboundTradeExpire | ( | ) |
References ClearSoulboundTradeable(), GetOwner(), Object::GetUInt32Value(), HOUR, and ITEM_FIELD_CREATE_PLAYED_TIME.
void Item::ClearEnchantment | ( | EnchantmentSlot | slot | ) |
References GetEnchantmentId(), GetOwner(), ITEM_CHANGED, ITEM_FIELD_ENCHANTMENT_1_1, MAX_ENCHANTMENT_OFFSET, MAX_SPELL_ITEM_ENCHANTMENT_EFFECTS, SetState(), and Object::SetUInt32Value().
Referenced by Player::CastItemCombatSpell(), WorldSession::HandleCancelTempEnchantmentOpcode(), and Player::SetVirtualItemSlot().
void Item::ClearSoulboundTradeable | ( | Player * | currentOwner | ) |
References allowedGUIDs, CHAR_DEL_ITEM_BOP_TRADE, CharacterDatabase, Object::GetGUID(), ITEM_CHANGED, ITEM_FIELD_FLAG_BOP_TRADEABLE, ITEM_FIELD_FLAGS, Object::RemoveFlag(), PreparedStatementBase::SetData(), and SetState().
Referenced by Player::_LoadItem(), Player::_StoreItem(), CheckSoulboundTradeExpire(), Player::DestroyItem(), Spell::EffectEnchantItemPerm(), Spell::EffectEnchantItemPrismatic(), Spell::EffectEnchantItemTmp(), Player::EquipItem(), and WorldSession::HandleSocketOpcode().
References CreateItem(), Object::GetEntry(), GetItemRandomPropertyId(), Object::GetUInt32Value(), ITEM_FIELD_CREATOR, ITEM_FIELD_DURATION, ITEM_FIELD_FLAG_BOP_TRADEABLE, ITEM_FIELD_FLAG_REFUNDABLE, ITEM_FIELD_FLAGS, ITEM_FIELD_GIFTCREATOR, and Object::SetUInt32Value().
Referenced by Guild::BankMoveItemData::_StoreItem(), Player::_StoreItem(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleSellItemOpcode(), and Player::SplitItem().
|
virtual |
Reimplemented in Bag.
References Object::_Create(), ItemTemplate::Duration, ObjectGuid::Empty, Object::GetGUID(), ITEM_FIELD_CONTAINED, ITEM_FIELD_CREATE_PLAYED_TIME, ITEM_FIELD_DURABILITY, ITEM_FIELD_DURATION, ITEM_FIELD_MAXDURABILITY, ITEM_FIELD_OWNER, ITEM_FIELD_STACK_COUNT, MAX_ITEM_PROTO_SPELLS, ItemTemplate::MaxDurability, Object::SetEntry(), Object::SetGuidValue(), Object::SetObjectScale(), SetSpellCharges(), Object::SetUInt32Value(), sObjectMgr, _Spell::SpellCharges, ItemTemplate::Spells, and sScriptMgr.
Referenced by CreateItem(), and WorldSession::HandleMailCreateTextItem().
|
static |
References ABORT, ASSERT_NODEBUGINFO, Create(), GenerateItemRandomPropertyId(), ItemTemplate::GetMaxStackSize(), NewItemOrBag(), SetCount(), SetItemRandomProperties(), and sObjectMgr.
Referenced by Player::CanEquipNewItem(), CloneItem(), AchievementMgr::CompletedAchievement(), Spell::EffectSummonChangeItem(), Player::EquipNewItem(), item_commandscript::HandleItemRefundCommand(), item_commandscript::HandleItemRestoreCommand(), quest_commandscript::HandleQuestComplete(), quest_commandscript::HandleQuestReward(), spell_gen_spirit_of_competition_participant::HandleScript(), spell_gen_spirit_of_competition_winner::HandleScript(), send_commandscript::HandleSendItemsCommand(), MailDraft::prepareItems(), Player::SendItemRetrievalMail(), ObjectMgr::SendServerMail(), and Player::StoreNewItem().
|
virtual |
Reimplemented in Bag.
References DeleteFromDB(), and Object::GetGUID().
|
static |
References CHAR_DEL_ITEM_INSTANCE, CharacterDatabase, PreparedStatementBase::SetData(), and sScriptMgr.
Referenced by Player::_LoadItem(), Guild::BankMoveItemData::_StoreItem(), DeleteFromDB(), Bag::DeleteFromDB(), and WorldSession::HandleAuctionSellItem().
void Item::DeleteFromInventoryDB | ( | CharacterDatabaseTransaction | trans | ) |
References DeleteFromInventoryDB(), and Object::GetGUID().
|
static |
References CHAR_DEL_CHAR_INVENTORY_BY_ITEM, CharacterDatabase, and PreparedStatementBase::SetData().
Referenced by Player::_LoadItem(), Player::AutoUnequipOffhandIfNeed(), DeleteFromInventoryDB(), WorldSession::HandleAuctionSellItem(), and WorldSession::HandleSendMail().
void Item::DeleteRefundDataFromDB | ( | CharacterDatabaseTransaction * | trans | ) |
References CHAR_DEL_ITEM_REFUND_INSTANCE, CharacterDatabase, Object::GetGUID(), and PreparedStatementBase::SetData().
Referenced by SetNotRefundable().
|
inline |
References uState.
Referenced by Player::_LoadItem(), Player::_LoadMailedItem(), Player::_SaveInventory(), and WorldSession::HandleSendMail().
bool Item::GemsFitSockets | ( | ) | const |
References _Socket::Color, GemPropertiesEntry::color, SpellItemEnchantmentEntry::GemID, ItemTemplate::GemProperties, GetEnchantmentId(), GetTemplate(), MAX_GEM_SOCKETS, sGemPropertiesStore, sObjectMgr, SOCK_ENCHANTMENT_SLOT, ItemTemplate::Socket, and sSpellItemEnchantmentStore.
Referenced by WorldSession::HandleSocketOpcode().
References GetItemEnchantMod(), ItemRandomPropertiesEntry::ID, ItemRandomSuffixEntry::ID, ItemTemplate::ItemId, LOG_ERROR, ItemTemplate::RandomProperty, ItemTemplate::RandomSuffix, sItemRandomPropertiesStore, sItemRandomSuffixStore, and sObjectMgr.
Referenced by CreateItem(), and LootItem::LootItem().
uint8 Item::GetBagSlot | ( | ) | const |
References GetSlot(), INVENTORY_SLOT_BAG_0, and m_container.
Referenced by Player::_SaveInventory(), Player::AddQuestAndCheckCompletion(), Player::DestroyItemCount(), WorldSession::DoLootRelease(), Spell::EffectSummonChangeItem(), GetDebugInfo(), GetPos(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleAutoEquipItemOpcode(), debug_commandscript::HandleDebugItemExpireCommand(), WorldSession::HandleOpenWrappedItemCallback(), WorldSession::HandleSellItemOpcode(), WorldSession::HandleTurnInPetitionOpcode(), Player::RefundItem(), Player::SendNewItem(), UpdateDuration(), and Bag::~Bag().
|
inline |
References m_container.
Referenced by Player::_SaveInventory(), and debug_commandscript::HandleDebugGetItemStateCommand().
|
inline |
References Object::GetUInt32Value(), and ITEM_FIELD_STACK_COUNT.
Referenced by Guild::_DoItemsMove(), Guild::BankMoveItemData::_ReserveSpace(), Player::_StoreItem(), 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(), Group::CountTheRoll(), Player::DestroyItem(), Player::DestroyItemCount(), WorldSession::DoLootRelease(), Spell::EffectMilling(), Spell::EffectProspecting(), Player::EquipItem(), GetDebugInfo(), Bag::GetItemCount(), Bag::GetItemCountWithLimitCategory(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleAutoBankItemOpcode(), WorldSession::HandleAutoStoreBankItemOpcode(), WorldSession::HandleBuybackItem(), WorldSession::HandleGetMailList(), WorldSession::HandleMailTakeItem(), WorldSession::HandleSellItemOpcode(), Player::HasItemCount(), Player::HasItemOrGemWithIdEquipped(), Player::HasItemOrGemWithLimitCategoryEquipped(), Player::MoveItemToInventory(), WorldSession::recoveryItem(), SaveToDB(), Player::SendNewItem(), Player::SplitItem(), Guild::BankMoveItemData::StoreItem(), and Player::SwapItem().
|
overridevirtual |
Reimplemented from Object.
References GetBagSlot(), GetCount(), Object::GetDebugInfo(), GetOwnerGUID(), GetSlot(), IsEquipped(), and ObjectGuid::ToString().
Referenced by Bag::GetDebugInfo().
|
inline |
References ENCHANTMENT_CHARGES_OFFSET, Object::GetUInt32Value(), ITEM_FIELD_ENCHANTMENT_1_1, and MAX_ENCHANTMENT_OFFSET.
Referenced by AuctionEntry::BuildAuctionInfo(), Player::CastItemCombatSpell(), Spell::EffectSummonChangeItem(), WorldSession::HandleGetMailList(), SaveToDB(), SetEnchantment(), SetEnchantmentCharges(), and Player::SetVirtualItemSlot().
|
inline |
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(), WorldSession::HandleGetMailList(), SaveToDB(), SetEnchantment(), and SetEnchantmentDuration().
|
inline |
References ENCHANTMENT_ID_OFFSET, Object::GetUInt32Value(), ITEM_FIELD_ENCHANTMENT_1_1, and MAX_ENCHANTMENT_OFFSET.
Referenced by Player::AddEnchantmentDurations(), Player::ApplyEnchantment(), AuctionEntry::BuildAuctionInfo(), Player::BuildEnchantmentsInfoData(), 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(), Unit::HandleDummyAuraProc(), WorldSession::HandleGetMailList(), WorldSession::HandleSocketOpcode(), HasEnchantRequiredSkill(), Player::HasItemOrGemWithLimitCategoryEquipped(), HasSocket(), IsBoundByEnchant(), IsBoundByTempEnchant(), SaveToDB(), SendUpdateSockets(), SetEnchantment(), Player::SetVirtualItemSlot(), Player::SetVisibleItemSlot(), Player::ToggleMetaGemsActive(), and Player::UpdateSkillEnchantments().
uint32 Item::GetEnchantRequiredLevel | ( | ) | const |
References GetEnchantmentId(), MAX_ENCHANTMENT_SLOT, PERM_ENCHANTMENT_SLOT, and sSpellItemEnchantmentStore.
References SpellItemEnchantmentEntry::GemID, GetEnchantmentId(), MAX_GEM_SOCKETS, SOCK_ENCHANTMENT_SLOT, and sSpellItemEnchantmentStore.
Referenced by Bag::GetItemCount(), and Player::HasItemOrGemWithIdEquipped().
References SpellItemEnchantmentEntry::GemID, GetEnchantmentId(), ItemTemplate::ItemLimitCategory, MAX_GEM_SOCKETS, sObjectMgr, SOCK_ENCHANTMENT_SLOT, and sSpellItemEnchantmentStore.
Referenced by Player::CanEquipUniqueItem(), and Player::HasItemOrGemWithLimitCategoryEquipped().
|
inline |
References Object::GetInt32Value(), and ITEM_FIELD_RANDOM_PROPERTIES_ID.
Referenced by Player::ApplyEnchantment(), AuctionEntry::BuildAuctionInfo(), Player::BuildEnchantmentsInfoData(), AuctionHouseObject::BuildListAuctionItems(), CloneItem(), WorldSession::HandleGetMailList(), LoadFromDB(), SaveToDB(), and Player::SendNewItem().
|
inline |
|
inline |
Player * Item::GetOwner | ( | ) | const |
References ObjectAccessor::FindPlayer(), and GetOwnerGUID().
Referenced by AddToObjectUpdate(), BuildUpdate(), CanBeTraded(), Spell::CheckItems(), CheckSoulboundTradeExpire(), ClearEnchantment(), Spell::EffectEnchantItemPerm(), Spell::EffectEnchantItemPrismatic(), Spell::EffectEnchantItemTmp(), Spell::EffectOpenLock(), RemoveFromObjectUpdate(), SendUpdateSockets(), SetEnchantment(), SetEnchantmentCharges(), and SetItemRandomProperties().
|
inline |
References Object::GetGuidValue(), and ITEM_FIELD_OWNER.
Referenced by AddToUpdateQueueOf(), Spell::CheckItems(), Spell::EffectSummonChangeItem(), GetDebugInfo(), GetOwner(), debug_commandscript::HandleDebugGetItemStateCommand(), WorldSession::HandleSellItemOpcode(), WorldSession::HandleWrapItemOpcode(), IsBindedNotWith(), Player::MoveItemToInventory(), WorldSession::recoveryItem(), RemoveFromUpdateQueueOf(), SaveToDB(), SetEnchantment(), and Bag::StoreItem().
|
inline |
References m_paidExtendedCost.
Referenced by Player::RefundItem(), SaveRefundDataToDB(), and Player::SendRefundInfo().
|
inline |
References m_paidMoney.
Referenced by Player::RefundItem(), SaveRefundDataToDB(), and Player::SendRefundInfo().
uint32 Item::GetPlayedTime | ( | ) |
References GameTime::GetGameTime(), Object::GetUInt32Value(), ITEM_FIELD_CREATE_PLAYED_TIME, and m_lastPlayedTimeUpdate.
Referenced by Player::_LoadItem(), IsRefundExpired(), and Player::SendRefundInfo().
|
inline |
References GetBagSlot(), and GetSlot().
Referenced by CanBeTraded(), Spell::EffectSummonChangeItem(), WorldSession::HandleAutoBankItemOpcode(), WorldSession::HandleAutoEquipItemOpcode(), WorldSession::HandleAutoEquipItemSlotOpcode(), WorldSession::HandleAutoStoreBagItemOpcode(), WorldSession::HandleEquipmentSetUse(), WorldSession::HandleGossipSelectOptionOpcode(), and WorldSession::HandleRepairItemOpcode().
|
inline |
|
inline |
References m_refundRecipient.
Referenced by Player::RefundItem(), SaveRefundDataToDB(), and Player::SendRefundInfo().
|
inline |
uint32 Item::GetSkill | ( | ) |
References ItemTemplate::GetSkill(), and GetTemplate().
Referenced by Player::CanUseItem(), Player::GetBaseWeaponSkillValue(), Unit::GetWeaponSkillValue(), and Player::UpdateWeaponSkill().
|
inline |
References m_slot.
Referenced by Player::_SaveInventory(), Player::AddQuestAndCheckCompletion(), Player::ApplyEnchantment(), Player::CanBankItem(), Player::CanUnequipItem(), Player::DestroyItemCount(), WorldSession::DoLootRelease(), Player::DurabilityPointsLoss(), Spell::EffectSummonChangeItem(), GetBagSlot(), GetDebugInfo(), GetPos(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleAutoEquipItemOpcode(), debug_commandscript::HandleDebugGetItemStateCommand(), debug_commandscript::HandleDebugItemExpireCommand(), Unit::HandleDummyAuraProc(), WorldSession::HandleOpenWrappedItemCallback(), WorldSession::HandleSellItemOpcode(), WorldSession::HandleSendMail(), WorldSession::HandleSocketOpcode(), WorldSession::HandleTurnInPetitionOpcode(), Player::RefundItem(), Player::SendNewItem(), UpdateDuration(), and Bag::~Bag().
uint32 Item::GetSpell | ( | ) |
References ItemTemplate::Class, 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, ITEM_SUBCLASS_WEAPON_WAND, and ItemTemplate::SubClass.
References Object::GetInt32Value(), and ITEM_FIELD_SPELL_CHARGES.
Referenced by AuctionEntry::BuildAuctionInfo(), Spell::CheckItems(), WorldSession::HandleGetMailList(), SaveToDB(), Spell::TakeCastItem(), and Spell::TakeReagents().
|
inline |
References uState.
Referenced by Player::_SaveInventory(), debug_commandscript::HandleDebugGetItemStateCommand(), WorldSession::HandleSendMail(), and WorldSession::HandleWrapItemOpcode().
ItemTemplate const * Item::GetTemplate | ( | ) | const |
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::AutoUnequipOffhandIfNeed(), AuctionHouseObject::BuildListAuctionItems(), AuraEffect::CalculateAmount(), Player::CanBankItem(), Player::CanEquipItem(), Player::CanEquipUniqueItem(), Guild::BankMoveItemData::CanStore(), Player::CanStoreItem_InBag(), Player::CanStoreItem_InSpecificSlot(), Player::CanStoreItems(), Player::CanUnequipItem(), Player::CanUseItem(), Player::CastItemUseSpell(), Player::CheckAmmoCompatibility(), Spell::CheckCast(), Spell::CheckItems(), Player::CreateCorpse(), Player::DestroyItem(), Spell::DoCreateItem(), WorldSession::DoLootRelease(), Spell::DoSpellHitOnUnit(), Player::DurabilityRepair(), Spell::EffectDisEnchant(), Spell::EffectEnchantItemPerm(), Spell::EffectFeedPet(), Spell::EffectMilling(), Spell::EffectOpenLock(), Spell::EffectProspecting(), Player::EquipItem(), EquippedOk(), GemsFitSockets(), AuctionHouseMgr::GetAuctionDeposit(), Player::GetAverageItemLevel(), Player::GetAverageItemLevelForDF(), Player::GetItemCount(), Bag::GetItemCount(), GetMaxStackCount(), GetScriptId(), Player::GetShield(), GetSkill(), GetSpell(), Unit::GetUnitBlockChance(), Player::GetWeaponForAttack(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleAutoEquipItemOpcode(), debug_commandscript::HandleDebugItemExpireCommand(), WorldSession::HandleDestroyItemOpcode(), WorldSession::HandleOpenItemOpcode(), WorldSession::HandleOpenWrappedItemCallback(), WorldSession::HandleReadItem(), WorldSession::HandleSellItemOpcode(), WorldSession::HandleSendMail(), WorldSession::HandleSocketOpcode(), WorldSession::HandleUseItemOpcode(), WorldSession::HandleWrapItemOpcode(), Player::HasItemOrGemWithIdEquipped(), Player::HasItemOrGemWithLimitCategoryEquipped(), Player::HasItemTotemCategory(), hasQuest(), HasSocket(), IsArmorVellum(), IsBag(), IsBoundAccountWide(), IsConjuredConsumable(), IsCurrencyToken(), IsFitToSpellRequirements(), IsLimitedToAnotherMapOrZone(), IsPotion(), Unit::IsTriggeredAtSpellProcEvent(), Player::IsTwoHandUsed(), IsWeaponVellum(), LoadFromDB(), Bag::LoadFromDB(), WorldSession::recoveryItem(), Player::RemoveItem(), Player::SendEquipError(), Player::SendLoot(), Player::SetRegularAttackTime(), Player::StoreItem(), Player::StoreNewItem(), Spell::SummonGuardian(), Player::SwapItem(), Spell::TakeAmmo(), Spell::TakeCastItem(), Spell::TakeReagents(), Player::ToggleMetaGemsActive(), UpdateDuration(), Player::UpdateItemDuration(), Player::UpdateWeaponSkill(), Player::VisualizeItem(), and Spell::WriteAmmoToPacket().
|
inline |
References m_text.
bool Item::HasEnchantRequiredSkill | ( | Player const * | player | ) | const |
References GetEnchantmentId(), Player::GetSkillValue(), MAX_ENCHANTMENT_SLOT, PERM_ENCHANTMENT_SLOT, and sSpellItemEnchantmentStore.
|
inlineoverridevirtual |
Reimplemented from Object.
|
inlineoverridevirtual |
bool Item::HasSocket | ( | ) | const |
References _Socket::Color, GetEnchantmentId(), GetTemplate(), PRISMATIC_ENCHANTMENT_SLOT, and ItemTemplate::Socket.
Referenced by Player::_ApplyItemMods(), Player::CorrectMetaGemEnchants(), and Player::EnchantmentFitsRequirements().
|
inline |
References GetTemplate(), and ItemTemplate::IsArmorVellum().
Referenced by Spell::CheckItems(), and Spell::EffectEnchantItemPerm().
|
inline |
bool Item::IsBindedNotWith | ( | Player const * | player | ) | const |
References allowedGUIDs, Object::GetGUID(), GetOwnerGUID(), IsBOPTradable(), IsBoundAccountWide(), and IsSoulBound().
Referenced by Player::CanBankItem(), Player::CanEquipItem(), Player::CanStoreItem(), Player::CanStoreItems(), and Player::CanUseItem().
|
inline |
References Object::HasFlag(), ITEM_FIELD_FLAG_BOP_TRADEABLE, and ITEM_FIELD_FLAGS.
Referenced by Player::_LoadItem(), CanBeTraded(), IsBindedNotWith(), and Player::MoveItemToInventory().
|
inline |
References GetTemplate(), ItemTemplate::HasFlag(), and ITEM_FLAG_IS_BOUND_TO_ACCOUNT.
Referenced by CanBeTraded(), WorldSession::HandleSendMail(), and IsBindedNotWith().
bool Item::IsBoundByEnchant | ( | ) | const |
References ENCHANTMENT_CAN_SOULBOUND, GetEnchantmentId(), MAX_ENCHANTMENT_SLOT, PERM_ENCHANTMENT_SLOT, and sSpellItemEnchantmentStore.
Referenced by CanBeTraded().
bool Item::IsBoundByTempEnchant | ( | ) | const |
References ENCHANTMENT_CAN_SOULBOUND, GetEnchantmentId(), sSpellItemEnchantmentStore, and TEMP_ENCHANTMENT_SLOT.
Referenced by CanBeTraded().
|
inline |
References Object::GetUInt32Value(), ITEM_FIELD_DURABILITY, and ITEM_FIELD_MAXDURABILITY.
Referenced by Player::_ApplyItemMods(), Player::_ApplyWeaponDependentAuraCritMod(), Player::_ApplyWeaponDependentAuraDamageMod(), Player::ApplyEnchantment(), Player::CheckAmmoCompatibility(), Spell::CheckItems(), Player::EnchantmentFitsRequirements(), Player::GetShield(), Unit::GetUnitBlockChance(), Player::GetWeaponForAttack(), Aura::IsProcTriggeredOnEvent(), Unit::IsTriggeredAtSpellProcEvent(), Player::SetRegularAttackTime(), Spell::TakeAmmo(), and Player::UpdateWeaponSkill().
|
inline |
References GetTemplate(), and ItemTemplate::IsConjuredConsumable().
|
inline |
References GetTemplate(), and ItemTemplate::IsCurrencyToken().
bool Item::IsEquipped | ( | ) | const |
References EQUIPMENT_SLOT_END, IsInBag(), and m_slot.
Referenced by Player::ApplyEnchantment(), Player::CanEquipUniqueItem(), Player::DurabilityPointsLoss(), Spell::EffectEnchantHeldItem(), GetDebugInfo(), Unit::HandleDummyAuraProc(), WorldSession::HandleEquipmentSetUse(), WorldSession::HandleSocketOpcode(), WorldSession::HandleUseItemOpcode(), and WorldSession::HandleWrapItemOpcode().
bool Item::IsFitToSpellRequirements | ( | SpellInfo const * | spellInfo | ) | const |
References ItemTemplate::Class, SpellInfo::EquippedItemClass, SpellInfo::EquippedItemInventoryTypeMask, SpellInfo::EquippedItemSubClassMask, GetTemplate(), ItemTemplate::InventoryType, INVTYPE_WEAPON, INVTYPE_WEAPONMAINHAND, INVTYPE_WEAPONOFFHAND, SpellInfo::IsAbilityOfSkillType(), ItemTemplate::IsArmorVellum(), ItemTemplate::IsWeaponVellum(), ITEM_CLASS_ARMOR, ITEM_CLASS_WEAPON, SKILL_ENCHANTING, and ItemTemplate::SubClass.
Referenced by Player::_ApplyWeaponDependentAuraCritMod(), Player::_ApplyWeaponDependentAuraDamageMod(), Spell::CheckItems(), Player::HasItemFitToSpellRequirements(), Aura::IsProcTriggeredOnEvent(), and Player::UpdateExpertise().
|
inline |
|
inline |
|
inline |
References uQueuePos.
Referenced by AddToUpdateQueueOf(), debug_commandscript::HandleDebugGetItemStateCommand(), and RemoveFromUpdateQueueOf().
References ItemTemplate::Area, GetTemplate(), and ItemTemplate::Map.
Referenced by Player::_LoadItem().
|
inline |
References Object::HasFlag(), ITEM_FIELD_FLAG_UNLOCKED, and ITEM_FIELD_FLAGS.
Referenced by Spell::CheckCast(), and WorldSession::HandleOpenItemOpcode().
bool Item::IsNotEmptyBag | ( | ) | const |
References ToBag().
Referenced by Player::CanBankItem(), Player::CanStoreItem(), Player::CanStoreItem_InBag(), Player::CanStoreItem_InInventorySlots(), Player::CanUnequipItem(), Player::DestroyItem(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleSellItemOpcode(), WorldSession::HandleSendMail(), and Player::SwapItem().
|
inline |
References GetTemplate(), and ItemTemplate::IsPotion().
Referenced by Spell::CheckCast(), and Spell::SendSpellCooldown().
|
inline |
References Object::HasFlag(), ITEM_FIELD_FLAG_REFUNDABLE, and ITEM_FIELD_FLAGS.
Referenced by Player::_LoadItem(), WorldSession::HandleSellItemOpcode(), Player::RefundItem(), Player::SendRefundInfo(), and SetNotRefundable().
bool Item::IsRefundExpired | ( | ) |
|
inline |
References Object::HasFlag(), ITEM_FIELD_FLAG_SOULBOUND, and ITEM_FIELD_FLAGS.
Referenced by Player::_LoadItem(), CanBeTraded(), Guild::BankMoveItemData::CanStore(), WorldSession::HandleSendMail(), WorldSession::HandleUseItemOpcode(), WorldSession::HandleWrapItemOpcode(), IsBindedNotWith(), LoadFromDB(), and Player::StoreNewItem().
|
inline |
References GetTemplate(), and ItemTemplate::IsWeaponVellum().
Referenced by Spell::CheckItems(), and Spell::EffectEnchantItemPerm().
|
inline |
|
virtual |
Reimplemented in Bag.
References Object::_Create(), Object::_LoadIntoDataField(), Object::ApplyModFlag(), ItemTemplate::Bonding, CHAR_UPD_ITEM_INSTANCE_ON_LOAD, CharacterDatabase, ItemTemplate::Duration, Field::Get(), Object::GetEntry(), Object::GetGUID(), GetItemRandomPropertyId(), GetTemplate(), Object::GetUInt32Value(), IsSoulBound(), IsWrapped(), ITEM_FIELD_CREATE_PLAYED_TIME, ITEM_FIELD_CREATOR, ITEM_FIELD_DURABILITY, ITEM_FIELD_DURATION, ITEM_FIELD_ENCHANTMENT_1_1, ITEM_FIELD_FLAG_SOULBOUND, ITEM_FIELD_FLAGS, ITEM_FIELD_GIFTCREATOR, ITEM_FIELD_MAXDURABILITY, ITEM_FIELD_RANDOM_PROPERTIES_ID, LOG_ERROR, LOG_WARN, MAX_ENCHANTMENT_OFFSET, MAX_ENCHANTMENT_SLOT, MAX_ITEM_PROTO_SPELLS, ItemTemplate::MaxDurability, NO_BIND, SetCount(), PreparedStatementBase::SetData(), Object::SetEntry(), Object::SetGuidValue(), Object::SetInt32Value(), Object::SetObjectScale(), SetOwnerGUID(), SetSpellCharges(), SetText(), Object::SetUInt32Value(), sScriptMgr, Acore::Tokenize(), and UpdateItemSuffixFactor().
Referenced by Player::_LoadItem(), Player::_LoadMailedItem(), AuctionHouseMgr::LoadAuctionItems(), Bag::LoadFromDB(), and Guild::BankTab::LoadItemFromDB().
|
overridevirtual |
Implements Object.
References GetOwner().
void Item::RemoveFromUpdateQueueOf | ( | Player * | player | ) |
References ASSERT, Object::GetGUID(), GetOwnerGUID(), IsInUpdateQueue(), LOG_DEBUG, Player::m_itemUpdateQueue, Player::m_itemUpdateQueueBlocked, ObjectGuid::ToString(), and uQueuePos.
Referenced by WorldSession::HandleSellItemOpcode(), and SetState().
void Item::SaveRefundDataToDB | ( | ) |
References CHAR_DEL_ITEM_REFUND_INSTANCE, CHAR_INS_ITEM_REFUND_INSTANCE, CharacterDatabase, Object::GetGUID(), GetPaidExtendedCost(), GetPaidMoney(), GetRefundRecipient(), and PreparedStatementBase::SetData().
Referenced by Player::_StoreOrEquipNewItem().
|
virtual |
Reimplemented in Bag.
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(), 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, m_text, MAX_ENCHANTMENT_SLOT, MAX_ITEM_PROTO_SPELLS, PreparedStatementBase::SetData(), SetState(), and uState.
Referenced by Player::_LoadItem(), Player::_LoadMailedItem(), Player::_SaveInventory(), Player::AutoUnequipOffhandIfNeed(), AchievementMgr::CompletedAchievement(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleSendMail(), Bag::SaveToDB(), and MailDraft::SendReturnToSender().
void Item::SendTimeUpdate | ( | Player * | owner | ) |
References Object::GetGUID(), Player::GetSession(), Object::GetUInt32Value(), ITEM_FIELD_DURATION, WorldSession::SendPacket(), and SMSG_ITEM_TIME_UPDATE.
Referenced by Player::AddItemDurations().
void Item::SendUpdateSockets | ( | ) |
References BONUS_ENCHANTMENT_SLOT, GetEnchantmentId(), Object::GetGUID(), GetOwner(), Player::GetSession(), WorldSession::SendPacket(), SMSG_SOCKET_GEMS_RESULT, and SOCK_ENCHANTMENT_SLOT.
Referenced by WorldSession::HandleSocketOpcode().
|
inline |
|
inline |
References m_container.
Referenced by Player::_StoreItem(), Bag::RemoveItem(), Bag::StoreItem(), and Player::VisualizeItem().
|
inline |
References ITEM_FIELD_STACK_COUNT, and Object::SetUInt32Value().
Referenced by Guild::BankMoveItemData::_StoreItem(), Player::_StoreItem(), CreateItem(), Player::DestroyItemCount(), Player::EquipItem(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleSellItemOpcode(), LoadFromDB(), Player::SplitItem(), and Player::SwapItem().
void Item::SetEnchantment | ( | EnchantmentSlot | slot, |
uint32 | id, | ||
uint32 | duration, | ||
uint32 | charges, | ||
ObjectGuid | caster = ObjectGuid::Empty |
||
) |
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 | ||
) |
References ENCHANTMENT_CHARGES_OFFSET, GetEnchantmentCharges(), GetOwner(), ITEM_CHANGED, ITEM_FIELD_ENCHANTMENT_1_1, MAX_ENCHANTMENT_OFFSET, SetState(), and Object::SetUInt32Value().
Referenced by Player::CastItemCombatSpell(), and Player::SetVirtualItemSlot().
void Item::SetEnchantmentDuration | ( | EnchantmentSlot | slot, |
uint32 | duration, | ||
Player * | owner | ||
) |
References ENCHANTMENT_DURATION_OFFSET, GetEnchantmentDuration(), ITEM_CHANGED, ITEM_FIELD_ENCHANTMENT_1_1, MAX_ENCHANTMENT_OFFSET, SetState(), and Object::SetUInt32Value().
Referenced by Player::RemoveEnchantmentDurations().
|
inline |
References mb_in_trade.
Referenced by clearAcceptTradeMode(), and setAcceptTradeMode().
void Item::SetItemRandomProperties | ( | int32 | randomPropId | ) |
References ItemRandomPropertiesEntry::Enchantment, ItemRandomSuffixEntry::Enchantment, Object::GetInt32Value(), GetItemSuffixFactor(), GetOwner(), ItemRandomPropertiesEntry::ID, ItemRandomSuffixEntry::ID, ITEM_CHANGED, ITEM_FIELD_RANDOM_PROPERTIES_ID, MAX_ENCHANTMENT_SLOT, PROP_ENCHANTMENT_SLOT_0, SetEnchantment(), Object::SetInt32Value(), SetState(), sItemRandomPropertiesStore, sItemRandomSuffixStore, and UpdateItemSuffixFactor().
Referenced by CreateItem().
void Item::SetNotRefundable | ( | Player * | owner, |
bool | changestate = true , |
||
CharacterDatabaseTransaction * | trans = nullptr |
||
) |
References DeleteRefundDataFromDB(), Player::DeleteRefundReference(), Object::GetGUID(), IsRefundable(), ITEM_CHANGED, ITEM_FIELD_FLAG_REFUNDABLE, ITEM_FIELD_FLAGS, Object::RemoveFlag(), SetPaidExtendedCost(), SetPaidMoney(), SetRefundRecipient(), and SetState().
Referenced by Player::_StoreItem(), Player::DestroyItem(), Player::EquipItem(), WorldSession::HandleSendMail(), Player::RefundItem(), Player::SendRefundInfo(), and UpdatePlayedTime().
|
inline |
References ITEM_FIELD_OWNER, and Object::SetGuidValue().
Referenced by Player::_StoreItem(), Player::EquipItem(), WorldSession::HandleSendMail(), LoadFromDB(), and Player::MoveItemToInventory().
|
inline |
References m_paidExtendedCost.
Referenced by Player::_LoadItem(), Player::_StoreOrEquipNewItem(), and SetNotRefundable().
|
inline |
References m_paidMoney.
Referenced by Player::_LoadItem(), Player::_StoreOrEquipNewItem(), and SetNotRefundable().
|
inline |
References m_refundRecipient.
Referenced by Player::_LoadItem(), Player::_StoreOrEquipNewItem(), and SetNotRefundable().
|
inline |
References m_slot.
Referenced by Player::_StoreItem(), Player::DestroyItem(), Player::RemoveItem(), Bag::StoreItem(), and Player::VisualizeItem().
void Item::SetSoulboundTradeable | ( | AllowedLooterSet & | allowedLooters | ) |
References allowedGUIDs, ITEM_FIELD_FLAG_BOP_TRADEABLE, ITEM_FIELD_FLAGS, and Object::SetFlag().
Referenced by Player::_LoadItem(), and Player::StoreNewItem().
References ITEM_FIELD_SPELL_CHARGES, and Object::SetInt32Value().
Referenced by Create(), LoadFromDB(), and Spell::TakeCastItem().
void Item::SetState | ( | ItemUpdateState | state, |
Player * | forplayer = nullptr |
||
) |
References AddToUpdateQueueOf(), Player::DeleteRefundReference(), Object::GetGUID(), ITEM_NEW, ITEM_REMOVED, ITEM_UNCHANGED, RemoveFromUpdateQueueOf(), 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 |
References m_text.
Referenced by WorldSession::HandleMailCreateTextItem(), and LoadFromDB().
|
inline |
References IsBag().
Referenced by Player::_LoadInventory(), Player::GetBagByPos(), debug_commandscript::HandleDebugGetItemStateCommand(), IsNotEmptyBag(), and Player::SwapItem().
|
inline |
References Player::DestroyItem(), GetBagSlot(), Object::GetEntry(), GetSlot(), GetTemplate(), Object::GetUInt32Value(), ITEM_CHANGED, ITEM_FIELD_DURATION, LOG_DEBUG, SetState(), Object::SetUInt32Value(), and sScriptMgr.
Referenced by Player::UpdateItemDuration().
void Item::UpdateItemSuffixFactor | ( | ) |
References GenerateEnchSuffixFactor(), Object::GetEntry(), GetItemSuffixFactor(), ITEM_FIELD_PROPERTY_SEED, and Object::SetUInt32Value().
Referenced by LoadFromDB(), and SetItemRandomProperties().
void Item::UpdatePlayedTime | ( | Player * | owner | ) |
References GameTime::GetGameTime(), Object::GetUInt32Value(), HOUR, ITEM_CHANGED, ITEM_FIELD_CREATE_PLAYED_TIME, m_lastPlayedTimeUpdate, SetNotRefundable(), SetState(), and Object::SetUInt32Value().
Referenced by Player::_SaveInventory(), and Player::SendRefundInfo().
|
private |
Referenced by ClearSoulboundTradeable(), IsBindedNotWith(), and SetSoulboundTradeable().
Loot Item::loot |
|
private |
Referenced by GetBagSlot(), GetContainer(), IsInBag(), Item(), and SetContainer().
|
private |
Referenced by GetPlayedTime(), Item(), and UpdatePlayedTime().
bool Item::m_lootGenerated |
|
private |
Referenced by GetPaidExtendedCost(), Item(), and SetPaidExtendedCost().
|
private |
Referenced by GetPaidMoney(), Item(), and SetPaidMoney().
|
private |
Referenced by GetRefundRecipient(), Item(), and SetRefundRecipient().
|
private |
Referenced by GetSlot(), IsEquipped(), Item(), and SetSlot().
|
private |
Referenced by GetText(), SaveToDB(), and SetText().
|
private |
Referenced by IsInTrade(), Item(), and SetInTrade().
|
private |
Referenced by AddToUpdateQueueOf(), GetQueuePos(), IsInUpdateQueue(), Item(), RemoveFromUpdateQueueOf(), and SetState().
|
private |
Referenced by FSetState(), GetState(), Item(), SaveToDB(), and SetState().