diff options
| author | Shauren <shauren.trinity@gmail.com> | 2014-03-29 13:29:22 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2014-03-29 13:29:22 +0100 |
| commit | 3fd6dd6175a3f75fd953083125ba3e62ab2bf1f4 (patch) | |
| tree | c8499a1d060c795041c48dbef71638c6df4e2ba9 /src/server/game/Loot/LootMgr.cpp | |
| parent | dee867547d302120467b3364307fdb1838f855f5 (diff) | |
Core/Loot
* Master Looter cannot freely loot items under threshold
* Update round robin looter only if loot is not empty
* Fixed loot bag icon appearing in raid frames when loot method was not Master Looter
* Fixed changing loot method reseting current round robin looter
Diffstat (limited to 'src/server/game/Loot/LootMgr.cpp')
| -rw-r--r-- | src/server/game/Loot/LootMgr.cpp | 63 |
1 files changed, 21 insertions, 42 deletions
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index cbb7036538c..270af559f0b 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -879,6 +879,8 @@ ByteBuffer& operator<<(ByteBuffer& b, LootView const& lv) switch (lv.permission) { case GROUP_PERMISSION: + case MASTER_PERMISSION: + case RESTRICTED_PERMISSION: { // if you are not the round-robin group looter, you can only see // blocked rolled items and quest items, and !ffa items @@ -888,9 +890,24 @@ ByteBuffer& operator<<(ByteBuffer& b, LootView const& lv) { uint8 slot_type; - if (l.items[i].is_blocked) - slot_type = LOOT_SLOT_TYPE_ROLL_ONGOING; - else if (l.roundRobinPlayer == 0 || !l.items[i].is_underthreshold || lv.viewer->GetGUID() == l.roundRobinPlayer) + if (l.items[i].is_blocked) // for ML & restricted is_blocked = !is_underthreshold + { + switch (lv.permission) + { + case GROUP_PERMISSION: + slot_type = LOOT_SLOT_TYPE_ROLL_ONGOING; + break; + case MASTER_PERMISSION: + slot_type = LOOT_SLOT_TYPE_MASTER; + break; + case RESTRICTED_PERMISSION: + slot_type = LOOT_SLOT_TYPE_LOCKED; + break; + default: + continue; + } + } + else if (l.roundRobinPlayer == 0 || lv.viewer->GetGUID() == l.roundRobinPlayer || !l.items[i].is_underthreshold) { // no round robin owner or he has released the loot // or it IS the round robin group owner @@ -926,51 +943,13 @@ ByteBuffer& operator<<(ByteBuffer& b, LootView const& lv) break; } case ALL_PERMISSION: - case MASTER_PERMISSION: case OWNER_PERMISSION: { - uint8 slot_type = LOOT_SLOT_TYPE_ALLOW_LOOT; - switch (lv.permission) - { - case MASTER_PERMISSION: - slot_type = LOOT_SLOT_TYPE_MASTER; - break; - case OWNER_PERMISSION: - slot_type = LOOT_SLOT_TYPE_OWNER; - break; - default: - break; - } - - for (uint8 i = 0; i < l.items.size(); ++i) - { - if (!l.items[i].is_looted && !l.items[i].freeforall && l.items[i].conditions.empty() && l.items[i].AllowedForPlayer(lv.viewer)) - { - b << uint8(i) << l.items[i]; - b << uint8(slot_type); - ++itemsShown; - } - } - break; - } - case RESTRICTED_PERMISSION: - { + uint8 slot_type = lv.permission == OWNER_PERMISSION ? LOOT_SLOT_TYPE_OWNER : LOOT_SLOT_TYPE_ALLOW_LOOT; for (uint8 i = 0; i < l.items.size(); ++i) { if (!l.items[i].is_looted && !l.items[i].freeforall && l.items[i].conditions.empty() && l.items[i].AllowedForPlayer(lv.viewer)) { - uint8 slot_type; - - if (l.items[i].is_blocked) - slot_type = LOOT_SLOT_TYPE_LOCKED; - else - { - if (l.roundRobinPlayer == 0 || lv.viewer->GetGUID() == l.roundRobinPlayer) - slot_type = LOOT_SLOT_TYPE_ALLOW_LOOT; - else - continue; // item shall not be displayed - } - b << uint8(i) << l.items[i]; b << uint8(slot_type); ++itemsShown; |
