![]() |
TrinityCore
|
#include <Bag.h>
Inheritance diagram for Bag:Classes | |
| struct | ValuesUpdateForPlayerWithMaskSender |
Public Attributes | |
| UF::UpdateField< UF::ContainerData, int32(WowCS::EntityFragment::CGObject), TYPEID_CONTAINER > | m_containerData |
Public Attributes inherited from Item | |
| std::unique_ptr< Loot > | m_loot |
| bool | m_lootGenerated |
| UF::UpdateField< UF::ItemData, uint32(WowCS::EntityFragment::CGObject), TYPEID_ITEM > | m_itemData |
Public Attributes inherited from Object | |
| UF::UpdateField< UF::ObjectData, int32(WowCS::EntityFragment::CGObject), TYPEID_OBJECT > | m_objectData |
Public Attributes inherited from BaseEntity | |
| UF::UpdateFieldHolder | m_values |
Protected Attributes | |
| Item * | m_bagslot [MAX_BAG_SIZE] |
Protected Attributes inherited from Item | |
| BonusData | _bonusData |
Protected Attributes inherited from BaseEntity | |
| TypeID | m_objectTypeId = NUM_CLIENT_OBJECT_TYPES |
| CreateObjectBits | m_updateFlag = {} |
| WowCS::EntityFragmentsHolder | m_entityFragments |
| bool | m_objectUpdated = false |
Additional Inherited Members | |
Static Public Member Functions inherited from Item | |
| static Item * | CreateItem (uint32 itemEntry, uint32 count, ItemContext context, Player const *player=nullptr, bool addDefaultBonuses=true) |
| 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, int32 minItemLevel, int32 minItemLevelCutoff, int32 maxItemLevel, bool pvpBonus, uint32 azeriteLevel, uint32 overrideContentTuningId) |
| static ItemDisenchantLootEntry const * | GetBaseDisenchantLoot (ItemTemplate const *itemTemplate, uint32 quality, uint32 itemLevel) |
| 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 Public Member Functions inherited from Object | |
| static WorldObject * | ToWorldObject (Object *o) |
| static WorldObject const * | ToWorldObject (Object const *o) |
| static Item * | ToItem (Object *o) |
| static Item const * | ToItem (Object const *o) |
| static Unit * | ToUnit (Object *o) |
| static Unit const * | ToUnit (Object const *o) |
| static Creature * | ToCreature (Object *o) |
| static Creature const * | ToCreature (Object const *o) |
| static Player * | ToPlayer (Object *o) |
| static Player const * | ToPlayer (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) |
Static Public Member Functions inherited from BaseEntity | |
| static ObjectGuid | GetGUID (BaseEntity const *o) |
Static Protected Member Functions inherited from BaseEntity | |
| static void | BuildEntityFragments (ByteBuffer &data, std::span< WowCS::EntityFragment const > fragments) |
| Bag::Bag | ( | ) |
Definition at line 27 of file Bag.cpp.
References WowCS::EntityFragmentsHolder::Add(), m_bagslot, BaseEntity::m_entityFragments, BaseEntity::m_objectTypeId, MAX_BAG_SIZE, WowCS::Tag_Container, and TYPEID_CONTAINER.
| Bag::~Bag | ( | ) |
Definition at line 36 of file Bag.cpp.
References Item::GetBagSlot(), Object::GetEntry(), Item::GetSlot(), m_bagslot, MAX_BAG_SIZE, and TC_LOG_FATAL.
|
overridevirtual |
Reimplemented from BaseEntity.
Definition at line 52 of file Bag.cpp.
References BaseEntity::AddToWorld(), Object::AddToWorld(), GetBagSize(), and m_bagslot.
|
overrideprotectedvirtual |
Reimplemented from BaseEntity.
Definition at line 176 of file Bag.cpp.
References BaseEntity::BuildCreateUpdateBlockForPlayer(), GetBagSize(), and m_bagslot.
|
overrideprotectedvirtual |
Implements Object.
Definition at line 185 of file Bag.cpp.
References flags, m_containerData, Item::m_itemData, and Object::m_objectData.
|
overrideprotectedvirtual |
Implements Object.
Definition at line 192 of file Bag.cpp.
References flags, UF::UpdateFieldHolder::GetChangedObjectTypeMask(), UF::UpdateFieldHolder::HasChanged(), m_containerData, Item::m_itemData, Object::m_objectData, BaseEntity::m_values, TYPEID_CONTAINER, TYPEID_ITEM, and TYPEID_OBJECT.
| void Bag::BuildValuesUpdateForPlayerWithMask | ( | UpdateData * | data, |
| UF::ObjectData::Mask const & | requestedObjectMask, | ||
| UF::ItemData::Mask const & | requestedItemMask, | ||
| UF::ContainerData::Mask const & | requestedContainerMask, | ||
| Player const * | target, | ||
| bool | ignoreNestedChangesMask | ||
| ) | const |
Definition at line 206 of file Bag.cpp.
References UpdateData::AddUpdateBlock(), Object::BuildEntityFragmentsForValuesUpdateForPlayerWithMask(), UF::ItemData::FilterDisallowedFieldsMaskForFlag(), flags, UpdateMask< Bits >::GetBlock(), Item::GetUpdateFieldFlagsFor(), m_containerData, Item::m_itemData, Object::m_objectData, BaseEntity::PrepareValuesUpdateBuffer(), ByteBuffer::put(), UpdateMask< Bits >::Set(), TYPEID_CONTAINER, TYPEID_ITEM, TYPEID_OBJECT, and ByteBuffer::wpos().
Referenced by Bag::ValuesUpdateForPlayerWithMaskSender::operator()().
|
overrideprotectedvirtual |
Reimplemented from Object.
Definition at line 255 of file Bag.cpp.
References UF::UpdateFieldHolder::ClearChangesMask(), Item::ClearValuesChangesMask(), m_containerData, and BaseEntity::m_values.
|
overridevirtual |
Reimplemented from Item.
Definition at line 70 of file Bag.cpp.
References Item::_bonusData, BaseEntity::_Create(), ObjectGuid::Empty, ItemTemplate::GetContainerSlots(), BaseEntity::GetGUID(), BonusData::Initialize(), m_bagslot, MAX_BAG_SIZE, ItemTemplate::MaxDurability, SetBagSize(), Item::SetContainedIn(), Item::SetContext(), Item::SetCount(), Item::SetDurability(), Object::SetEntry(), Item::SetMaxDurability(), Object::SetObjectScale(), Item::SetOwnerGUID(), SetSlot(), and sObjectMgr.
|
overridevirtual |
Reimplemented from Item.
Definition at line 131 of file Bag.cpp.
References Item::DeleteFromDB(), m_bagslot, and MAX_BAG_SIZE.
|
inline |
Definition at line 45 of file Bag.h.
Referenced by AddToWorld(), BuildCreateUpdateBlockForPlayer(), Player::CanStoreItem_InBag(), Player::CastAllObtainSpells(), GetBagSize(), GetFreeSlots(), GetItemByPos(), GetSlotByItemGUID(), Player::HasItemTotemCategory(), IsEmpty(), RemoveFromWorld(), and Player::SwapItem().
| uint32 Bag::GetFreeSlots | ( | ) | const |
Definition at line 140 of file Bag.cpp.
References GetBagSize(), and m_bagslot.
Definition at line 281 of file Bag.cpp.
References GetBagSize(), and m_bagslot.
Referenced by Player::CastAllObtainSpells(), GetItemInBag(), and Player::SwapItem().
| uint8 Bag::GetSlotByItemGUID | ( | ObjectGuid | guid | ) | const |
Definition at line 271 of file Bag.cpp.
References GetBagSize(), BaseEntity::GetGUID(), m_bagslot, and NULL_SLOT.
| bool Bag::IsEmpty | ( | ) | const |
Definition at line 262 of file Bag.cpp.
References GetBagSize(), and m_bagslot.
Referenced by Player::SwapItem().
|
overridevirtual |
Reimplemented from Item.
Definition at line 113 of file Bag.cpp.
References ObjectGuid::Empty, ItemTemplate::GetContainerSlots(), Item::GetTemplate(), Item::LoadFromDB(), m_bagslot, MAX_BAG_SIZE, SetBagSize(), and SetSlot().
|
overridevirtual |
Reimplemented from BaseEntity.
Definition at line 61 of file Bag.cpp.
References GetBagSize(), m_bagslot, BaseEntity::RemoveFromWorld(), and Object::RemoveFromWorld().
| void Bag::RemoveItem | ( | uint8 | slot, |
| bool | update | ||
| ) |
Definition at line 150 of file Bag.cpp.
References ASSERT, ObjectGuid::Empty, m_bagslot, MAX_BAG_SIZE, Item::SetContainer(), and SetSlot().
Referenced by Player::SwapItem().
|
overridevirtual |
|
inlineprotected |
Definition at line 81 of file Bag.h.
References m_containerData, UF::ContainerData::NumSlots, and BaseEntity::SetUpdateFieldValue().
Referenced by Create(), and LoadFromDB().
|
inlineprotected |
Definition at line 82 of file Bag.h.
References m_containerData, BaseEntity::SetUpdateFieldValue(), and UF::ContainerData::Slots.
Referenced by Create(), LoadFromDB(), RemoveItem(), and StoreItem().
Definition at line 161 of file Bag.cpp.
References ASSERT, BaseEntity::GetGUID(), Item::GetOwnerGUID(), m_bagslot, MAX_BAG_SIZE, Item::SetContainedIn(), Item::SetContainer(), Item::SetOwnerGUID(), SetSlot(), and Item::SetSlot().
Referenced by Player::_StoreItem(), and Player::SwapItem().
|
protected |
Definition at line 85 of file Bag.h.
Referenced by AddToWorld(), Bag(), BuildCreateUpdateBlockForPlayer(), Create(), DeleteFromDB(), GetFreeSlots(), GetItemByPos(), GetSlotByItemGUID(), IsEmpty(), LoadFromDB(), RemoveFromWorld(), RemoveItem(), StoreItem(), and ~Bag().
| UF::UpdateField<UF::ContainerData, int32(WowCS::EntityFragment::CGObject), TYPEID_CONTAINER> Bag::m_containerData |
Definition at line 78 of file Bag.h.
Referenced by BuildValuesCreate(), BuildValuesUpdate(), BuildValuesUpdateForPlayerWithMask(), ClearValuesChangesMask(), SetBagSize(), and SetSlot().