Skip to content

Commit

Permalink
Merge pull request #10173 from DestinyItemManager/compare-loadout-par…
Browse files Browse the repository at this point in the history
…ameters
  • Loading branch information
bhollis authored Dec 15, 2023
2 parents e268fc4 + b0454bf commit 9d3775c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/app/loadout-builder/updated-loadout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export function updateLoadoutWithArmorSet(
set: ArmorSet,
items: DimItem[],
lockedMods: PluggableInventoryItemDefinition[],
loadoutParameters = loadout.parameters,
): Loadout {
const data = {
tier: _.sumBy(Object.values(set.stats), statTier),
Expand Down Expand Up @@ -47,7 +48,7 @@ export function updateLoadoutWithArmorSet(
return {
...loadout,
parameters: {
...loadout.parameters,
...loadoutParameters,
mods: allMods.length ? allMods : undefined,
},
items: [...existingItemsWithoutArmor, ...loadoutItems],
Expand All @@ -74,8 +75,14 @@ export function mergeLoadout(
set,
items,
lockedMods,
newLoadout.parameters,
);

loadoutWithArmorSet.parameters = {
...newLoadout.parameters,
mods: loadoutWithArmorSet.parameters?.mods,
};

const newSubclass = newLoadout.items.find(
(li) => defs.InventoryItem.get(li.hash)?.inventory?.bucketTypeHash === BucketHashes.Subclass,
);
Expand Down

0 comments on commit 9d3775c

Please sign in to comment.