Skip to content

Commit

Permalink
fix: Weapon stats now include intrinsic values (#2174)
Browse files Browse the repository at this point in the history
  • Loading branch information
NigelBreslaw authored Jul 27, 2024
1 parent 4432b68 commit bce68f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions native/app/inventory/logic/Sockets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ function updateSocketCategoriesWithData(sockets: Sockets, destinyItem: DestinyIt
/// for these items the UI itself can decide to get all the plugs. As they are not looked by users
/// all the time it is a waste to create them for every category
case CategoryStyle.Consumable:
case CategoryStyle.LargePerk:
case CategoryStyle.EnergyMeter: {
/// Skip adding the plugs for now
socket.reusablePlugSocketIndex = map.socketIndex;
Expand Down
8 changes: 6 additions & 2 deletions native/app/stats/Logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,12 @@ export function createStats(destinyItem: DestinyItem, sockets: Sockets): ItemSta
if (destinyItem.def.itemType === ItemType.Weapon) {
const stats = createBaseStats(destinyItem);

console.log("createStats", sockets);

const intrinsicCategory = sockets?.socketCategories.find(
(category) => category.socketCategoryHash === SocketCategoryEnum.INTRINSIC_TRAITS,
);
if (intrinsicCategory) {
addSocketStats(stats, intrinsicCategory);
}
const perksCategory = sockets?.socketCategories.find(
(category) => category.socketCategoryHash === SocketCategoryEnum.WEAPON_PERKS,
);
Expand Down

0 comments on commit bce68f3

Please sign in to comment.