aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Entities')
-rw-r--r--src/server/game/Entities/Item/Item.cpp15
-rw-r--r--src/server/game/Entities/Item/Item.h2
2 files changed, 8 insertions, 9 deletions
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp
index 5303fb8dc38..dd54a3d39db 100644
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -1210,7 +1210,6 @@ bool Item::CheckSoulboundTradeExpire()
void Item::ItemContainerSaveLootToDB()
{
// Saves the money and item loot associated with an openable item to the DB
-
if (loot.isLooted()) // no money and no loot
return;
@@ -1235,7 +1234,7 @@ void Item::ItemContainerSaveLootToDB()
// Save items
if (!loot.isLooted())
{
-
+
PreparedStatement* stmt_items = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEMCONTAINER_ITEMS);
stmt_items->setUInt32(0, container_id);
trans->Append(stmt_items);
@@ -1272,7 +1271,6 @@ void Item::ItemContainerSaveLootToDB()
bool Item::ItemContainerLoadLootFromDB()
{
// Loads the money and item loot associated with an openable item from the DB
-
// Default. If there are no records for this item then it will be rolled for in Player::SendLoot()
m_lootGenerated = false;
@@ -1335,18 +1333,19 @@ bool Item::ItemContainerLoadLootFromDB()
// Finally add the LootItem to the container
loot.items.push_back(loot_item);
-
+
// Increment unlooted count
loot.unlootedCount++;
- } while (item_result->NextRow());
+ }
+ while (item_result->NextRow());
}
}
- // Mark the item if it has loot so it won't be generated again on open
- m_lootGenerated = !loot.isLooted();
+ // Mark the item if it has loot so it won't be generated again on open
+ m_lootGenerated = !loot.isLooted();
- return m_lootGenerated;
+ return m_lootGenerated;
}
void Item::ItemContainerDeleteLootItemsFromDB()
diff --git a/src/server/game/Entities/Item/Item.h b/src/server/game/Entities/Item/Item.h
index 2e1956250f3..ffe31ed765e 100644
--- a/src/server/game/Entities/Item/Item.h
+++ b/src/server/game/Entities/Item/Item.h
@@ -231,7 +231,7 @@ class Item : public Object
static void DeleteFromDB(SQLTransaction& trans, uint32 itemGuid);
virtual void DeleteFromDB(SQLTransaction& trans);
static void DeleteFromInventoryDB(SQLTransaction& trans, uint32 itemGuid);
-
+
// Lootable items and their contents
void ItemContainerSaveLootToDB();
bool ItemContainerLoadLootFromDB();