Lots of cmangos commirs applied

This commit is contained in:
Charles A Edwards 2016-09-12 17:52:23 +01:00 committed by Antz
parent 8431568536
commit 18dd18780d
44 changed files with 677 additions and 323 deletions

View file

@ -259,16 +259,19 @@ bool LootStoreItem::Roll(bool rate) const
if (mincountOrRef < 0) // reference case
return roll_chance_f(chance * (rate ? sWorld.getConfig(CONFIG_FLOAT_RATE_DROP_ITEM_REFERENCED) : 1.0f));
if (type == LOOT_ITEM_TYPE_ITEM)
if (type == LOOTITEM_TYPE_CURRENCY)
return roll_chance_f(chance * (rate ? sWorld.getConfig(CONFIG_FLOAT_RATE_DROP_CURRENCY) : 1.0f));
else
{
if (needs_quest)
return roll_chance_f(chance * (rate ? sWorld.getConfig(CONFIG_FLOAT_RATE_DROP_ITEM_QUEST) : 1.0f));
ItemPrototype const* pProto = ObjectMgr::GetItemPrototype(itemid);
float qualityModifier = pProto && rate ? sWorld.getConfig(qualityToRate[pProto->Quality]) : 1.0f;
return roll_chance_f(chance * qualityModifier);
}
else if (type == LOOT_ITEM_TYPE_CURRENCY)
return roll_chance_f(chance * (rate ? sWorld.getConfig(CONFIG_FLOAT_RATE_DROP_CURRENCY) : 1.0f));
return false;
}