diff options
author | xinef1 <w.szyszko2@gmail.com> | 2017-02-04 14:58:50 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2017-02-04 14:58:50 +0100 |
commit | ab6ac42bf032b723167c37caed875c76a1295ec6 (patch) | |
tree | f0e8b93195cbf239d7486534b180c6eaf69c6964 /src/server/game/Loot/LootMgr.cpp | |
parent | ce774918a7959b7780d6af9e095b3b5fcdbccfe2 (diff) |
Core/Loot: Only allow the roll winner to loot the item he won in case it cannot be added to inventory instantly (full or any other reason) (#19037)
Diffstat (limited to 'src/server/game/Loot/LootMgr.cpp')
-rw-r--r-- | src/server/game/Loot/LootMgr.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index 03545894a8a..d25eca4b036 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -365,6 +365,7 @@ LootItem::LootItem(LootStoreItem const& li) is_blocked = 0; is_underthreshold = 0; is_counted = 0; + rollWinnerGUID = ObjectGuid::Empty; canSave = true; } @@ -921,6 +922,13 @@ ByteBuffer& operator<<(ByteBuffer& b, LootView const& lv) continue; } } + else if (!l.items[i].rollWinnerGUID.IsEmpty()) + { + if (l.items[i].rollWinnerGUID == lv.viewer->GetGUID()) + slot_type = LOOT_SLOT_TYPE_OWNER; + else + continue; + } else if (l.roundRobinPlayer.IsEmpty() || lv.viewer->GetGUID() == l.roundRobinPlayer || !l.items[i].is_underthreshold) { // no round robin owner or he has released the loot |