Skip to content

Commit

Permalink
Fix assumeArmorMasterwork
Browse files Browse the repository at this point in the history
  • Loading branch information
bhollis committed Oct 2, 2024
1 parent 33ccc73 commit fc4084c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions api/stately/loadouts-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit fc4084c

Please sign in to comment.