duplicates parts amount randomized by rarity
This commit is contained in:
parent
01d536a416
commit
1c9cde6d18
@ -12,6 +12,13 @@ InventoryCurrencyType = {
|
||||
Max = 6
|
||||
}
|
||||
|
||||
ItemRarity = {
|
||||
Common = 0,
|
||||
Rare = 1,
|
||||
Legendary = 2,
|
||||
Epic = 3
|
||||
}
|
||||
|
||||
custom_depot = {
|
||||
collection_details_menu = nil,
|
||||
data = {
|
||||
|
@ -215,7 +215,19 @@ MPDepotOpenLootMenu = function(unk1, unk2)
|
||||
if not custom_depot.get_function("has_item")(f48_arg1.items[i]) then
|
||||
custom_depot.get_function("add_item")(f48_arg1.items[i], true)
|
||||
else
|
||||
local dismantled_amount = math.random(1, 1000)
|
||||
local item_rarity = tonumber(Engine.TableLookup(LootTable.File, LootTable.Cols.GUID, f48_arg1.items[i],
|
||||
LootTable.Cols.Rarity))
|
||||
local dismantled_amount = 0
|
||||
|
||||
if item_rarity == ItemRarity.Common then
|
||||
dismantled_amount = math.random(1, 75)
|
||||
elseif item_rarity == ItemRarity.Rare then
|
||||
dismantled_amount = math.random(75, 155)
|
||||
elseif item_rarity == ItemRarity.Legendary then
|
||||
dismantled_amount = math.random(155, 260)
|
||||
elseif item_rarity == ItemRarity.Epic then
|
||||
dismantled_amount = math.random(260, 550)
|
||||
end
|
||||
|
||||
table.insert(f48_arg1.replacements, {
|
||||
item_index = i,
|
||||
|
Loading…
Reference in New Issue
Block a user