From fc4084c4f254aeb94a3dbf50ad2d572fe26dd9db Mon Sep 17 00:00:00 2001 From: Ben Hollis Date: Wed, 2 Oct 2024 16:49:39 -0700 Subject: [PATCH] Fix assumeArmorMasterwork --- api/stately/loadouts-queries.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/api/stately/loadouts-queries.ts b/api/stately/loadouts-queries.ts index a7d11ed..fe2399c 100644 --- a/api/stately/loadouts-queries.ts +++ b/api/stately/loadouts-queries.ts @@ -3,7 +3,13 @@ import { keyPath } from '@stately-cloud/client'; import { DestinyClass } from 'bungie-api-ts/destiny2'; import _ from 'lodash'; import { DestinyVersion } from '../shapes/general.js'; -import { Loadout, LoadoutItem, LoadoutParameters, StatConstraint } from '../shapes/loadouts.js'; +import { + AssumeArmorMasterwork, + Loadout, + LoadoutItem, + LoadoutParameters, + StatConstraint, +} from '../shapes/loadouts.js'; import { isValidItemId } from '../utils.js'; import { client } from './client.js'; import { @@ -273,7 +279,7 @@ export function convertLoadoutParametersToStately( })) : [], // DIM's AssumArmorMasterwork enum starts at 1 - assumeArmorMasterwork: Number(assumeArmorMasterwork ?? 0) - 1, + assumeArmorMasterwork: Number(assumeArmorMasterwork ?? AssumeArmorMasterwork.None) - 1, modsByBucket: modsByBucket ? Object.entries(modsByBucket).map(([bucketHash, modHashes]) => ({ bucketHash: Number(bucketHash),