![]() |
TrinityCore
|
#include <Item.h>
Classes | |
struct | ValuesUpdateForPlayerWithMaskSender |
Static Public Member Functions | |
static Item * | CreateItem (uint32 itemEntry, uint32 count, ItemContext context, Player const *player=nullptr) |
static void | DeleteFromDB (CharacterDatabaseTransaction trans, ObjectGuid::LowType itemGuid) |
static void | DeleteFromInventoryDB (CharacterDatabaseTransaction trans, ObjectGuid::LowType itemGuid) |
static uint32 | GetItemLevel (ItemTemplate const *itemTemplate, BonusData const &bonusData, uint32 level, uint32 fixedLevel, uint32 minItemLevel, uint32 minItemLevelCutoff, uint32 maxItemLevel, bool pvpBonus, uint32 azeriteLevel) |
static ItemDisenchantLootEntry const * | GetDisenchantLoot (ItemTemplate const *itemTemplate, uint32 quality, uint32 itemLevel) |
static bool | HasStats (WorldPackets::Item::ItemInstance const &itemInstance, BonusData const *bonus) |
static bool | CanTransmogrifyItemWithItem (Item const *item, ItemModifiedAppearanceEntry const *itemModifiedAppearance) |
static uint32 | GetBuyPrice (ItemTemplate const *proto, uint32 quality, uint32 itemLevel, bool &standardPrice) |
static uint32 | GetSellPrice (ItemTemplate const *proto, uint32 quality, uint32 itemLevel) |
![]() | |
static ObjectGuid | GetGUID (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) |
static AreaTrigger * | ToAreaTrigger (Object *o) |
static AreaTrigger const * | ToAreaTrigger (Object const *o) |
static SceneObject * | ToSceneObject (Object *o) |
static SceneObject const * | ToSceneObject (Object const *o) |
static Conversation * | ToConversation (Object *o) |
static Conversation const * | ToConversation (Object const *o) |
Public Attributes | |
std::unique_ptr< Loot > | m_loot |
bool | m_lootGenerated |
UF::UpdateField< UF::ItemData, 0, TYPEID_ITEM > | m_itemData |
![]() | |
UF::UpdateFieldHolder | m_values |
UF::UpdateField< UF::ObjectData, 0, TYPEID_OBJECT > | m_objectData |
Protected Member Functions | |
UF::UpdateFieldFlag | GetUpdateFieldFlagsFor (Player const *target) const override |
void | BuildValuesCreate (ByteBuffer *data, Player const *target) const override |
void | BuildValuesUpdate (ByteBuffer *data, Player const *target) const override |
void | ClearUpdateMask (bool remove) override |
void | ApplyBonusList (uint32 itemBonusListId) |
![]() | |
Object () | |
void | _Create (ObjectGuid const &guid) |
template<typename T > | |
void | SetUpdateFieldValue (UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value) |
template<typename T > | |
void | SetUpdateFieldFlagValue (UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type flag) |
template<typename T > | |
void | RemoveUpdateFieldFlagValue (UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type flag) |
template<typename T > | |
UF::DynamicUpdateFieldSetter< T >::insert_result | AddDynamicUpdateFieldValue (UF::DynamicUpdateFieldSetter< T > setter) |
template<typename T > | |
UF::DynamicUpdateFieldSetter< T >::insert_result | InsertDynamicUpdateFieldValue (UF::DynamicUpdateFieldSetter< T > setter, uint32 index) |
template<typename T > | |
void | RemoveDynamicUpdateFieldValue (UF::DynamicUpdateFieldSetter< T > setter, uint32 index) |
template<typename T > | |
void | ClearDynamicUpdateFieldValues (UF::DynamicUpdateFieldSetter< T > setter) |
template<typename T > | |
void | RemoveOptionalUpdateFieldValue (UF::OptionalUpdateFieldSetter< T > setter) |
template<typename T > | |
void | SetUpdateFieldStatValue (UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value) |
template<typename T > | |
void | ApplyModUpdateFieldValue (UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type mod, bool apply) |
template<typename T > | |
void | ApplyPercentModUpdateFieldValue (UF::UpdateFieldSetter< T > setter, float percent, bool apply) |
template<typename Action > | |
void | DoWithSuppressingObjectUpdates (Action &&action) |
void | BuildMovementUpdate (ByteBuffer *data, CreateObjectBits flags, Player *target) const |
virtual UF::UpdateFieldFlag | GetUpdateFieldFlagsFor (Player const *target) const |
virtual void | BuildValuesCreate (ByteBuffer *data, Player const *target) const =0 |
virtual void | BuildValuesUpdate (ByteBuffer *data, Player const *target) const =0 |
virtual bool | AddToObjectUpdate ()=0 |
virtual void | RemoveFromObjectUpdate ()=0 |
void | AddToObjectUpdateIfNeeded () |
Protected Attributes | |
BonusData | _bonusData |
![]() | |
uint16 | m_objectType |
TypeID | m_objectTypeId |
CreateObjectBits | m_updateFlag |
bool | m_objectUpdated |
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 |
uint64 | m_paidMoney |
uint32 | m_paidExtendedCost |
GuidSet | allowedGUIDs |
ItemRandomBonusListId | m_randomBonusListId |
ObjectGuid | m_childItem |
std::unordered_map< uint32, uint16 > | m_artifactPowerIdToIndex |
std::array< uint32, MAX_ITEM_PROTO_SOCKETS > | m_gemScalingLevels |
Friends | |
void | AddItemToUpdateQueueOf (Item *item, Player *player) |
void | RemoveItemFromUpdateQueueOf (Item *item, Player *player) |
Item::Item | ( | ) |
|
default |
void Item::AddArtifactPower | ( | ArtifactPowerData const * | artifactPower | ) |
void Item::AddBonuses | ( | uint32 | bonusListID | ) |
|
overridevirtual |
Implements Object.
void Item::ApplyArtifactPowerEnchantmentBonuses | ( | EnchantmentSlot | slot, |
uint32 | enchantId, | ||
bool | apply, | ||
Player * | owner | ||
) |
|
protected |
|
overridevirtual |
Reimplemented from Object.
|
overrideprotectedvirtual |
Implements Object.
|
overrideprotectedvirtual |
void Item::BuildValuesUpdateForPlayerWithMask | ( | UpdateData * | data, |
UF::ObjectData::Mask const & | requestedObjectMask, | ||
UF::ItemData::Mask const & | requestedItemMask, | ||
Player const * | target | ||
) | const |
|
overridevirtual |
Reimplemented from Object.
uint64 Item::CalculateDurabilityRepairCost | ( | float | discount | ) | const |
InventoryResult Item::CanBeMergedPartlyWith | ( | ItemTemplate const * | proto | ) | const |
bool Item::CanBeTraded | ( | bool | mail = false , |
bool | trade = false |
||
) | const |
|
static |
void Item::CheckArtifactRelicSlotUnlock | ( | Player const * | owner | ) |
bool Item::CheckSoulboundTradeExpire | ( | ) |
void Item::ClearBonuses | ( | ) |
void Item::ClearEnchantment | ( | EnchantmentSlot | slot | ) |
void Item::ClearSoulboundTradeable | ( | Player * | currentOwner | ) |
|
overrideprotectedvirtual |
Reimplemented from Object.
void Item::CopyArtifactDataFromParent | ( | Item * | parent | ) |
|
virtual |
Reimplemented in AzeriteEmpoweredItem, AzeriteItem, and Bag.
|
static |
|
virtual |
Reimplemented in AzeriteEmpoweredItem, AzeriteItem, and Bag.
|
static |
void Item::DeleteFromInventoryDB | ( | CharacterDatabaseTransaction | trans | ) |
|
static |
void Item::DeleteRefundDataFromDB | ( | CharacterDatabaseTransaction * | trans | ) |
|
inline |
bool Item::GemsFitSockets | ( | ) | const |
|
inline |
UF::ArtifactPower const * Item::GetArtifactPower | ( | uint32 | artifactPowerId | ) | const |
uint8 Item::GetBagSlot | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
static |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
overridevirtual |
Reimplemented from Object.
|
static |
ItemDisenchantLootEntry const * Item::GetDisenchantLoot | ( | Player const * | owner | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
uint32 Item::GetEnchantRequiredLevel | ( | ) | const |
UF::SocketedGem const * Item::GetGem | ( | uint16 | slot | ) | const |
|
inline |
|
static |
ItemModifiedAppearanceEntry const * Item::GetItemModifiedAppearance | ( | ) | const |
|
inline |
|
inline |
uint32 Item::GetModifier | ( | ItemModifier | modifier | ) | const |
|
overridevirtual |
Implements Object.
Player * Item::GetOwner | ( | ) | const |
|
inline |
|
inline |
|
inline |
uint32 Item::GetPlayedTime | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
int32 Item::GetRequiredLevel | ( | ) | const |
|
inline |
|
inline |
|
static |
uint32 Item::GetSkill | ( | ) |
|
inline |
|
inline |
|
inline |
ItemTemplate const * Item::GetTemplate | ( | ) | const |
|
inline |
uint32 Item::GetTotalPurchasedArtifactPowers | ( | ) | const |
uint32 Item::GetTotalUnlockedArtifactPowers | ( | ) | const |
|
overrideprotectedvirtual |
Reimplemented from Object.
bool Item::HasEnchantRequiredSkill | ( | Player const * | player | ) | const |
|
inlineoverridevirtual |
Reimplemented from Object.
|
inline |
|
inline |
bool Item::HasStats | ( | ) | const |
|
static |
bool Item::IsArtifactDisabled | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
bool Item::IsBindedNotWith | ( | Player const * | player | ) | const |
|
inline |
|
inline |
bool Item::IsBoundByEnchant | ( | ) | const |
|
inline |
|
inline |
|
inline |
bool Item::IsEquipped | ( | ) | const |
bool Item::IsFitToSpellRequirements | ( | SpellInfo const * | spellInfo | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
bool Item::IsNotEmptyBag | ( | ) | const |
|
inline |
|
inline |
|
inline |
bool Item::IsRefundExpired | ( | ) |
|
inline |
bool Item::IsValidTransmogrificationTarget | ( | ) | const |
|
inline |
|
inline |
void Item::LoadArtifactData | ( | Player const * | owner, |
uint64 | xp, | ||
uint32 | artifactAppearanceId, | ||
uint32 | artifactTier, | ||
std::vector< ArtifactPowerData > & | powers | ||
) |
|
virtual |
Reimplemented in Bag.
|
overridevirtual |
|
inline |
|
inline |
|
inline |
|
inline |
void Item::SaveRefundDataToDB | ( | ) |
|
virtual |
Reimplemented in AzeriteEmpoweredItem, AzeriteItem, and Bag.
void Item::SendTimeUpdate | ( | Player * | owner | ) |
void Item::SendUpdateSockets | ( | ) |
|
inline |
void Item::SetArtifactPower | ( | uint16 | artifactPowerId, |
uint8 | purchasedRank, | ||
uint8 | currentRankWithBonus | ||
) |
|
inline |
|
inline |
void Item::SetBonuses | ( | std::vector< int32 > | bonusListIDs | ) |
|
inline |
|
inline |
|
inline |
|
inline |
void Item::SetCount | ( | uint32 | value | ) |
|
inline |
|
inline |
|
inline |
void Item::SetEnchantment | ( | EnchantmentSlot | slot, |
uint32 | id, | ||
uint32 | duration, | ||
uint32 | charges, | ||
ObjectGuid | caster = ObjectGuid::Empty |
||
) |
void Item::SetEnchantmentCharges | ( | EnchantmentSlot | slot, |
uint32 | charges | ||
) |
void Item::SetEnchantmentDuration | ( | EnchantmentSlot | slot, |
uint32 | duration, | ||
Player * | owner | ||
) |
|
inline |
void Item::SetFixedLevel | ( | uint8 | level | ) |
void Item::SetGem | ( | uint16 | slot, |
ItemDynamicFieldGems const * | gem, | ||
uint32 | gemScalingLevel | ||
) |