Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

43 rindas
844 B

  1. define([
  2. ], function (
  3. ) {
  4. const percentageStats = [
  5. 'addCritChance',
  6. 'addCritMultiplier',
  7. 'addAttackCritChance',
  8. 'addAttackCritMultiplier',
  9. 'addSpellCritChance',
  10. 'addSpellCritMultiplier',
  11. 'sprintChance',
  12. 'xpIncrease',
  13. 'blockAttackChance',
  14. 'blockSpellChance',
  15. 'dodgeAttackChance',
  16. 'dodgeSpellChance',
  17. 'attackSpeed',
  18. 'castSpeed',
  19. 'itemQuantity',
  20. 'magicFind',
  21. 'catchChance',
  22. 'catchSpeed',
  23. 'fishRarity',
  24. 'fishWeight',
  25. 'fishItems'
  26. ];
  27. const stringifyStatValue = (statName, statValue) => {
  28. let res = statValue;
  29. if (statName.indexOf('CritChance') > -1)
  30. res = res / 20;
  31. if (percentageStats.includes(statName) || statName.indexOf('Percent') > -1 || (statName.indexOf('element') === 0 && statName.indexOf('Resist') === -1))
  32. res += '%';
  33. return res + '';
  34. };
  35. return stringifyStatValue;
  36. });