diff --git a/src/app/inventory/store/exotic-class-item.ts b/src/app/inventory/store/exotic-class-item.ts new file mode 100644 index 0000000000..943f238c03 --- /dev/null +++ b/src/app/inventory/store/exotic-class-item.ts @@ -0,0 +1,30 @@ +// Exotic class items' exotic intrinsic sockets don't correspond to plug sets. +// Thus we have to maintain manual lists of what can roll for each. +export const exoticClassItemPlugs: { + [itemHash: number]: { [socketIndex: number]: number[] | undefined } | undefined; +} = { + 266021826: { + 10: [ + 1476923952, 1476923953, 1476923954, 3573490509, 3573490508, 3573490511, 3573490510, + 3573490505, + ], + 11: [ + 1476923955, 1476923956, 1476923957, 3573490504, 3573490507, 3573490506, 3573490501, + 3573490500, + ], + }, + 2273643087: { + 10: [1476923952, 1476923953, 1476923954, 183430248, 183430255, 183430252, 183430253, 183430250], + 11: [1476923955, 1476923956, 1476923957, 183430251, 183430254, 183430249, 183430246, 183430247], + }, + 2809120022: { + 10: [ + 1476923952, 1476923953, 1476923954, 3751917999, 3751917998, 3751917997, 3751917996, + 3751917995, + ], + 11: [ + 1476923955, 1476923956, 1476923957, 3751917994, 3751917993, 3751917992, 3751917991, + 3751917990, + ], + }, +}; diff --git a/src/app/inventory/store/sockets.ts b/src/app/inventory/store/sockets.ts index 81ff6a6b72..e02e1b471c 100644 --- a/src/app/inventory/store/sockets.ts +++ b/src/app/inventory/store/sockets.ts @@ -45,6 +45,7 @@ import { DimSockets, PluggableInventoryItemDefinition, } from '../item-types'; +import { exoticClassItemPlugs } from './exotic-class-item'; // // These are the utilities that deal with Sockets and Plugs on items. Sockets and Plugs @@ -357,13 +358,30 @@ function buildDefinedSocket( } } } - } else if (socketDef.reusablePlugItems) { + } else if (socketDef.reusablePlugItems && socketDef.reusablePlugItems.length > 0) { for (const reusablePlug of socketDef.reusablePlugItems) { const built = buildDefinedPlug(defs, reusablePlug.plugItemHash); if (built) { reusablePlugs.push(built); } } + } else if ( + forThisItem && + forThisItem.hash in exoticClassItemPlugs && + index in exoticClassItemPlugs[forThisItem.hash]! + ) { + const plugs = exoticClassItemPlugs[forThisItem.hash]![index]!; + for (const plugItemHash of plugs) { + const built = buildDefinedPlug(defs, plugItemHash); + if (built) { + reusablePlugs.push(built); + } + } + } else if (socketDef.singleInitialItemHash) { + const built = buildDefinedPlug(defs, socketDef.singleInitialItemHash); + if (built) { + reusablePlugs.push(built); + } } }