message: valid negative hashes
diff: @@ -40,6 +40,7 @@ import {
  DestinyVendorDefinition,
  DestinyVendorGroupDefinition,
  } from 'bungie-api-ts/destiny2';
  +import { ItemCategoryHashes } from 'data/d2/generated-enums';
  import { setD2Manifest } from '../manifest/actions';
  import { getManifest } from '../manifest/manifest-service-json';
  import { HashLookupFailure, ManifestDefinitions } from './definitions';
  @@ -87,6 +88,8 @@ const eagerTables = [
  'ActivityMode',
  ];
  +const validNegativeHashes = [-ItemCategoryHashes.GrenadeLaunchers];
  +
  /** These aren't really lazy */
  export interface DefinitionTable<T> {
  /**
  @@ -179,7 +182,7 @@ export function buildDefinitionsFromManifest(db: AllDestinyManifestComponents) {
  if (!dbTable) {
  throw new Error(`Table ${table} does not exist in the manifest`);
  }
  - if (id < 1 || !Number.isSafeInteger(id)) {
  + if ((id < 1 && !validNegativeHashes.includes(id)) || !Number.isSafeInteger(id)) {
  throw new Error(`Invalid Hash: ${id}`);
  }
  const dbEntry = dbTable[id];
  @@ -211,7 +214,7 @@ export function buildDefinitionsFromManifest(db: AllDestinyManifestComponents) {
  function enhanceDBWithFakeEntries(db: AllDestinyManifestComponents) {
  // We made up an item category for special grenade launchers. For now they can just be a copy
  // of the regular "Grenade Launcher" category but we could patch in localized descriptions if we wanted.
  - db.DestinyItemCategoryDefinition[-153950757] = {
  - ...db.DestinyItemCategoryDefinition[153950757],
  + db.DestinyItemCategoryDefinition[-ItemCategoryHashes.GrenadeLaunchers] = {
  + ...db.DestinyItemCategoryDefinition[ItemCategoryHashes.GrenadeLaunchers],
  };
  }
  