Skip to content

Commit

Permalink
Merge pull request #10612 from DestinyItemManager/manual-exotic-class
Browse files Browse the repository at this point in the history
Manually fill in exotic class item plug possibilities
  • Loading branch information
bhollis committed Jun 28, 2024
2 parents d9089a1 + 32c254c commit 055c413
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
30 changes: 30 additions & 0 deletions src/app/inventory/store/exotic-class-item.ts
Original file line number Diff line number Diff line change
@@ -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,
],
},
};
20 changes: 19 additions & 1 deletion src/app/inventory/store/sockets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}
}
}

Expand Down

0 comments on commit 055c413

Please sign in to comment.