Is this what
DndTheTroll wanted? Well, it is quite similar.
Never seen this option on TC, seeing I haven't fully went through TrinityCore's library yet. As far as I know, this is used for loot referencing when it processes the loot:
Code:
// Rolls for every item in the template and adds the rolled items the the loot
void LootTemplate::Process(Loot& loot, bool rate, uint16 lootMode, uint8 groupId) const
{
if (groupId) // Group reference uses own processing of the group
{
if (groupId > Groups.size())
return; // Error message already printed at loading stage
if (!Groups[groupId - 1])
return;
Groups[groupId-1]->Process(loot, lootMode);
return;
}
// Rolling non-grouped items
for (LootStoreItemList::const_iterator i = Entries.begin(); i != Entries.end(); ++i)
{
LootStoreItem* item = *i;
if (!(item->lootmode & lootMode)) // Do not add if mode mismatch
continue;
if (!item->Roll(rate))
continue; // Bad luck for the entry
if (item->mincountOrRef < 0) // References processing
{
LootTemplate const* Referenced = LootTemplates_Reference.GetLootFor(-item->mincountOrRef);
if (!Referenced)
continue; // Error message already printed at loading stage
uint32 maxcount = uint32(float(item->maxcount) * sWorld->getRate(RATE_DROP_ITEM_REFERENCED_AMOUNT));
for (uint32 loop = 0; loop < maxcount; ++loop) // Ref multiplicator
Referenced->Process(loot, rate, lootMode, item->group);
}
else // Plain entries (not a reference, not grouped)
loot.AddItem(*item); // Chance is already checked, just add
}
// Now processing groups
for (LootGroups::const_iterator i = Groups.begin(); i != Groups.end(); ++i)
if (LootGroup* group = *i)
group->Process(loot, lootMode);
}
It is called before the group processes their loot. And as you see, the maxcount is multiplied by the rate. This might be what you're looking for, not sure. You have another rate similar to this: RATE_DROP_ITEM_REFERENCED
It is used here:
Code:
bool LootStoreItem::Roll(bool rate) const
{
if (chance >= 100.0f)
return true;
if (mincountOrRef < 0) // reference case
return roll_chance_f(chance* (rate ? sWorld->getRate(RATE_DROP_ITEM_REFERENCED) : 1.0f));
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(itemid);
float qualityModifier = pProto && rate ? sWorld->getRate(qualityToRate[pProto->Quality]) : 1.0f;
return roll_chance_f(chance*qualityModifier);
}
All I can say is try it out and see what happens.