aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Loot/Loot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Loot/Loot.cpp')
-rw-r--r--src/server/game/Loot/Loot.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/Loot/Loot.cpp b/src/server/game/Loot/Loot.cpp
index 2cc6f2b9017..02e8024221b 100644
--- a/src/server/game/Loot/Loot.cpp
+++ b/src/server/game/Loot/Loot.cpp
@@ -51,6 +51,7 @@ LootItem::LootItem(LootStoreItem const& li)
needs_quest = li.needs_quest;
+ randomProperties = sItemEnchantmentMgr->GenerateRandomProperties(itemid);
context = ItemContext::NONE;
count = 0;
is_looted = false;
@@ -885,7 +886,7 @@ bool Loot::AutoStore(Player* player, uint8 bag, uint8 slot, bool broadcast, bool
--unlootedCount;
- Item* pItem = player->StoreNewItem(dest, lootItem->itemid, true, GuidSet(), lootItem->context);
+ Item* pItem = player->StoreNewItem(dest, lootItem->itemid, true, lootItem->randomProperties, GuidSet(), lootItem->context);
player->SendNewItem(pItem, lootItem->count, false, createdByPlayer, broadcast);
player->ApplyItemLootedSpell(pItem, true);
}