aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Loot/LootMgr.cpp
diff options
context:
space:
mode:
authorxinef1 <w.szyszko2@gmail.com>2017-04-12 03:22:50 +0200
committerariel- <ariel-@users.noreply.github.com>2017-04-11 22:22:50 -0300
commit9dc3de10f0044c35a95e9b72e7b874f4b5b8e867 (patch)
tree64b5fff4d0c0afcc17fea8e1f207d500b7d7a12a /src/server/game/Loot/LootMgr.cpp
parent1787718e258f0e3c7673b5886c098878fb8a17f6 (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
Diffstat (limited to 'src/server/game/Loot/LootMgr.cpp')
-rw-r--r--src/server/game/Loot/LootMgr.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index a301426f556..34712308070 100644
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -366,7 +366,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
@@ -692,33 +691,6 @@ void Loot::generateMoneyLoot(uint32 minAmount, uint32 maxAmount)
}
}
-void Loot::DeleteLootItemFromContainerItemDB(uint32 itemID)
-{
- // Deletes a single item associated with an openable item from the DB
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEMCONTAINER_ITEM);
- stmt->setUInt32(0, containerID);
- 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
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEMCONTAINER_MONEY);
- stmt->setUInt32(0, containerID);
- CharacterDatabase.Execute(stmt);
-}
-
LootItem* Loot::LootItemInSlot(uint32 lootSlot, Player* player, NotNormalLootItem* *qitem, NotNormalLootItem* *ffaitem, NotNormalLootItem* *conditem)
{
LootItem* item = NULL;