[9964] Implement Treshold in Masterloot.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Emme 2010-05-23 18:14:39 +04:00 committed by VladimirMangos
parent 702d368114
commit 8a424642e6
4 changed files with 16 additions and 5 deletions

View file

@ -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);