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 | |
| 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')
| -rw-r--r-- | src/server/game/Loot/LootMgr.cpp | 8 | ||||
| -rw-r--r-- | src/server/game/Loot/LootMgr.h | 1 |
2 files changed, 9 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 diff --git a/src/server/game/Loot/LootMgr.h b/src/server/game/Loot/LootMgr.h index 7f4c9d0e920..cb66025b21a 100644 --- a/src/server/game/Loot/LootMgr.h +++ b/src/server/game/Loot/LootMgr.h @@ -155,6 +155,7 @@ struct TC_GAME_API LootItem int32 randomPropertyId; ConditionContainer conditions; // additional loot condition AllowedLooterSet allowedGUIDs; + ObjectGuid rollWinnerGUID; // Stores the guid of person who won loot, if his bags are full only he can see the item in loot list! uint8 count : 8; bool is_looted : 1; bool is_blocked : 1; |
