Skip to content

Commit

Permalink
Pretty things up
Browse files Browse the repository at this point in the history
  • Loading branch information
Qt-dev committed Apr 9, 2024
1 parent d23bce9 commit e366453
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/main/modules/ItemPricer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,8 @@ class PriceMatcher {
}

const mod = item.parsedItem.implicitMods[0]; // Implicit mod is the only mod on the item
const ilvl = item.parsedItem.properties.find(({ name }) => name === 'Corpse Level').values[0][0]; // Corpse Level is the only property on the item
const ilvl = item.parsedItem.properties.find(({ name }) => name === 'Corpse Level')
.values[0][0]; // Corpse Level is the only property on the item
// Find key by:
// 1. Starting with the mod name
// 2. Read the ilvl range
Expand Down
6 changes: 4 additions & 2 deletions src/renderer/stores/domain/item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,10 @@ export class Item {
this.styleModifiers = itemdata.styleModifiers || {};

this.name = itemdata.name.replace('<<set:MS>><<set:M>><<set:S>>', '').replace(/<>/g, '');
if(itemdata.typeLine === 'Filled Coffin') {
this.name += `${itemdata.implicitMods[0]} - L${itemdata.properties?.find(({name}) => name === 'Corpse Level').values[0][0]}`;
if (itemdata.typeLine === 'Filled Coffin') {
this.name += `${itemdata.implicitMods[0]} - L${
itemdata.properties?.find(({ name }) => name === 'Corpse Level').values[0][0]
}`;
}
this.itemId = itemdata.id;

Expand Down
2 changes: 1 addition & 1 deletion src/renderer/stores/itemStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default class ItemStore {
.map((item) => item.toLootTable())
.forEach((item) => {
const { quantity, value, totalValue, originalValue, stackSize } = item;
if(stackSize > 0) {
if (stackSize > 0) {
let group = grouped.find(({ name }) => name === item.name);
if (!group) {
group = {
Expand Down

0 comments on commit e366453

Please sign in to comment.