Implement Rule Zone:GlobalLootMultiplier (Default 1) - Sets Global Loot drop multiplier for database based drops, useful for double, triple loot etc.

This commit is contained in:
Akkadius 2017-02-13 02:16:40 -06:00
parent fe21564659
commit ef16522473
2 changed files with 3 additions and 1 deletions

View File

@ -258,6 +258,7 @@ RULE_BOOL(Zone, EnableLoggedOffReplenishments, true)
RULE_INT(Zone, MinOfflineTimeToReplenishments, 21600) // 21600 seconds is 6 Hours
RULE_BOOL(Zone, UseZoneController, true) // Enables the ability to use persistent quest based zone controllers (zone_controller.pl/lua)
RULE_BOOL(Zone, EnableZoneControllerGlobals, false) // Enables the ability to use quest globals with the zone controller NPC
RULE_INT(Zone, GlobalLootMultiplier, 1) // Sets Global Loot drop multiplier for database based drops, useful for double, triple loot etc.
RULE_CATEGORY_END()
RULE_CATEGORY(Map)

View File

@ -80,10 +80,11 @@ void ZoneDatabase::AddLootTableToNPC(NPC* npc,uint32 loottable_id, ItemList* ite
*copper = cash;
}
uint32 global_loot_multiplier = RuleI(Zone, GlobalLootMultiplier);
// Do items
for (uint32 i=0; i<lts->NumEntries; i++) {
for (uint32 k = 1; k <= lts->Entries[i].multiplier; k++) {
for (uint32 k = 1; k <= (lts->Entries[i].multiplier * global_loot_multiplier); k++) {
uint8 droplimit = lts->Entries[i].droplimit;
uint8 mindrop = lts->Entries[i].mindrop;