![]() |
TrinityCore
|
#include <Bag.h>
Inheritance diagram for Bag:Protected Member Functions | |
| void | SetBagSize (uint32 numSlots) |
| void | SetSlot (uint32 slot, ObjectGuid guid) |
Protected Member Functions inherited from Object | |
| Object () | |
| void | _InitValues () |
| void | _Create (ObjectGuid const &guid) |
| bool | _LoadIntoDataField (std::string const &data, uint32 startOffset, uint32 count) |
| uint32 | GetUpdateFieldData (Player const *target, uint32 *&flags) const |
| void | BuildMovementUpdate (ByteBuffer *data, uint16 flags) const |
| virtual void | BuildValuesUpdate (uint8 updatetype, ByteBuffer *data, Player const *target) const |
| void | AddToObjectUpdateIfNeeded () |
Protected Attributes | ||
| Item * | m_bagslot [MAX_BAG_SIZE] | |
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 | |
Additional Inherited Members | |
Static Public Member Functions inherited from Item | |
| static Item * | CreateItem (uint32 itemEntry, uint32 count, Player const *player=nullptr) |
| static void | DeleteFromDB (CharacterDatabaseTransaction trans, ObjectGuid::LowType itemGuid) |
| static void | DeleteFromInventoryDB (CharacterDatabaseTransaction trans, ObjectGuid::LowType itemGuid) |
| static uint32 | GetBuyPrice (ItemTemplate const *proto) |
| static uint32 | GetSellPrice (ItemTemplate const *proto) |
Static Public Member Functions inherited from Object | |
| static ObjectGuid | GetGUID (Object const *o) |
| static WorldObject * | ToWorldObject (Object *o) |
| static WorldObject const * | ToWorldObject (Object const *o) |
| static Item * | ToItem (Object *o) |
| static Item const * | ToItem (Object const *o) |
| static Player * | ToPlayer (Object *o) |
| static Player const * | ToPlayer (Object const *o) |
| static Creature * | ToCreature (Object *o) |
| static Creature const * | ToCreature (Object const *o) |
| static Unit * | ToUnit (Object *o) |
| static Unit const * | ToUnit (Object const *o) |
| static GameObject * | ToGameObject (Object *o) |
| static GameObject const * | ToGameObject (Object const *o) |
| static Corpse * | ToCorpse (Object *o) |
| static Corpse const * | ToCorpse (Object const *o) |
| static DynamicObject * | ToDynObject (Object *o) |
| static DynamicObject const * | ToDynObject (Object const *o) |
Public Attributes inherited from Item | |
| Loot | loot |
| bool | m_lootGenerated |
| Bag::Bag | ( | ) |
Definition at line 27 of file Bag.cpp.
References CONTAINER_END, m_bagslot, Object::m_objectType, Object::m_objectTypeId, Object::m_valuesCount, MAX_BAG_SIZE, TYPEID_CONTAINER, and TYPEMASK_CONTAINER.
| Bag::~Bag | ( | ) |
Definition at line 37 of file Bag.cpp.
References Item::GetBagSlot(), Object::GetEntry(), Item::GetSlot(), m_bagslot, MAX_BAG_SIZE, and TC_LOG_FATAL.
|
overridevirtual |
Reimplemented from Object.
Definition at line 53 of file Bag.cpp.
References Object::AddToWorld(), GetBagSize(), and m_bagslot.
|
overridevirtual |
Reimplemented from Object.
Definition at line 174 of file Bag.cpp.
References Object::BuildCreateUpdateBlockForPlayer(), GetBagSize(), and m_bagslot.
|
overridevirtual |
Reimplemented from Item.
Definition at line 71 of file Bag.cpp.
References Object::_Create(), ObjectGuid::Empty, ItemTemplate::GetContainerSlots(), Object::GetGUID(), m_bagslot, MAX_BAG_SIZE, ItemTemplate::MaxDurability, SetBagSize(), Item::SetContainedIn(), Item::SetCount(), Item::SetDurability(), Object::SetEntry(), Item::SetMaxDurability(), Object::SetObjectScale(), Item::SetOwnerGUID(), SetSlot(), and sObjectMgr.
|
overridevirtual |
Reimplemented from Item.
Definition at line 129 of file Bag.cpp.
References Item::DeleteFromDB(), m_bagslot, and MAX_BAG_SIZE.
|
inline |
Definition at line 47 of file Bag.h.
References CONTAINER_FIELD_NUM_SLOTS, and Object::GetUInt32Value().
Referenced by AddToWorld(), BuildCreateUpdateBlockForPlayer(), Player::CanStoreItem_InBag(), Player::CastAllObtainSpells(), GetFreeSlots(), GetItemByPos(), GetItemCount(), GetItemCountWithLimitCategory(), GetSlotByItemGUID(), IsEmpty(), RemoveFromWorld(), and Player::SwapItem().
|
overridevirtual |
| uint32 Bag::GetFreeSlots | ( | ) | const |
Definition at line 138 of file Bag.cpp.
References GetBagSize(), and m_bagslot.
Definition at line 240 of file Bag.cpp.
References GetBagSize(), and m_bagslot.
Referenced by Player::CastAllObtainSpells(), and Player::SwapItem().
Definition at line 193 of file Bag.cpp.
References GetBagSize(), Item::GetCount(), Object::GetEntry(), Item::GetGemCountWithID(), ItemTemplate::GetGemProperties(), ItemTemplate::GetSocketColor(), Item::GetTemplate(), and m_bagslot.
Definition at line 217 of file Bag.cpp.
References GetBagSize(), Item::GetCount(), and m_bagslot.
| uint8 Bag::GetSlotByItemGUID | ( | ObjectGuid | guid | ) | const |
Definition at line 230 of file Bag.cpp.
References GetBagSize(), Object::GetGUID(), m_bagslot, and NULL_SLOT.
| bool Bag::IsEmpty | ( | ) | const |
Definition at line 184 of file Bag.cpp.
References GetBagSize(), and m_bagslot.
Referenced by Player::SwapItem().
|
overridevirtual |
Reimplemented from Item.
Definition at line 111 of file Bag.cpp.
References CONTAINER_FIELD_NUM_SLOTS, CONTAINER_FIELD_SLOT_1, ObjectGuid::Empty, ItemTemplate::GetContainerSlots(), Item::GetTemplate(), Item::LoadFromDB(), m_bagslot, MAX_BAG_SIZE, Object::SetGuidValue(), and Object::SetUInt32Value().
|
overridevirtual |
Reimplemented from Object.
Definition at line 62 of file Bag.cpp.
References GetBagSize(), m_bagslot, and Object::RemoveFromWorld().
| void Bag::RemoveItem | ( | uint8 | slot, |
| bool | update | ||
| ) |
Definition at line 148 of file Bag.cpp.
References ASSERT, CONTAINER_FIELD_SLOT_1, ObjectGuid::Empty, m_bagslot, MAX_BAG_SIZE, Item::SetContainer(), and Object::SetGuidValue().
Referenced by Player::SwapItem().
|
overridevirtual |
|
inlineprotected |
Definition at line 62 of file Bag.h.
References CONTAINER_FIELD_NUM_SLOTS, and Object::SetUInt32Value().
Referenced by Create().
|
inlineprotected |
Definition at line 63 of file Bag.h.
References CONTAINER_FIELD_SLOT_1, and Object::SetGuidValue().
Referenced by Create().
Definition at line 159 of file Bag.cpp.
References ASSERT, CONTAINER_FIELD_SLOT_1, Object::GetGUID(), Object::GetGUID(), Item::GetOwnerGUID(), m_bagslot, MAX_BAG_SIZE, Item::SetContainedIn(), Item::SetContainer(), Object::SetGuidValue(), Item::SetOwnerGUID(), and Item::SetSlot().
Referenced by Player::_StoreItem(), and Player::SwapItem().
|
protected |
Definition at line 66 of file Bag.h.
Referenced by AddToWorld(), Bag(), BuildCreateUpdateBlockForPlayer(), Create(), DeleteFromDB(), GetFreeSlots(), GetItemByPos(), GetItemCount(), GetItemCountWithLimitCategory(), GetSlotByItemGUID(), IsEmpty(), LoadFromDB(), RemoveFromWorld(), RemoveItem(), StoreItem(), and ~Bag().