Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Weapon stats now include intrinsic values #2174

Merged
merged 1 commit into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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