aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Loot/Loot.cpp
diff options
context:
space:
mode:
authorxinef1 <w.szyszko2@gmail.com>2017-04-12 03:22:50 +0200
committerfunjoker <funjoker109@gmail.com>2020-04-27 12:25:52 +0200
commit090fd8304a7a6e2f7c233ac39c94ccc67cc816f8 (patch)
tree2c32dcab82f2befd0a9638543726c21ec9de228d /src/server/game/Loot/Loot.cpp
parent4e03d2717a7f971263f17639eb496c0b3b248018 (diff)
Core/Loot: implement Loot Item Storage (#19018)
* Created Item Loot Storage, no more synchronous DB selects * Fixed buyback case, where stored loot was not removed from db * Added Primary key, and changed field types to be unsigned for table item_loot_money (cherry picked from commit 9dc3de10f0044c35a95e9b72e7b874f4b5b8e867)
Diffstat (limited to 'src/server/game/Loot/Loot.cpp')
-rw-r--r--src/server/game/Loot/Loot.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/server/game/Loot/Loot.cpp b/src/server/game/Loot/Loot.cpp
index 88365d6641f..9e4dc90cab9 100644
--- a/src/server/game/Loot/Loot.cpp
+++ b/src/server/game/Loot/Loot.cpp
@@ -54,7 +54,6 @@ LootItem::LootItem(LootStoreItem const& li)
is_underthreshold = 0;
is_counted = 0;
rollWinnerGUID = ObjectGuid::Empty;
- canSave = true;
}
// Basic checks for player/item compatibility - if false no chance to see the item in the loot
@@ -104,33 +103,6 @@ Loot::~Loot()
clear();
}
-void Loot::DeleteLootItemFromContainerItemDB(uint32 itemID)
-{
- // Deletes a single item associated with an openable item from the DB
- CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEMCONTAINER_ITEM);
- stmt->setUInt64(0, containerID.GetCounter());
- stmt->setUInt32(1, itemID);
- CharacterDatabase.Execute(stmt);
-
- // Mark the item looted to prevent resaving
- for (LootItemList::iterator _itr = items.begin(); _itr != items.end(); ++_itr)
- {
- if (_itr->itemid != itemID)
- continue;
-
- _itr->canSave = false;
- break;
- }
-}
-
-void Loot::DeleteLootMoneyFromContainerItemDB()
-{
- // Deletes money loot associated with an openable item from the DB
- CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEMCONTAINER_MONEY);
- stmt->setUInt64(0, containerID.GetCounter());
- CharacterDatabase.Execute(stmt);
-}
-
void Loot::clear()
{
for (NotNormalLootItemMap::const_iterator itr = PlayerQuestItems.begin(); itr != PlayerQuestItems.end(); ++itr)