|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include <Item.h>
Static Public Member Functions | |
| static bool | CanTransmogrifyItemWithItem (Item const *transmogrified, Item const *transmogrifier) |
| static Item * | CreateItem (uint32 itemEntry, uint32 count, Player const *player=NULL) |
| static void | DeleteFromDB (SQLTransaction &trans, uint32 itemGuid) |
| static void | DeleteFromInventoryDB (SQLTransaction &trans, uint32 itemGuid) |
| static int32 | GenerateItemRandomPropertyId (uint32 item_id) |
| static uint32 | GetSellPrice (ItemTemplate const *proto, bool &success) |
| static uint32 | GetSpecialPrice (ItemTemplate const *proto, uint32 minimumPrice=10000) |
Public Attributes | |
| Loot | loot |
| bool | m_lootGenerated |
Private Attributes | |
| AllowedLooterSet | allowedGUIDs |
| Bag * | m_container |
| time_t | m_lastPlayedTimeUpdate |
| uint32 | m_paidExtendedCost |
| uint32 | m_paidMoney |
| uint32 | m_refundRecipient |
| uint8 | m_slot |
| std::string | m_text |
| bool | mb_in_trade |
| int16 | uQueuePos |
| ItemUpdateState | uState |
Additional Inherited Members | |
| Protected Member Functions inherited from Object | |
| std::string | _ConcatFields (uint16 startIndex, uint16 size) const |
| void | _Create (uint32 guidlow, uint32 entry, HighGuid guidhigh) |
| void | _InitValues () |
| void | _LoadIntoDataField (std::string const &data, uint32 startOffset, uint32 count) |
| void | BuildDynamicValuesUpdate (uint8 updateType, ByteBuffer *data, Player *target) const |
| void | BuildMovementUpdate (ByteBuffer *data, uint16 flags) const |
| virtual void | BuildValuesUpdate (uint8 updatetype, ByteBuffer *data, Player *target) const |
| uint32 | GetUpdateFieldData (Player const *target, uint32 *&flags) const |
| Object () | |
| Protected Attributes inherited from Object | |
| union { | |
| float * m_floatValues | |
| int32 * m_int32Values | |
| uint32 * m_uint32Values | |
| }; | |
| UpdateMask | _changesMask |
| std::vector< bool * > | m_dynamicChange |
| std::vector< uint32 * > | m_dynamicTab |
| uint16 | m_fieldNotifyFlags |
| uint16 | m_objectType |
| TypeID | m_objectTypeId |
| bool | m_objectUpdated |
| uint16 | m_updateFlag |
| uint16 | m_valuesCount |
| Item::Item | ( | ) |
Definition at line 233 of file Item.cpp.
References ITEM_DYNAMIC_END, ITEM_END, ITEM_NEW, m_container, Object::m_dynamicChange, Object::m_dynamicTab, 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, uQueuePos, and uState.
Referenced by Bag::Bag(), CanTransmogrifyItemWithItem(), CloneItem(), CreateItem(), Bag::GetItemByPos(), Bag::GetItemCount(), Bag::GetItemCountWithLimitCategory(), Bag::StoreItem(), and Bag::~Bag().
| void Item::AddToUpdateQueueOf | ( | Player * | player | ) |
Definition at line 694 of file Item.cpp.
References ASSERT, Object::GetGUID(), Object::GetGUIDLow(), GetOwnerGUID(), GUID_LOPART(), IsInUpdateQueue(), Player::m_itemUpdateQueue, Player::m_itemUpdateQueueBlocked, SF_LOG_DEBUG, and uQueuePos.
Referenced by SetState().
|
virtual |
Reimplemented from Object.
Definition at line 1076 of file Item.cpp.
References Object::BuildFieldsUpdate(), Object::ClearUpdateMask(), and GetOwner().
| InventoryResult Item::CanBeMergedPartlyWith | ( | ItemTemplate const * | proto | ) | const |
Definition at line 803 of file Item.cpp.
References EQUIP_ERR_CANT_STACK, EQUIP_ERR_LOOT_GONE, 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 |
Definition at line 744 of file Item.cpp.
References EQUIP_ERR_OK, Object::GetGUID(), GetOwner(), GetPos(), Object::HasFlag(), IsBag(), Player::IsBagPos(), IsBoundAccountWide(), IsBoundByEnchant(), IsSoulBound(), ITEM_FIELD_DYNAMIC_FLAGS, ITEM_FLAG_BOP_TRADEABLE, and m_lootGenerated.
Referenced by LuaItem::CanBeTraded(), WorldSession::HandleAuctionSellItem(), and WorldSession::HandleSetTradeItemOpcode().
| bool Item::CanBeTransmogrified | ( | ) | const |
Definition at line 1200 of file Item.cpp.
References ItemTemplate::Class, ItemTemplate::Flags2, GetTemplate(), HasStats(), ITEM_CLASS_ARMOR, ITEM_CLASS_WEAPON, ITEM_FLAGS_EXTRA_CANNOT_BE_TRANSMOG, ITEM_QUALITY_LEGENDARY, ITEM_SUBCLASS_WEAPON_FISHING_POLE, ItemTemplate::Quality, and ItemTemplate::SubClass.
Referenced by CanTransmogrifyItemWithItem().
| bool Item::CanTransmogrify | ( | ) | const |
Definition at line 1226 of file Item.cpp.
References ItemTemplate::Class, ItemTemplate::Flags2, GetTemplate(), HasStats(), ITEM_CLASS_ARMOR, ITEM_CLASS_WEAPON, ITEM_FLAGS_EXTRA_CAN_TRANSMOG, ITEM_FLAGS_EXTRA_CANNOT_TRANSMOG, ITEM_QUALITY_LEGENDARY, ITEM_SUBCLASS_WEAPON_FISHING_POLE, ItemTemplate::Quality, and ItemTemplate::SubClass.
Referenced by CanTransmogrifyItemWithItem().
|
static |
Definition at line 1255 of file Item.cpp.
References CanBeTransmogrified(), CanTransmogrify(), ItemTemplate::Class, GetTemplate(), ItemTemplate::InventoryType, INVTYPE_AMMO, INVTYPE_BAG, INVTYPE_BODY, INVTYPE_CHEST, INVTYPE_FINGER, INVTYPE_QUIVER, INVTYPE_RELIC, INVTYPE_ROBE, INVTYPE_TRINKET, INVTYPE_WEAPONMAINHAND, INVTYPE_WEAPONOFFHAND, ItemTemplate::IsRangedWeapon(), Item(), ITEM_CLASS_ARMOR, ITEM_CLASS_WEAPON, ItemTemplate::ItemId, and ItemTemplate::SubClass.
Referenced by WorldSession::HandleTransmogrifyItems().
| bool Item::CheckSoulboundTradeExpire | ( | ) |
Definition at line 1188 of file Item.cpp.
References ClearSoulboundTradeable(), GetOwner(), Object::GetUInt32Value(), HOUR, and ITEM_FIELD_CREATE_PLAYED_TIME.
| void Item::ClearEnchantment | ( | EnchantmentSlot | slot | ) |
Definition at line 897 of file Item.cpp.
References GetEnchantmentId(), GetOwner(), ITEM_CHANGED, ITEM_FIELD_ENCHANTMENT, MAX_ENCHANTMENT_OFFSET, MAX_ITEM_ENCHANTMENT_EFFECTS, SetState(), and Object::SetUInt32Value().
Referenced by LuaItem::ClearEnchantment(), WorldSession::HandleCancelTempEnchantmentOpcode(), Player::RemoveItem(), and Player::SetVirtualItemSlot().
| void Item::ClearSoulboundTradeable | ( | Player * | currentOwner | ) |
Definition at line 1175 of file Item.cpp.
References allowedGUIDs, CHAR_DEL_ITEM_BOP_TRADE, CharacterDatabase, Object::GetGUIDLow(), ITEM_CHANGED, ITEM_FIELD_DYNAMIC_FLAGS, ITEM_FLAG_BOP_TRADEABLE, Object::RemoveFlag(), SetState(), and PreparedStatement::setUInt32().
Referenced by Player::_LoadItem(), Player::_StoreItem(), CheckSoulboundTradeExpire(), Player::DestroyItem(), Player::EquipItem(), WorldSession::HandleSocketOpcode(), and WorldSession::HandleTransmogrifyItems().
Definition at line 1039 of file Item.cpp.
References CreateItem(), Object::GetEntry(), GetItemRandomPropertyId(), Object::GetUInt32Value(), Item(), ITEM_FIELD_CREATOR, ITEM_FIELD_DYNAMIC_FLAGS, ITEM_FIELD_EXPIRATION, ITEM_FIELD_GIFT_CREATOR, ITEM_FLAG_BOP_TRADEABLE, ITEM_FLAG_REFUNDABLE, SetItemRandomProperties(), and Object::SetUInt32Value().
Referenced by Guild::BankMoveItemData::_StoreItem(), Player::_StoreItem(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleSellItemOpcode(), and Player::SplitItem().
Reimplemented in Bag.
Definition at line 252 of file Item.cpp.
References Object::_Create(), ItemTemplate::Duration, Object::GetGUID(), HIGHGUID_ITEM, ITEM_FIELD_CONTAINED_IN, ITEM_FIELD_CREATE_PLAYED_TIME, ITEM_FIELD_DURABILITY, ITEM_FIELD_EXPIRATION, ITEM_FIELD_MAX_DURABILITY, ITEM_FIELD_OWNER, ITEM_FIELD_STACK_COUNT, MAX_ITEM_PROTO_SPELLS, ItemTemplate::MaxDurability, Object::SetEntry(), Object::SetObjectScale(), SetSpellCharges(), Object::SetUInt32Value(), Object::SetUInt64Value(), sObjectMgr, _Spell::SpellCharges, and ItemTemplate::Spells.
Referenced by CreateItem(), and WorldSession::HandleMailCreateTextItem().
Definition at line 1012 of file Item.cpp.
References ASSERT, Create(), ItemTemplate::GetMaxStackSize(), HIGHGUID_ITEM, Item(), NewItemOrBag(), SetCount(), and sObjectMgr.
Referenced by CharacterBooster::_EquipItems(), CharacterBooster::_SendMail(), Player::CanEquipNewItem(), CloneItem(), AchievementMgr< Guild >::CompletedAchievement(), Spell::EffectSummonChangeItem(), LuaPlayer::EquipItem(), Player::EquipNewItem(), send_commandscript::HandleSendItemsCommand(), MailDraft::prepareItems(), BlackMarketMgr::SendAuctionWon(), LuaGlobalFunctions::SendMail(), and Player::StoreNewItem().
|
virtual |
Reimplemented in Bag.
Definition at line 506 of file Item.cpp.
References DeleteFromDB(), Object::GetGUIDLow(), ItemContainerDeleteLootMoneyAndLootItemsFromDB(), and loot.
|
static |
Definition at line 499 of file Item.cpp.
References CHAR_DEL_ITEM_INSTANCE, CharacterDatabase, and PreparedStatement::setUInt32().
Referenced by Player::_LoadItem(), Guild::BankMoveItemData::_StoreItem(), Bag::DeleteFromDB(), DeleteFromDB(), and WorldSession::HandleAuctionSellItem().
| void Item::DeleteFromInventoryDB | ( | SQLTransaction & | trans | ) |
Definition at line 523 of file Item.cpp.
References DeleteFromInventoryDB(), and Object::GetGUIDLow().
|
static |
Definition at line 516 of file Item.cpp.
References CHAR_DEL_CHAR_INVENTORY_BY_ITEM, CharacterDatabase, and PreparedStatement::setUInt32().
Referenced by Player::_LoadItem(), Player::AutoUnequipOffhandIfNeed(), DeleteFromInventoryDB(), WorldSession::HandleAuctionSellItem(), and WorldSession::HandleSendMail().
| void Item::DeleteRefundDataFromDB | ( | SQLTransaction * | trans | ) |
Definition at line 1101 of file Item.cpp.
References CHAR_DEL_ITEM_REFUND_INSTANCE, CharacterDatabase, Object::GetGUIDLow(), Skyfire::AutoPtr< Pointer, Lock >::null(), and PreparedStatement::setUInt32().
Referenced by SetNotRefundable().
|
inline |
Definition at line 311 of file Item.h.
References uState.
Referenced by Player::_LoadItem(), Player::_LoadMailedItems(), Player::_SaveInventory(), Player::DeleteFromDB(), and Guild::BankTab::SetItem().
| bool Item::GemsFitSockets | ( | ) | const |
Definition at line 907 of file Item.cpp.
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().
Definition at line 575 of file Item.cpp.
References GetItemEnchantMod(), ItemRandomPropertiesEntry::ID, ItemRandomSuffixEntry::ID, ItemTemplate::ItemId, ItemTemplate::RandomProperty, ItemTemplate::RandomSuffix, SF_LOG_ERROR, sItemRandomPropertiesStore, sItemRandomSuffixStore, and sObjectMgr.
Referenced by LuaPlayer::AddItem(), Player::AddItem(), Spell::DoCreateItem(), misc_commandscript::HandleAddItemCommand(), LootItem::LootItem(), item_disgusting_jar::OnExpire(), item_mysterious_egg::OnExpire(), Player::RewardQuest(), and Player::StoreNewItemInBestSlots().
| uint8 Item::GetBagSlot | ( | ) | const |
Definition at line 734 of file Item.cpp.
References INVENTORY_SLOT_BAG_0, and m_container.
Referenced by Player::_SaveInventory(), Player::DestroyItemCount(), WorldSession::DoLootRelease(), LuaPlayer::EquipItem(), LuaItem::GetBagSlot(), GetPos(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleAutoEquipItemOpcode(), WorldSession::HandleBattlePetLearn(), debug_commandscript::HandleDebugGetItemStateCommand(), debug_commandscript::HandleDebugItemExpireCommand(), WorldSession::HandleOpenItemOpcode(), WorldSession::HandleQuestgiverAcceptQuestOpcode(), WorldSession::HandleSellItemOpcode(), WorldSession::HandleTurnInPetitionOpcode(), WorldSession::HandleVoidStorageTransfer(), ItemContainerLoadLootFromDB(), Player::RefundItem(), Player::SendNewItem(), UpdateDuration(), and Bag::~Bag().
|
inline |
Definition at line 266 of file Item.h.
References m_container.
Referenced by Player::_SaveInventory(), and debug_commandscript::HandleDebugGetItemStateCommand().
|
inline |
Definition at line 258 of file Item.h.
References Object::GetUInt32Value(), and ITEM_FIELD_STACK_COUNT.
Referenced by Guild::_DoItemsMove(), Guild::BankMoveItemData::_ReserveSpace(), Guild::_SendBankContentUpdate(), 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(), Player::DestroyItem(), Player::DestroyItemCount(), WorldSession::DoLootRelease(), Player::EquipItem(), LuaItem::GetCount(), Bag::GetItemCount(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleAutoBankItemOpcode(), WorldSession::HandleBuybackItem(), WorldSession::HandleGetMailList(), WorldSession::HandleMailTakeItem(), WorldSession::HandleSellItemOpcode(), WorldSession::HandleSendMail(), Player::HasItemCount(), Player::HasItemOrGemWithIdEquipped(), Player::HasItemOrGemWithLimitCategoryEquipped(), Guild::BankMoveItemData::LogAction(), WorldSession::moveItems(), Player::MoveItemToInventory(), SaveToDB(), AuctionHouseMgr::SendAuctionWonMail(), Player::SendNewItem(), WorldSession::SendUpdateTrade(), Player::SplitItem(), Guild::BankMoveItemData::StoreItem(), and Player::SwapItem().
|
inline |
Definition at line 289 of file Item.h.
References ENCHANTMENT_CHARGES_OFFSET, Object::GetUInt32Value(), ITEM_FIELD_ENCHANTMENT, and MAX_ENCHANTMENT_OFFSET.
Referenced by AuctionEntry::BuildAuctionInfo(), WorldSession::HandleGetMailList(), SaveToDB(), SetEnchantment(), SetEnchantmentCharges(), and Player::SetVirtualItemSlot().
|
inline |
Definition at line 288 of file Item.h.
References ENCHANTMENT_DURATION_OFFSET, Object::GetUInt32Value(), ITEM_FIELD_ENCHANTMENT, and MAX_ENCHANTMENT_OFFSET.
Referenced by Player::AddEnchantmentDurations(), Player::ApplyEnchantment(), AuctionEntry::BuildAuctionInfo(), WorldSession::HandleGetMailList(), SaveToDB(), SetEnchantment(), and SetEnchantmentDuration().
|
inline |
Definition at line 287 of file Item.h.
References ENCHANTMENT_ID_OFFSET, Object::GetUInt32Value(), ITEM_FIELD_ENCHANTMENT, and MAX_ENCHANTMENT_OFFSET.
Referenced by Guild::_SendBankContentUpdate(), Player::AddEnchantmentDurations(), Player::ApplyEnchantment(), AuctionEntry::BuildAuctionInfo(), Player::BuildEnchantmentsInfoData(), Player::CanEquipUniqueItem(), Player::CastItemCombatSpell(), Player::CastItemUseSpell(), ClearEnchantment(), LuaItem::ClearEnchantment(), Player::CorrectMetaGemEnchants(), Spell::EffectEnchantHeldItem(), Player::EnchantmentFitsRequirements(), GemsFitSockets(), LuaItem::GetEnchantmentId(), GetGemCountWithID(), GetGemCountWithLimitCategory(), LuaItem::GetItemLink(), GetReforgableStat(), spell_rog_deadly_poison::spell_rog_deadly_poison_SpellScript::HandleAfterHit(), WorldSession::HandleCancelTempEnchantmentOpcode(), Unit::HandleDummyAuraProc(), WorldSession::HandleGetMailList(), WorldSession::HandleSocketOpcode(), HasEnchantRequiredSkill(), Player::HasItemOrGemWithLimitCategoryEquipped(), IsBoundByEnchant(), SaveToDB(), Player::SendInspectResult(), WorldSession::SendUpdateSockets(), WorldSession::SendUpdateTrade(), SetEnchantment(), Player::SetVirtualItemSlot(), Player::SetVisibleItemSlot(), and Player::ToggleMetaGemsActive().
Definition at line 944 of file Item.cpp.
References SpellItemEnchantmentEntry::GemID, GetEnchantmentId(), MAX_GEM_SOCKETS, SOCK_ENCHANTMENT_SLOT, and sSpellItemEnchantmentStore.
Referenced by Bag::GetItemCount(), and Player::HasItemOrGemWithIdEquipped().
Definition at line 963 of file Item.cpp.
References SpellItemEnchantmentEntry::GemID, GetEnchantmentId(), ItemTemplate::ItemLimitCategory, MAX_GEM_SOCKETS, sObjectMgr, SOCK_ENCHANTMENT_SLOT, and sSpellItemEnchantmentStore.
Referenced by Player::CanEquipUniqueItem(), and Player::HasItemOrGemWithLimitCategoryEquipped().
|
inline |
Definition at line 278 of file Item.h.
References Object::GetInt32Value(), and ITEM_FIELD_RANDOM_PROPERTIES_ID.
Referenced by Guild::_SendBankContentUpdate(), Player::ApplyEnchantment(), AuctionEntry::BuildAuctionInfo(), AuctionHouseObject::BuildListAuctionItems(), CloneItem(), LuaItem::GetItemLink(), GetReforgableStat(), WorldSession::HandleGetMailList(), WorldSession::HandleVoidStorageTransfer(), HasStats(), LoadFromDB(), SaveToDB(), AuctionHouseMgr::SendAuctionCancelledToBidderMail(), Player::SendNewItem(), and WorldSession::SendUpdateTrade().
|
inline |
Definition at line 279 of file Item.h.
References Object::GetUInt32Value(), and ITEM_FIELD_PROPERTY_SEED.
Referenced by Guild::_SendBankContentUpdate(), Player::ApplyEnchantment(), AuctionEntry::BuildAuctionInfo(), LuaItem::GetItemLink(), GetReforgableStat(), WorldSession::HandleGetMailList(), WorldSession::HandleVoidStorageTransfer(), Player::RemoveItem(), Player::SendNewItem(), WorldSession::SendUpdateTrade(), SetItemRandomProperties(), and UpdateItemSuffixFactor().
|
inline |
Definition at line 260 of file Item.h.
References ItemTemplate::GetMaxStackSize(), and GetTemplate().
Referenced by Guild::BankMoveItemData::_ReserveSpace(), Guild::BankMoveItemData::CanStore(), LuaItem::GetMaxStackCount(), WorldSession::HandleAuctionSellItem(), and WorldSession::HandleWrapItemOpcode().
| Player * Item::GetOwner | ( | ) | const |
Definition at line 533 of file Item.cpp.
References ObjectAccessor::FindPlayer(), and GetOwnerGUID().
Referenced by BuildUpdate(), CanBeTraded(), Spell::CheckItems(), CheckSoulboundTradeExpire(), ClearEnchantment(), LuaItem::ClearEnchantment(), LuaItem::GetItemLink(), LuaItem::GetOwner(), ItemContainerLoadLootFromDB(), SetEnchantment(), LuaItem::SetEnchantment(), SetEnchantmentCharges(), and SetItemRandomProperties().
|
inline |
Definition at line 213 of file Item.h.
References Object::GetUInt64Value(), and ITEM_FIELD_OWNER.
Referenced by AddToUpdateQueueOf(), GetOwner(), LuaItem::GetOwnerGUID(), debug_commandscript::HandleDebugGetItemStateCommand(), WorldSession::HandleSellItemOpcode(), WorldSession::HandleWrapItemOpcode(), IsBindedNotWith(), Player::MoveItemToInventory(), RemoveFromUpdateQueueOf(), SaveToDB(), SetEnchantment(), and Bag::StoreItem().
|
inline |
Definition at line 332 of file Item.h.
References m_paidExtendedCost.
Referenced by Player::RefundItem(), SaveRefundDataToDB(), and Player::SendRefundInfo().
|
inline |
Definition at line 331 of file Item.h.
References m_paidMoney.
Referenced by Player::RefundItem(), SaveRefundDataToDB(), Player::SendItemRefundResult(), and Player::SendRefundInfo().
| uint32 Item::GetPlayedTime | ( | ) |
Definition at line 1157 of file Item.cpp.
References Object::GetUInt32Value(), ITEM_FIELD_CREATE_PLAYED_TIME, and m_lastPlayedTimeUpdate.
Referenced by Player::_LoadItem(), IsRefundExpired(), and Player::SendRefundInfo().
|
inline |
Definition at line 269 of file Item.h.
References GetBagSlot(), and GetSlot().
Referenced by CanBeTraded(), WorldSession::HandleAutoBankItemOpcode(), WorldSession::HandleAutoEquipItemOpcode(), WorldSession::HandleAutoEquipItemSlotOpcode(), WorldSession::HandleAutoStoreBagItemOpcode(), WorldSession::HandleEquipmentSetUse(), and WorldSession::HandleRepairItemOpcode().
|
inline |
Definition at line 310 of file Item.h.
References uQueuePos.
Referenced by debug_commandscript::HandleDebugGetItemStateCommand().
| int32 Item::GetReforgableStat | ( | ItemModType | statType | ) | const |
Definition at line 1459 of file Item.cpp.
References ItemRandomPropertiesEntry::enchant_id, ItemRandomSuffixEntry::enchant_id, GetEnchantmentId(), GetItemRandomPropertyId(), GetItemSuffixFactor(), GetTemplate(), ITEM_ENCHANTMENT_TYPE_STAT, ItemTemplate::ItemStat, _ItemStat::ItemStatType, _ItemStat::ItemStatValue, MAX_ITEM_ENCHANTMENT_EFFECTS, MAX_ITEM_PROTO_STATS, ItemRandomSuffixEntry::prefix, PROP_ENCHANTMENT_SLOT_0, PROP_ENCHANTMENT_SLOT_4, sItemRandomPropertiesStore, sItemRandomSuffixStore, and sSpellItemEnchantmentStore.
Referenced by Player::ApplyReforgeEnchantment(), and WorldSession::HandleReforgeItemOpcode().
|
inline |
Definition at line 330 of file Item.h.
References m_refundRecipient.
Referenced by Player::RefundItem(), SaveRefundDataToDB(), and Player::SendRefundInfo().
|
inline |
Definition at line 345 of file Item.h.
References GetTemplate(), and ItemTemplate::ScriptId.
Referenced by ScriptMgr::OnDummyEffect(), ScriptMgr::OnItemUse(), and ScriptMgr::OnQuestAccept().
|
static |
Definition at line 1306 of file Item.cpp.
References ItemPriceBaseEntry::ArmorFactor, ItemTemplate::BuyPrice, ImportPriceArmorEntry::ClothFactor, ImportPriceQualityEntry::Factor, ImportPriceShieldEntry::Factor, ImportPriceWeaponEntry::Factor, ItemTemplate::Flags2, ItemTemplate::InventoryType, INVTYPE_2HWEAPON, INVTYPE_CHEST, INVTYPE_CLOAK, INVTYPE_FEET, INVTYPE_HANDS, INVTYPE_HEAD, INVTYPE_LEGS, INVTYPE_RANGED, INVTYPE_RANGEDRIGHT, INVTYPE_RELIC, INVTYPE_ROBE, INVTYPE_SHIELD, INVTYPE_SHOULDERS, INVTYPE_THROWN, INVTYPE_WAIST, INVTYPE_WEAPON, INVTYPE_WEAPONMAINHAND, INVTYPE_WEAPONOFFHAND, INVTYPE_WRISTS, ITEM_FLAGS_EXTRA_HAS_NORMAL_PRICE, ITEM_SUBCLASS_ARMOR_CLOTH, ITEM_SUBCLASS_ARMOR_LEATHER, ITEM_SUBCLASS_ARMOR_MAIL, ITEM_SUBCLASS_ARMOR_MISCELLANEOUS, ITEM_SUBCLASS_ARMOR_PLATE, ItemTemplate::ItemLevel, ImportPriceArmorEntry::LeatherFactor, ImportPriceArmorEntry::MailFactor, ImportPriceArmorEntry::PlateFactor, ItemTemplate::Quality, sImportPriceArmorStore, sImportPriceQualityStore, sImportPriceShieldStore, sImportPriceWeaponStore, sItemPriceBaseStore, ItemTemplate::SubClass, ItemTemplate::Unk430_1, ItemTemplate::Unk430_2, and ItemPriceBaseEntry::WeaponFactor.
Referenced by GetSpecialPrice().
| uint32 Item::GetSkill | ( | ) |
Definition at line 538 of file Item.cpp.
References ItemTemplate::Class, GetTemplate(), ITEM_CLASS_ARMOR, ITEM_CLASS_WEAPON, MAX_ITEM_SUBCLASS_ARMOR, MAX_ITEM_SUBCLASS_WEAPON, SKILL_2H_AXES, SKILL_2H_MACES, SKILL_2H_SWORDS, SKILL_AXES, SKILL_BOWS, SKILL_CLOTH, SKILL_CROSSBOWS, SKILL_DAGGERS, SKILL_FISHING, SKILL_FIST_WEAPONS, SKILL_GUNS, SKILL_LEATHER, SKILL_MACES, SKILL_MAIL, SKILL_PLATE_MAIL, SKILL_POLEARMS, SKILL_SHIELD, SKILL_STAVES, SKILL_SWORDS, SKILL_WANDS, and ItemTemplate::SubClass.
Referenced by Player::CanUseItem().
|
inline |
Definition at line 265 of file Item.h.
References m_slot.
Referenced by Player::_SaveInventory(), Player::ApplyEnchantment(), Player::DestroyItemCount(), WorldSession::DoLootRelease(), Player::DurabilityPointsLoss(), LuaPlayer::EquipItem(), GetPos(), LuaItem::GetSlot(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleAutoEquipItemOpcode(), WorldSession::HandleBattlePetLearn(), WorldSession::HandleBuyItemInSlotOpcode(), WorldSession::HandleBuyItemOpcode(), debug_commandscript::HandleDebugGetItemStateCommand(), debug_commandscript::HandleDebugItemExpireCommand(), Unit::HandleDummyAuraProc(), WorldSession::HandleOpenItemOpcode(), WorldSession::HandleQuestgiverAcceptQuestOpcode(), WorldSession::HandleSellItemOpcode(), WorldSession::HandleSendMail(), WorldSession::HandleSocketOpcode(), WorldSession::HandleTurnInPetitionOpcode(), WorldSession::HandleVoidStorageTransfer(), Player::RefundItem(), Player::SendNewItem(), UpdateDuration(), and Bag::~Bag().
|
static |
Definition at line 1425 of file Item.cpp.
References ItemTemplate::BuyCount, ItemTemplate::Class, ItemTemplate::Flags2, GetSellPrice(), ITEM_FLAGS_EXTRA_HAS_NORMAL_PRICE, ItemClassEntry::PriceFactor, ItemTemplate::SellPrice, and sItemClassStore.
Referenced by FillDisenchantFields(), GetSpecialPrice(), WorldSession::HandleReforgeItemOpcode(), and WorldSession::HandleTransmogrifyItems().
Definition at line 351 of file Item.h.
References GetSpecialPrice(), and GetTemplate().
Definition at line 298 of file Item.h.
References Object::GetInt32Value(), and ITEM_FIELD_SPELL_CHARGES.
Referenced by Guild::_SendBankContentUpdate(), AuctionEntry::BuildAuctionInfo(), WorldSession::HandleGetMailList(), SaveToDB(), and WorldSession::SendUpdateTrade().
|
inline |
Definition at line 305 of file Item.h.
References uState.
Referenced by Player::_SaveInventory(), debug_commandscript::HandleDebugGetItemStateCommand(), and WorldSession::HandleWrapItemOpcode().
| ItemTemplate const * Item::GetTemplate | ( | ) | const |
Definition at line 528 of file Item.cpp.
References Object::GetEntry(), and sObjectMgr.
Referenced by Player::_ApplyItemMods(), Player::_LoadItem(), Player::_StoreItem(), AddItemsSetItem(), Player::AddItemToBuyBackSlot(), Player::ApplyEnchantment(), Player::ApplyEquipCooldown(), Player::ApplyItemEquipSpell(), Player::AutoUnequipOffhandIfNeed(), AuctionHouseObject::BuildListAuctionItems(), Player::CanBankItem(), CanBeTransmogrified(), Player::CanEquipItem(), Player::CanEquipUniqueItem(), Player::CanStoreItem_InBag(), Player::CanStoreItem_InSpecificSlot(), Player::CanStoreItems(), CanTransmogrify(), CanTransmogrifyItemWithItem(), Player::CanUnequipItem(), Player::CanUseItem(), Player::CastItemUseSpell(), Spell::CheckCast(), Spell::CheckItems(), Player::CorrectMetaGemEnchants(), Player::DestroyItem(), Spell::DoCreateItem(), WorldSession::DoLootRelease(), Player::DurabilityRepair(), Spell::EffectFeedPet(), Player::EnchantmentFitsRequirements(), Player::EquipItem(), EquippedOk(), GemsFitSockets(), LuaItem::GetAllowableClass(), LuaItem::GetAllowableRace(), Unit::GetAPMultiplier(), AuctionHouseMgr::GetAuctionDeposit(), LuaItem::GetBuyCount(), LuaItem::GetBuyPrice(), LuaItem::GetClass(), LuaItem::GetDisplayId(), LuaItem::GetInventoryType(), Bag::GetItemCount(), Player::GetItemCount(), LuaItem::GetItemLevel(), LuaItem::GetItemLink(), LuaItem::GetItemSet(), GetMaxStackCount(), LuaItem::GetName(), LuaItem::GetQuality(), LuaItem::GetRandomProperty(), LuaItem::GetRandomSuffix(), GetReforgableStat(), LuaItem::GetRequiredLevel(), GetScriptId(), LuaItem::GetSellPrice(), Player::GetShield(), GetSkill(), GetSpecialPrice(), LuaItem::GetSpellId(), LuaItem::GetSpellTrigger(), LuaItem::GetSubClass(), Player::GetWeaponForAttack(), WorldSession::HandleAuctionSellItem(), debug_commandscript::HandleDebugItemExpireCommand(), WorldSession::HandleDestroyItemOpcode(), WorldSession::HandleMailTakeItem(), WorldSession::HandleMirrorImageDataRequest(), WorldSession::HandleOpenItemOpcode(), WorldSession::HandleQuestgiverAcceptQuestOpcode(), WorldSession::HandleReadItem(), WorldSession::HandleSellItemOpcode(), WorldSession::HandleSendMail(), WorldSession::HandleSetTradeItemOpcode(), WorldSession::HandleSocketOpcode(), WorldSession::HandleTransmogrifyItems(), WorldSession::HandleWrapItemOpcode(), Player::HasItemOrGemWithIdEquipped(), Player::HasItemOrGemWithLimitCategoryEquipped(), hasQuest(), HasStats(), IsBag(), IsBoundAccountWide(), IsConjuredConsumable(), IsCurrencyToken(), IsFitToSpellRequirements(), IsLimitedToAnotherMapOrZone(), IsPotion(), Aura::IsProcTriggeredOnEvent(), IsRangedWeapon(), Unit::IsTriggeredAtSpellProcEvent(), Player::IsTwoHandUsed(), IsVellum(), Bag::LoadFromDB(), LoadFromDB(), Guild::BankMoveItemData::LogAction(), WorldSession::moveItems(), spell_monk_grapple_weapon::spell_monk_grapple_weapon_SpellScript::PrepareSpellScript(), Player::RemoveItem(), AuctionHouseMgr::SendAuctionWonMail(), Player::SendEquipError(), Player::SendLoot(), WorldSession::SendUpdateTrade(), Player::SetRegularAttackTime(), Player::StoreNewItem(), Player::SwapItem(), Player::ToggleMetaGemsActive(), UpdateDuration(), Player::UpdateItemDuration(), and Player::VisualizeItem().
|
inline |
|
inline |
Definition at line 353 of file Item.h.
References Object::GetDynamicUInt32Value(), Object::GetEntry(), and ITEM_DYNAMIC_MODIFIERS.
Referenced by Player::SetVisibleItemSlot().
| bool Item::HasEnchantRequiredSkill | ( | const Player * | player | ) | const |
Definition at line 769 of file Item.cpp.
References GetEnchantmentId(), Player::GetSkillValue(), MAX_ENCHANTMENT_SLOT, PERM_ENCHANTMENT_SLOT, PRISMATIC_ENCHANTMENT_SLOT, PROP_ENCHANTMENT_SLOT_0, and sSpellItemEnchantmentStore.
|
inlinevirtual |
|
inlinevirtual |
Reimplemented from Object.
Definition at line 316 of file Item.h.
References GetTemplate(), and ItemTemplate::StartQuest.
Referenced by LuaItem::HasQuest().
| bool Item::HasStats | ( | ) | const |
Definition at line 1289 of file Item.cpp.
References GetItemRandomPropertyId(), GetTemplate(), ItemTemplate::ItemStat, _ItemStat::ItemStatValue, MAX_ITEM_PROTO_STATS, and ItemTemplate::ScalingStatDistribution.
Referenced by CanBeTransmogrified(), and CanTransmogrify().
|
inline |
Definition at line 244 of file Item.h.
References GetTemplate(), ItemTemplate::InventoryType, and INVTYPE_BAG.
Referenced by Player::CanBankItem(), CanBeTraded(), WorldSession::HandleAutoEquipItemOpcode(), WorldSession::HandleBuyItemInSlotOpcode(), WorldSession::HandleBuyItemOpcode(), WorldSession::HandleWrapItemOpcode(), LuaItem::IsBag(), Player::SwapItem(), ToBag(), and ToBag().
| bool Item::IsBindedNotWith | ( | Player const * | player | ) | const |
Definition at line 1055 of file Item.cpp.
References allowedGUIDs, Object::GetGUID(), Object::GetGUIDLow(), GetOwnerGUID(), Object::HasFlag(), IsBoundAccountWide(), IsSoulBound(), ITEM_FIELD_DYNAMIC_FLAGS, and ITEM_FLAG_BOP_TRADEABLE.
Referenced by Player::CanBankItem(), Player::CanEquipItem(), Player::CanStoreItem(), Player::CanStoreItems(), Player::CanUseItem(), and LuaItem::IsNotBoundToPlayer().
|
inline |
Definition at line 219 of file Item.h.
References GetTemplate(), and ITEM_PROTO_FLAG_BIND_TO_ACCOUNT.
Referenced by CanBeTraded(), IsBindedNotWith(), and LuaItem::IsBoundAccountWide().
| bool Item::IsBoundByEnchant | ( | ) | const |
Definition at line 786 of file Item.cpp.
References ENCHANTMENT_CAN_SOULBOUND, GetEnchantmentId(), MAX_ENCHANTMENT_SLOT, PERM_ENCHANTMENT_SLOT, PRISMATIC_ENCHANTMENT_SLOT, PROP_ENCHANTMENT_SLOT_0, and sSpellItemEnchantmentStore.
Referenced by CanBeTraded(), and LuaItem::IsBoundByEnchant().
|
inline |
Definition at line 247 of file Item.h.
References Object::GetUInt32Value(), ITEM_FIELD_DURABILITY, and ITEM_FIELD_MAX_DURABILITY.
Referenced by Player::_ApplyItemMods(), Player::_ApplyWeaponDependentAuraCritMod(), Player::_ApplyWeaponDependentAuraDamageMod(), Player::ApplyEnchantment(), Spell::CheckItems(), Player::EnchantmentFitsRequirements(), Player::GetShield(), Unit::GetUnitBlockChance(), Player::GetWeaponForAttack(), LuaItem::IsBroken(), Aura::IsProcTriggeredOnEvent(), Unit::IsTriggeredAtSpellProcEvent(), and Player::SetRegularAttackTime().
|
inline |
Definition at line 321 of file Item.h.
References GetTemplate(), and ItemTemplate::IsConjuredConsumable().
Referenced by LuaItem::IsConjuredConsumable().
|
inline |
Definition at line 245 of file Item.h.
References GetTemplate(), and ItemTemplate::IsCurrencyToken().
Referenced by Player::CanBankItem(), and LuaItem::IsCurrencyToken().
| bool Item::IsEquipped | ( | ) | const |
Definition at line 739 of file Item.cpp.
References EQUIPMENT_SLOT_END, IsInBag(), and m_slot.
Referenced by Player::ApplyEnchantment(), Player::CanEquipUniqueItem(), Player::DurabilityPointsLoss(), Spell::EffectEnchantHeldItem(), Unit::HandleDummyAuraProc(), WorldSession::HandleReforgeItemOpcode(), WorldSession::HandleSocketOpcode(), WorldSession::HandleWrapItemOpcode(), and LuaItem::IsEquipped().
| bool Item::IsFitToSpellRequirements | ( | SpellInfo const * | spellInfo | ) | const |
Definition at line 820 of file Item.cpp.
References ItemTemplate::Class, SpellInfo::EquippedItemClass, SpellInfo::EquippedItemInventoryTypeMask, SpellInfo::EquippedItemSubClassMask, GetTemplate(), ItemTemplate::InventoryType, INVTYPE_WEAPON, INVTYPE_WEAPONMAINHAND, INVTYPE_WEAPONOFFHAND, SpellInfo::IsAbilityOfSkillType(), ItemTemplate::IsVellum(), ITEM_CLASS_ARMOR, ITEM_CLASS_WEAPON, SKILL_ENCHANTING, and ItemTemplate::SubClass.
Referenced by Player::_ApplyWeaponDependentAuraCritMod(), Player::_ApplyWeaponDependentAuraDamageMod(), Spell::CheckItems(), Player::HasItemFitToSpellRequirements(), and Player::UpdateExpertise().
|
inline |
Definition at line 272 of file Item.h.
References m_container.
Referenced by IsEquipped(), and LuaItem::IsInBag().
|
inline |
Definition at line 250 of file Item.h.
References mb_in_trade.
Referenced by Player::CanStoreItems(), Player::HasItemCount(), and LuaItem::IsInTrade().
|
inline |
Definition at line 309 of file Item.h.
References uQueuePos.
Referenced by AddToUpdateQueueOf(), debug_commandscript::HandleDebugGetItemStateCommand(), and RemoveFromUpdateQueueOf().
Definition at line 986 of file Item.cpp.
References ItemTemplate::Area, GetTemplate(), and ItemTemplate::Map.
Referenced by Player::_LoadItem().
|
inline |
Definition at line 243 of file Item.h.
References Object::HasFlag(), ITEM_FIELD_DYNAMIC_FLAGS, and ITEM_FLAG_UNLOCKED.
Referenced by Spell::CheckCast(), WorldSession::HandleOpenItemOpcode(), and LuaItem::IsLocked().
| bool Item::IsNotEmptyBag | ( | ) | const |
Definition at line 280 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 LuaItem::IsNotEmptyBag().
|
inline |
Definition at line 319 of file Item.h.
References GetTemplate(), and ItemTemplate::IsPotion().
Referenced by LuaItem::IsPotion().
|
inline |
Definition at line 322 of file Item.h.
References GetTemplate(), and ItemTemplate::IsRangedWeapon().
| bool Item::IsRefundExpired | ( | ) |
Definition at line 1164 of file Item.cpp.
References GetPlayedTime(), and HOUR.
Referenced by Player::RefundItem().
|
inline |
Definition at line 218 of file Item.h.
References Object::HasFlag(), ITEM_FIELD_DYNAMIC_FLAGS, and ITEM_FLAG_SOULBOUND.
Referenced by Player::_LoadItem(), CanBeTraded(), Guild::BankMoveItemData::CanStore(), WorldSession::HandleUseItemOpcode(), WorldSession::HandleWrapItemOpcode(), IsBindedNotWith(), LuaItem::IsSoulBound(), LoadFromDB(), and Player::StoreNewItem().
|
inline |
Definition at line 320 of file Item.h.
References GetTemplate(), and ItemTemplate::IsVellum().
| void Item::ItemContainerDeleteLootItemFromDB | ( | uint32 | itemID | ) |
Definition at line 1650 of file Item.cpp.
References CHAR_DEL_ITEMCONTAINER_ITEM, CharacterDatabase, Object::GetGUIDLow(), and PreparedStatement::setUInt32().
| void Item::ItemContainerDeleteLootItemsFromDB | ( | ) |
Definition at line 1639 of file Item.cpp.
References CHAR_DEL_ITEMCONTAINER_ITEMS, CharacterDatabase, Object::GetGUIDLow(), and PreparedStatement::setUInt32().
Referenced by ItemContainerDeleteLootMoneyAndLootItemsFromDB().
| void Item::ItemContainerDeleteLootMoneyAndLootItemsFromDB | ( | ) |
Definition at line 1673 of file Item.cpp.
References ItemContainerDeleteLootItemsFromDB(), and ItemContainerDeleteLootMoneyFromDB().
Referenced by DeleteFromDB(), Player::DestroyItem(), and SaveToDB().
| void Item::ItemContainerDeleteLootMoneyFromDB | ( | ) |
Definition at line 1662 of file Item.cpp.
References CHAR_DEL_ITEMCONTAINER_MONEY, CharacterDatabase, Object::GetGUIDLow(), and PreparedStatement::setUInt32().
Referenced by ItemContainerDeleteLootMoneyAndLootItemsFromDB().
| bool Item::ItemContainerLoadLootFromDB | ( | ) |
Definition at line 1562 of file Item.cpp.
References LootItem::allowedGUIDs, LootItem::canSave, CHAR_SEL_ITEMCONTAINER_ITEMS, CHAR_SEL_ITEMCONTAINER_MONEY, CharacterDatabase, LootTemplate::CopyConditions(), LootItem::count, LootItem::follow_loot_rules, LootItem::freeforall, GetBagSlot(), Field::GetBool(), Object::GetEntry(), Object::GetGUIDLow(), Field::GetInt32(), GetOwner(), Field::GetUInt32(), LootItem::is_blocked, LootItem::is_counted, LootItem::is_underthreshold, LootItem::itemid, loot, LootTemplates_Item, m_lootGenerated, LootItem::needs_quest, LootItem::randomPropertyId, LootItem::randomSuffix, and PreparedStatement::setUInt32().
Referenced by Player::SendLoot().
| void Item::ItemContainerSaveLootToDB | ( | ) |
Definition at line 1502 of file Item.cpp.
References CHAR_DEL_ITEMCONTAINER_ITEMS, CHAR_DEL_ITEMCONTAINER_MONEY, CHAR_INS_ITEMCONTAINER_ITEMS, CHAR_INS_ITEMCONTAINER_MONEY, CharacterDatabase, Object::GetGUIDLow(), loot, PreparedStatement::setBool(), PreparedStatement::setInt32(), and PreparedStatement::setUInt32().
Referenced by Player::SendLoot().
Reimplemented in Bag.
Definition at line 405 of file Item.cpp.
References Object::_Create(), Object::_LoadIntoDataField(), Object::ApplyModFlag(), ItemTemplate::Bonding, CHAR_UPD_ITEM_INSTANCE_ON_LOAD, CharacterDatabase, ItemTemplate::Duration, GetItemRandomPropertyId(), Field::GetString(), GetTemplate(), Field::GetUInt16(), Field::GetUInt32(), Object::GetUInt32Value(), HIGHGUID_ITEM, HIGHGUID_PLAYER, IsSoulBound(), ITEM_DYNAMIC_MODIFIERS, ITEM_FIELD_CREATE_PLAYED_TIME, ITEM_FIELD_CREATOR, ITEM_FIELD_DURABILITY, ITEM_FIELD_DYNAMIC_FLAGS, ITEM_FIELD_ENCHANTMENT, ITEM_FIELD_EXPIRATION, ITEM_FIELD_GIFT_CREATOR, ITEM_FIELD_MAX_DURABILITY, ITEM_FIELD_MODIFIERS_MASK, ITEM_FIELD_RANDOM_PROPERTIES_ID, ITEM_FLAG_SOULBOUND, MAKE_NEW_GUID(), MAX_ENCHANTMENT_OFFSET, MAX_ENCHANTMENT_SLOT, MAX_ITEM_PROTO_SPELLS, ItemTemplate::MaxDurability, NO_BIND, SetCount(), Object::SetDynamicUInt32Value(), Object::SetEntry(), Object::SetFlag(), Object::SetInt32Value(), Object::SetObjectScale(), SetOwnerGUID(), SetSpellCharges(), SetText(), PreparedStatement::setUInt32(), Object::SetUInt32Value(), Object::SetUInt64Value(), Tokenizer::size(), and UpdateItemSuffixFactor().
Referenced by Player::_LoadItem(), Player::_LoadMailedItems(), Player::DeleteFromDB(), AuctionHouseMgr::LoadAuctionItems(), Bag::LoadFromDB(), and Guild::BankTab::LoadItemFromDB().
| void Item::RemoveFromUpdateQueueOf | ( | Player * | player | ) |
Definition at line 714 of file Item.cpp.
References ASSERT, Object::GetGUID(), Object::GetGUIDLow(), GetOwnerGUID(), GUID_LOPART(), IsInUpdateQueue(), Player::m_itemUpdateQueue, Player::m_itemUpdateQueueBlocked, SF_LOG_DEBUG, and uQueuePos.
Referenced by WorldSession::HandleSellItemOpcode(), WorldSession::HandleWrapItemOpcode(), and SetState().
| void Item::SaveRefundDataToDB | ( | ) |
Definition at line 1083 of file Item.cpp.
References CHAR_DEL_ITEM_REFUND_INSTANCE, CHAR_INS_ITEM_REFUND_INSTANCE, CharacterDatabase, Object::GetGUIDLow(), GetPaidExtendedCost(), GetPaidMoney(), GetRefundRecipient(), PreparedStatement::setUInt16(), and PreparedStatement::setUInt32().
Referenced by Player::_StoreOrEquipNewItem().
|
virtual |
Reimplemented in Bag.
Definition at line 305 of file Item.cpp.
References CHAR_DEL_GIFT, CHAR_DEL_ITEM_INSTANCE, CHAR_DEL_ITEM_INSTANCE_TRANSMOG, CHAR_INS_ITEM_INSTANCE_TRANSMOG, CHAR_REP_ITEM_INSTANCE, CHAR_UPD_GIFT_OWNER, CHAR_UPD_ITEM_INSTANCE, CharacterDatabase, GetCount(), Object::GetDynamicUInt32Value(), GetEnchantmentCharges(), GetEnchantmentDuration(), GetEnchantmentId(), Object::GetEntry(), Object::GetGUIDLow(), GetItemRandomPropertyId(), GetOwnerGUID(), GetSpellCharges(), Object::GetUInt32Value(), Object::GetUInt64Value(), GUID_LOPART(), Object::HasFlag(), ITEM_CHANGED, ITEM_DYNAMIC_MODIFIERS, ITEM_FIELD_CREATE_PLAYED_TIME, ITEM_FIELD_CREATOR, ITEM_FIELD_DURABILITY, ITEM_FIELD_DYNAMIC_FLAGS, ITEM_FIELD_EXPIRATION, ITEM_FIELD_GIFT_CREATOR, ITEM_FLAG_WRAPPED, ITEM_NEW, ITEM_REMOVED, ITEM_UNCHANGED, ItemContainerDeleteLootMoneyAndLootItemsFromDB(), loot, m_text, MAX_ENCHANTMENT_SLOT, MAX_ITEM_PROTO_SPELLS, Skyfire::AutoPtr< Pointer, Lock >::null(), PreparedStatement::setInt16(), SetState(), PreparedStatement::setString(), PreparedStatement::setUInt16(), PreparedStatement::setUInt32(), and uState.
Referenced by Player::_LoadItem(), Player::_LoadMailedItems(), Player::_SaveInventory(), Player::AutoUnequipOffhandIfNeed(), AchievementMgr< Guild >::CompletedAchievement(), Player::DeleteFromDB(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleSendMail(), WorldSession::HandleWrapItemOpcode(), Bag::SaveToDB(), LuaItem::SaveToDB(), BlackMarketMgr::SendAuctionWon(), MailDraft::SendReturnToSender(), and Guild::BankTab::SetItem().
| void Item::SendTimeUpdate | ( | Player * | owner | ) |
Definition at line 995 of file Item.cpp.
References Object::GetGUID(), Player::GetSession(), Object::GetUInt32Value(), ITEM_FIELD_EXPIRATION, WorldSession::SendPacket(), SMSG_ITEM_TIME_UPDATE, ByteBuffer::WriteGuidBytes(), and ByteBuffer::WriteGuidMask().
Referenced by Player::AddItemDurations().
|
inline |
Definition at line 217 of file Item.h.
References Object::ApplyModFlag(), ITEM_FIELD_DYNAMIC_FLAGS, and ITEM_FLAG_SOULBOUND.
Referenced by Player::_StoreItem(), misc_commandscript::HandleAddItemCommand(), misc_commandscript::HandleAddItemSetCommand(), WorldSession::HandleTransmogrifyItems(), WorldSession::HandleUseItemOpcode(), WorldSession::HandleVoidStorageTransfer(), LuaItem::SetBinding(), and Player::VisualizeItem().
|
inline |
Definition at line 270 of file Item.h.
References m_container.
Referenced by Player::_StoreItem(), Bag::StoreItem(), and Player::VisualizeItem().
|
inline |
Definition at line 259 of file Item.h.
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(), LuaItem::SetCount(), Player::SplitItem(), and Player::SwapItem().
| void Item::SetEnchantment | ( | EnchantmentSlot | slot, |
| uint32 | id, | ||
| uint32 | duration, | ||
| uint32 | charges, | ||
| uint64 | caster = 0 ) |
Definition at line 856 of file Item.cpp.
References ENCHANTMENT_CHARGES_OFFSET, ENCHANTMENT_DURATION_OFFSET, ENCHANTMENT_ID_OFFSET, GetEnchantmentCharges(), GetEnchantmentDuration(), GetEnchantmentId(), Object::GetEntry(), Object::GetGUID(), GetOwner(), GetOwnerGUID(), Player::GetSession(), ITEM_CHANGED, ITEM_FIELD_ENCHANTMENT, MAX_ENCHANTMENT_OFFSET, MAX_INSPECTED_ENCHANTMENT_SLOT, WorldSession::SendEnchantmentLog(), SetState(), and Object::SetUInt32Value().
Referenced by Spell::EffectEnchantHeldItem(), Spell::EffectSummonChangeItem(), WorldSession::HandleSocketOpcode(), LuaItem::SetEnchantment(), and SetItemRandomProperties().
| void Item::SetEnchantmentCharges | ( | EnchantmentSlot | slot, |
| uint32 | charges ) |
Definition at line 888 of file Item.cpp.
References ENCHANTMENT_CHARGES_OFFSET, GetEnchantmentCharges(), GetOwner(), ITEM_CHANGED, ITEM_FIELD_ENCHANTMENT, MAX_ENCHANTMENT_OFFSET, SetState(), and Object::SetUInt32Value().
Referenced by Player::SetVirtualItemSlot().
| void Item::SetEnchantmentDuration | ( | EnchantmentSlot | slot, |
| uint32 | duration, | ||
| Player * | owner ) |
Definition at line 878 of file Item.cpp.
References ENCHANTMENT_DURATION_OFFSET, GetEnchantmentDuration(), ITEM_CHANGED, ITEM_FIELD_ENCHANTMENT, MAX_ENCHANTMENT_OFFSET, SetState(), and Object::SetUInt32Value().
Referenced by Player::RemoveEnchantmentDurations().
|
inline |
Definition at line 249 of file Item.h.
References mb_in_trade.
Referenced by clearAcceptTradeMode(), and setAcceptTradeMode().
| void Item::SetItemRandomProperties | ( | int32 | randomPropId | ) |
Definition at line 621 of file Item.cpp.
References ItemRandomPropertiesEntry::enchant_id, ItemRandomSuffixEntry::enchant_id, Object::GetInt32Value(), GetItemSuffixFactor(), GetOwner(), ItemRandomPropertiesEntry::ID, ItemRandomSuffixEntry::ID, ITEM_CHANGED, ITEM_FIELD_RANDOM_PROPERTIES_ID, PROP_ENCHANTMENT_SLOT_0, PROP_ENCHANTMENT_SLOT_1, PROP_ENCHANTMENT_SLOT_4, SetEnchantment(), Object::SetInt32Value(), SetState(), sItemRandomPropertiesStore, sItemRandomSuffixStore, and UpdateItemSuffixFactor().
Referenced by CloneItem(), and Player::StoreNewItem().
| void Item::SetNotRefundable | ( | Player * | owner, |
| bool | changestate = true, | ||
| SQLTransaction * | trans = NULL ) |
Definition at line 1111 of file Item.cpp.
References DeleteRefundDataFromDB(), Player::DeleteRefundReference(), Object::GetGUIDLow(), Object::HasFlag(), ITEM_CHANGED, ITEM_FIELD_DYNAMIC_FLAGS, ITEM_FLAG_REFUNDABLE, Object::RemoveFlag(), SetPaidExtendedCost(), SetPaidMoney(), SetRefundRecipient(), and SetState().
Referenced by Player::_StoreItem(), Player::DestroyItem(), Player::EquipItem(), WorldSession::HandleSendMail(), WorldSession::HandleTransmogrifyItems(), Player::RefundItem(), Player::SendRefundInfo(), and UpdatePlayedTime().
|
inline |
Definition at line 214 of file Item.h.
References ITEM_FIELD_OWNER, and Object::SetUInt64Value().
Referenced by Player::_StoreItem(), Player::EquipItem(), WorldSession::HandleSendMail(), WorldSession::HandleTransmogrifyItems(), LoadFromDB(), Player::MoveItemToInventory(), and LuaItem::SetOwner().
|
inline |
Definition at line 328 of file Item.h.
References m_paidExtendedCost.
Referenced by Player::_LoadItem(), Player::_StoreOrEquipNewItem(), and SetNotRefundable().
|
inline |
Definition at line 327 of file Item.h.
References m_paidMoney.
Referenced by Player::_LoadItem(), Player::_StoreOrEquipNewItem(), and SetNotRefundable().
|
inline |
Definition at line 326 of file Item.h.
References m_refundRecipient.
Referenced by Player::_LoadItem(), Player::_StoreOrEquipNewItem(), and SetNotRefundable().
|
inline |
Definition at line 268 of file Item.h.
References m_slot.
Referenced by Player::_StoreItem(), Player::DestroyItem(), Player::RemoveItem(), Bag::StoreItem(), and Player::VisualizeItem().
| void Item::SetSoulboundTradeable | ( | AllowedLooterSet const & | allowedLooters | ) |
Definition at line 1169 of file Item.cpp.
References allowedGUIDs, ITEM_FIELD_DYNAMIC_FLAGS, ITEM_FLAG_BOP_TRADEABLE, and Object::SetFlag().
Referenced by Player::_LoadItem(), and Player::StoreNewItem().
Definition at line 299 of file Item.h.
References ITEM_FIELD_SPELL_CHARGES, and Object::SetInt32Value().
Referenced by Create(), and LoadFromDB().
| void Item::SetState | ( | ItemUpdateState | state, |
| Player * | forplayer = NULL ) |
Definition at line 667 of file Item.cpp.
References AddToUpdateQueueOf(), Player::DeleteRefundReference(), Object::GetGUIDLow(), ITEM_NEW, ITEM_REMOVED, ITEM_UNCHANGED, RemoveFromUpdateQueueOf(), uQueuePos, and uState.
Referenced by Player::_StoreItem(), ClearEnchantment(), ClearSoulboundTradeable(), Player::DestroyItem(), Player::DestroyItemCount(), Player::DurabilityPointsLoss(), Player::DurabilityRepair(), Player::EquipItem(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleMailTakeItem(), WorldSession::HandleOpenItemOpcode(), WorldSession::HandlePetitionBuyOpcode(), WorldSession::HandleReforgeItemOpcode(), WorldSession::HandleSellItemOpcode(), WorldSession::HandleTransmogrifyItems(), WorldSession::HandleUseItemOpcode(), WorldSession::HandleWrapItemOpcode(), Player::MoveItemToInventory(), Player::RemoveItemFromBuyBackSlot(), SaveToDB(), SetEnchantment(), SetEnchantmentCharges(), SetEnchantmentDuration(), SetItemRandomProperties(), SetNotRefundable(), Player::SplitItem(), Player::SwapItem(), UpdateDuration(), UpdatePlayedTime(), and Player::VisualizeItem().
|
inline |
Definition at line 292 of file Item.h.
References m_text.
Referenced by WorldSession::HandleMailCreateTextItem(), and LoadFromDB().
|
inline |
Definition at line 240 of file Item.h.
References IsBag().
Referenced by Player::_LoadInventory(), Player::GetBagByPos(), LuaItem::GetBagSize(), debug_commandscript::HandleDebugGetItemStateCommand(), IsNotEmptyBag(), and Player::SwapItem().
Definition at line 287 of file Item.cpp.
References Player::DestroyItem(), GetBagSlot(), Object::GetEntry(), GetSlot(), GetTemplate(), Object::GetUInt32Value(), ITEM_CHANGED, ITEM_FIELD_EXPIRATION, SetState(), Object::SetUInt32Value(), SF_LOG_DEBUG, and sScriptMgr.
Referenced by Player::UpdateItemDuration().
| void Item::UpdateItemSuffixFactor | ( | ) |
Definition at line 659 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 1129 of file Item.cpp.
References Object::GetUInt32Value(), HOUR, ITEM_CHANGED, ITEM_FIELD_CREATE_PLAYED_TIME, m_lastPlayedTimeUpdate, SetNotRefundable(), SetState(), and Object::SetUInt32Value().
Referenced by Player::_SaveInventory(), WorldSession::HandleTransmogrifyItems(), and Player::SendRefundInfo().
|
private |
Definition at line 375 of file Item.h.
Referenced by ClearSoulboundTradeable(), IsBindedNotWith(), and SetSoulboundTradeable().
| Loot Item::loot |
Definition at line 301 of file Item.h.
Referenced by DeleteFromDB(), WorldSession::DoLootRelease(), WorldSession::HandleAutostoreLootItemOpcode(), ItemContainerLoadLootFromDB(), ItemContainerSaveLootToDB(), SaveToDB(), and Player::SendLoot().
|
private |
Definition at line 367 of file Item.h.
Referenced by GetBagSlot(), GetContainer(), IsInBag(), Item(), and SetContainer().
|
private |
Definition at line 371 of file Item.h.
Referenced by GetPlayedTime(), Item(), and UpdatePlayedTime().
| bool Item::m_lootGenerated |
Definition at line 302 of file Item.h.
Referenced by Player::CanBankItem(), CanBeMergedPartlyWith(), CanBeTraded(), Player::CanEquipItem(), Player::CanStoreItem(), Player::CanStoreItems(), Player::CanTakeMoreSimilarItems(), Player::CanUnequipItem(), WorldSession::DoLootRelease(), Item(), ItemContainerLoadLootFromDB(), Player::SendLoot(), Player::SplitItem(), and Player::SwapItem().
|
private |
Definition at line 374 of file Item.h.
Referenced by GetPaidExtendedCost(), Item(), and SetPaidExtendedCost().
|
private |
Definition at line 373 of file Item.h.
Referenced by GetPaidMoney(), Item(), and SetPaidMoney().
|
private |
Definition at line 372 of file Item.h.
Referenced by GetRefundRecipient(), Item(), and SetRefundRecipient().
|
private |
|
private |
Definition at line 365 of file Item.h.
Referenced by GetText(), SaveToDB(), and SetText().
|
private |
Definition at line 370 of file Item.h.
Referenced by IsInTrade(), Item(), and SetInTrade().
|
private |
Definition at line 369 of file Item.h.
Referenced by AddToUpdateQueueOf(), GetQueuePos(), IsInUpdateQueue(), Item(), RemoveFromUpdateQueueOf(), and SetState().
|
private |
Definition at line 368 of file Item.h.
Referenced by FSetState(), GetState(), Item(), SaveToDB(), and SetState().