message: Add item stats
  quick PR to add stats to item details
diff: @@ -252,6 +252,12 @@ export function D2ItemFactory(
  }
  }
  + try {
  + createdItem.stats = buildStats(item, itemDef, defs.Stat, itemComponents.stats.data, itemType);
  + } catch (e) {
  + console.error(`Error building stats for ${createdItem.name}`, item, itemDef, e);
  + }
  +
  createdItem.index = createItemIndex(createdItem);
  return createdItem;
  @@ -296,4 +302,44 @@ export function D2ItemFactory(
  return $i18next.t('Loadouts.Any');
  }
  }
  +
  + function buildStats(item, itemDef, statDefs, stats, type) {
  + var itemStats = stats[item.itemInstanceId];
  + if(itemStats) {
  + itemStats = stats[item.itemInstanceId].stats;
  + }
  + if (!itemDef.stats || !itemStats) {
  + return undefined;
  + }
  +
  + return _.sortBy(_.compact(_.map(itemStats, (stat) => {
  + const def = statDefs.get(stat.statHash);
  + if (!def) {
  + return undefined;
  + }
  +
  + let itemStat = itemStats[stat.statHash];
  + if (!itemStat) {
  + return undefined;
  + }
  +
  + let maximumValue = itemStat.maximumValue || 100;
  + const val = itemStat ? itemStat.value : stat.value;
  + let base = val;
  + let bonus = 0;
  + let sort = 1;
  +
  + return {
  + base: base,
  + bonus: bonus,
  + statHash: stat.statHash,
  + name: def.displayProperties.name,
  + id: item.itemInstanceId,
  + sort: sort,
  + value: val,
  + maximumValue: maximumValue,
  + bar: stat.statHash !== 4284893193
  + };
  + })), 'sort');
  + }
  }
  