diff options
Diffstat (limited to 'src/server/game/Loot')
-rw-r--r-- | src/server/game/Loot/Loot.cpp | 5 | ||||
-rw-r--r-- | src/server/game/Loot/Loot.h | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/server/game/Loot/Loot.cpp b/src/server/game/Loot/Loot.cpp index ff3a77279c4..91eac407aaa 100644 --- a/src/server/game/Loot/Loot.cpp +++ b/src/server/game/Loot/Loot.cpp @@ -613,7 +613,7 @@ void LootRoll::Finish(RollVoteMap::const_iterator winnerItr) Loot::Loot(Map* map, ObjectGuid owner, LootType type, Group const* group) : gold(0), unlootedCount(0), loot_type(type), maxDuplicates(1), _guid(map ? ObjectGuid::Create<HighGuid::LootObject>(map->GetId(), 0, map->GenerateLowGuid<HighGuid::LootObject>()) : ObjectGuid::Empty), _owner(owner), _itemContext(ItemContext::NONE), _lootMethod(group ? group->GetLootMethod() : FREE_FOR_ALL), - _lootMaster(group ? group->GetMasterLooterGuid() : ObjectGuid::Empty), _wasOpened(false) + _lootMaster(group ? group->GetMasterLooterGuid() : ObjectGuid::Empty), _wasOpened(false), _dungeonEncounterId(0) { } @@ -1044,7 +1044,7 @@ void Loot::FillNotNormalLootFor(Player const* player) // --------- AELootResult --------- // -void AELootResult::Add(Item* item, uint8 count, LootType lootType) +void AELootResult::Add(Item* item, uint8 count, LootType lootType, uint32 dungeonEncounterId) { auto itr = _byItem.find(item); if (itr != _byItem.end()) @@ -1056,6 +1056,7 @@ void AELootResult::Add(Item* item, uint8 count, LootType lootType) value.item = item; value.count = count; value.lootType = lootType; + value.dungeonEncounterId = dungeonEncounterId; _byOrder.push_back(value); } } diff --git a/src/server/game/Loot/Loot.h b/src/server/game/Loot/Loot.h index 3af9963aa06..fda1cb0e9c7 100644 --- a/src/server/game/Loot/Loot.h +++ b/src/server/game/Loot/Loot.h @@ -284,6 +284,8 @@ struct TC_GAME_API Loot ObjectGuid const& GetOwnerGUID() const { return _owner; } LootMethod GetLootMethod() const { return _lootMethod; } ObjectGuid const& GetLootMasterGUID() const { return _lootMaster; } + uint32 GetDungeonEncounterId() const { return _dungeonEncounterId; } + void SetDungeonEncounterId(uint32 dungeonEncounterId) { _dungeonEncounterId = dungeonEncounterId; } void clear(); @@ -331,6 +333,7 @@ private: ObjectGuid _lootMaster; GuidUnorderedSet _allowedLooters; bool _wasOpened; // true if at least one player received the loot content + uint32 _dungeonEncounterId; }; class TC_GAME_API AELootResult @@ -341,11 +344,12 @@ public: Item* item; uint8 count; LootType lootType; + uint32 dungeonEncounterId; }; typedef std::vector<ResultValue> OrderedStorage; - void Add(Item* item, uint8 count, LootType lootType); + void Add(Item* item, uint8 count, LootType lootType, uint32 dungeonEncounterId); OrderedStorage::const_iterator begin() const; OrderedStorage::const_iterator end() const; |