Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

111 righe
2.8 KiB

  1. const events = require('../misc/events');
  2. const tos = require('./tos');
  3. const config = {
  4. logoPath: null,
  5. resourceList: [],
  6. textureList: [
  7. 'tiles',
  8. 'walls',
  9. 'mobs',
  10. 'bosses',
  11. 'animBigObjects',
  12. 'bigObjects',
  13. 'objects',
  14. 'characters',
  15. 'attacks',
  16. 'ui',
  17. 'auras',
  18. 'animChar',
  19. 'animMob',
  20. 'animBoss',
  21. 'white',
  22. 'ray',
  23. 'images/skins/0001.png',
  24. 'images/skins/0010.png',
  25. 'images/skins/0012.png'
  26. ],
  27. //Client components required by mods
  28. // Format: [ 'cpnPath', ... ]
  29. components: [],
  30. uiList: [],
  31. contextMenuActions: {
  32. player: [],
  33. npc: []
  34. },
  35. statTranslations: {
  36. vit: 'vitality',
  37. regenHp: 'health regeneration',
  38. manaMax: 'maximum mana',
  39. regenMana: 'mana regeneration',
  40. str: 'strength',
  41. int: 'intellect',
  42. dex: 'dexterity',
  43. armor: 'armor',
  44. blockAttackChance: 'chance to block attacks',
  45. blockSpellChance: 'chance to block spells',
  46. dodgeAttackChance: 'chance to dodge attacks',
  47. dodgeSpellChance: 'chance to dodge spells',
  48. addCritChance: 'global crit chance',
  49. addCritMultiplier: 'global crit multiplier',
  50. addAttackCritChance: 'attack crit chance',
  51. addAttackCritMultiplier: 'attack crit multiplier',
  52. addSpellCritChance: 'spell crit chance',
  53. addSpellCritMultiplier: 'spell crit multiplier',
  54. magicFind: 'increased item quality',
  55. itemQuantity: 'increased item quantity',
  56. sprintChance: 'sprint chance',
  57. allAttributes: 'to all attributes',
  58. xpIncrease: 'additional xp per kill',
  59. lvlRequire: 'level requirement reduction',
  60. elementArcanePercent: 'increased arcane damage',
  61. elementFrostPercent: 'increased frost damage',
  62. elementFirePercent: 'increased fire damage',
  63. elementHolyPercent: 'increased holy damage',
  64. elementPoisonPercent: 'increased poison damage',
  65. physicalPercent: 'increased physical damage',
  66. elementPercent: 'increased elemental damage',
  67. spellPercent: 'increased spell damage',
  68. elementAllResist: 'all resistance',
  69. elementArcaneResist: 'arcane resistance',
  70. elementFrostResist: 'frost resistance',
  71. elementFireResist: 'fire resistance',
  72. elementHolyResist: 'holy resistance',
  73. elementPoisonResist: 'poison resistance',
  74. attackSpeed: 'attack speed',
  75. castSpeed: 'cast speed',
  76. lifeOnHit: 'life gained on hit',
  77. auraReserveMultiplier: 'aura mana reservation multiplier',
  78. //This stat is used for gambling when you can't see the stats
  79. stats: 'stats'
  80. },
  81. tos
  82. };
  83. module.exports = {
  84. init: function () {
  85. events.emit('onBeforeGetClientConfig', config);
  86. //Deprecated
  87. events.emit('onBeforeGetResourceList', config.resourceList);
  88. events.emit('onBeforeGetUiList', config.uiList);
  89. events.emit('onBeforeGetContextMenuActions', config.contextMenuActions);
  90. events.emit('onBeforeGetTermsOfService', config.tos);
  91. events.emit('onBeforeGetTextureList', config.textureList);
  92. },
  93. getClientConfig: function (msg) {
  94. msg.callback(config);
  95. }
  96. };