How to use the dotaconstants.item_groups function in dotaconstants

To help you get started, we’ve selected a few dotaconstants examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github odota / core / util / analysis.js View on Github external
function getGroupedItemUses(key)
            {
        let total = 0;
        for (const key2 in pm.item_uses)
                {
          if (key === key2 || constants.item_groups.some((g) => {
            return (key in g) && (key2 in g);
          }))
                    {
            total += pm.item_uses[key];
          }
        }
        return total;
      }
      return {