42 if (item->IsInWorld())
44 TC_LOG_FATAL(
"entities.player.items",
"Item {} (slot {}, bag slot {}) in bag {} (slot {}, bag slot {}, m_bagslot {}) is to be deleted but is still in world.",
45 item->GetEntry(), (
uint32)item->GetSlot(), (
uint32)item->GetBagSlot(),
47 item->RemoveFromWorld();
200 if (pItem && pItem != eItem && pItem->
GetEntry() == item)
222 if (pItem != skipItem)
224 if (pProto->ItemLimitCategory == limitCategory)
250 std::stringstream sstr;
SQLTransaction< CharacterDatabaseConnection > CharacterDatabaseTransaction
#define TC_LOG_FATAL(filterType__,...)
@ CONTAINER_FIELD_NUM_SLOTS
@ ITEM_FIELD_MAXDURABILITY
uint32 GetBagSize() const
void AddToWorld() override
void StoreItem(uint8 slot, Item *pItem, bool update)
void RemoveFromWorld() override
void SaveToDB(CharacterDatabaseTransaction trans) override
void BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) const override
bool Create(ObjectGuid::LowType guidlow, uint32 itemid, Player const *owner) override
Item * GetItemByPos(uint8 slot) const
std::string GetDebugInfo() const override
uint32 GetItemCount(uint32 item, Item *eItem=nullptr) const
void RemoveItem(uint8 slot, bool update)
void DeleteFromDB(CharacterDatabaseTransaction trans) override
Item * m_bagslot[MAX_BAG_SIZE]
uint32 GetFreeSlots() const
uint8 GetSlotByItemGUID(ObjectGuid guid) const
bool LoadFromDB(ObjectGuid::LowType guid, ObjectGuid owner_guid, Field *fields, uint32 entry) override
uint32 GetItemCountWithLimitCategory(uint32 limitCategory, Item *skipItem=nullptr) const
Class used to access individual fields of database query result.
std::string GetDebugInfo() const override
virtual bool LoadFromDB(ObjectGuid::LowType guid, ObjectGuid owner_guid, Field *fields, uint32 entry)
virtual void SaveToDB(CharacterDatabaseTransaction trans)
uint8 GetGemCountWithID(uint32 GemID) const
ItemTemplate const * GetTemplate() const
ObjectGuid GetOwnerGUID() const
void SetOwnerGUID(ObjectGuid guid)
void SetContainer(Bag *container)
static void DeleteFromDB(CharacterDatabaseTransaction trans, ObjectGuid::LowType itemGuid)
static ObjectGuid const Empty
virtual void BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) const
void SetGuidValue(uint16 index, ObjectGuid value)
void _Create(ObjectGuid const &guid)
virtual void AddToWorld()
virtual void RemoveFromWorld()
static ObjectGuid GetGUID(Object const *o)
void SetEntry(uint32 entry)
virtual void SetObjectScale(float scale)
void SetUInt32Value(uint16 index, uint32 value)
ObjectGuid GetGUID() const
std::array< _Socket, MAX_ITEM_PROTO_SOCKETS > Socket