diff --git a/src/game/Group.cpp b/src/game/Group.cpp index 08f7d616b..c2c83e3fc 100644 --- a/src/game/Group.cpp +++ b/src/game/Group.cpp @@ -580,8 +580,17 @@ void Group::NeedBeforeGreed(Creature *creature, Loot *loot) } } -void Group::MasterLoot(Creature *creature, Loot* /*loot*/) +void Group::MasterLoot(Creature *creature, Loot* loot) { + for (LootItemList::iterator i=loot->items.begin(); i != loot->items.end(); ++i) + { + ItemPrototype const *item = ObjectMgr::GetItemPrototype(i->itemid); + if (!item) + continue; + if (item->Quality < uint32(m_lootThreshold)) + i->is_underthreshold = 1; + } + uint32 real_count = 0; WorldPacket data(SMSG_LOOT_MASTER_LIST, 330); diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp index abd73ca34..6002f4cd3 100644 --- a/src/game/LootMgr.cpp +++ b/src/game/LootMgr.cpp @@ -724,11 +724,11 @@ ByteBuffer& operator<<(ByteBuffer& b, LootView const& lv) case ALL_PERMISSION: case MASTER_PERMISSION: { - uint8 slot_type = (lv.permission==MASTER_PERMISSION) ? 2 : 0; for (uint8 i = 0; i < l.items.size(); ++i) { if (!l.items[i].is_looted && !l.items[i].freeforall && !l.items[i].conditionId && l.items[i].AllowedForPlayer(lv.viewer)) { + uint8 slot_type = (lv.permission==MASTER_PERMISSION && !l.items[i].is_underthreshold) ? 2 : 0; b << uint8(i) << l.items[i]; //only send one-player loot items now, free for all will be sent later b << uint8(slot_type); // 0 - get 2 - master selection ++itemsShown; diff --git a/src/game/LootMgr.h b/src/game/LootMgr.h index 35662044a..455195942 100644 --- a/src/game/LootMgr.h +++ b/src/game/LootMgr.h @@ -101,6 +101,8 @@ struct LootItem bool AllowedForPlayer(Player const * player) const; }; +typedef std::vector LootItemList; + struct QuestItem { uint8 index; // position in quest_items; @@ -220,7 +222,7 @@ struct Loot QuestItemMap const& GetPlayerFFAItems() const { return PlayerFFAItems; } QuestItemMap const& GetPlayerNonQuestNonFFAConditionalItems() const { return PlayerNonQuestNonFFAConditionalItems; } - std::vector items; + LootItemList items; uint32 gold; uint8 unlootedCount; LootType loot_type; // required for achievement system @@ -281,7 +283,7 @@ struct Loot QuestItemList* FillQuestLoot(Player* player); QuestItemList* FillNonQuestNonFFAConditionalLoot(Player* player); - std::vector quest_items; + LootItemList quest_items; std::set PlayersLooting; QuestItemMap PlayerQuestItems; QuestItemMap PlayerFFAItems; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 9161d2d7b..0009a2f59 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9963" + #define REVISION_NR "9964" #endif // __REVISION_NR_H__