void Item::AddToUpdateQueueOf(Player* player) { if (IsInUpdateQueue()) return; if (!player) { player = GetOwner(); if (!player) { DeleteFromInventoryDB(); DeleteFromDB(); sLog.outError("Item::AddToUpdateQueueOf - %s current owner (%s) not in world!", GetGuidStr().c_str(), GetOwnerGuid().GetString().c_str()); return; } } if (player->GetObjectGuid() != GetOwnerGuid()) { sLog.outError("Item::AddToUpdateQueueOf - %s current owner (%s) and inventory owner (%s) don't match!", GetGuidStr().c_str(), GetOwnerGuid().GetString().c_str(), player->GetGuidStr().c_str()); return; } if (player->m_itemUpdateQueueBlocked) return; player->m_itemUpdateQueue.push_back(this); m_queuePos = player->m_itemUpdateQueue.size() - 1; }
void Item::DeleteFromInventoryDB() { DeleteFromInventoryDB(GetGUIDLow()); }
void Item::DeleteFromInventoryDB(SQLTransaction& trans) { DeleteFromInventoryDB(trans, GetGUID().GetCounter()); }
void Item::DeleteFromInventoryDB(SQLTransaction& trans) { DeleteFromInventoryDB(trans, GetGUIDLow()); }
void Item::DeleteFromInventoryDB(SQLTransaction& trans, uint32 playerGuid) { DeleteFromInventoryDB(trans, GetGUIDLow(), playerGuid); }