libram 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/combat.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Get the KoL native ID of the macro with name Script Autoattack Macro.
2
+ * Get the KoL native ID of the macro with name name.
3
3
  *
4
4
  * @category Combat
5
5
  * @returns {number} The macro ID.
package/dist/combat.js CHANGED
@@ -4,7 +4,7 @@ import { get, set } from "./property";
4
4
  import { getTodaysHolidayWanderers } from "./lib";
5
5
  const MACRO_NAME = "Script Autoattack Macro";
6
6
  /**
7
- * Get the KoL native ID of the macro with name Script Autoattack Macro.
7
+ * Get the KoL native ID of the macro with name name.
8
8
  *
9
9
  * @category Combat
10
10
  * @returns {number} The macro ID.
@@ -141,9 +141,10 @@ export class Macro {
141
141
  */
142
142
  setAutoAttack() {
143
143
  let id = Macro.cachedMacroIds.get(this.name);
144
- if (id === undefined)
145
- Macro.cachedMacroIds.set(this.name, getMacroId(this.name));
146
- id = getMacroId(this.name);
144
+ if (id === undefined) {
145
+ id = getMacroId(this.name);
146
+ Macro.cachedMacroIds.set(this.name, id);
147
+ }
147
148
  if (getAutoAttack() === 99000000 + id &&
148
149
  this.toString() === Macro.cachedAutoAttacks.get(this.name)) {
149
150
  // This macro is already set. Don"t make the server request.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libram",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "JavaScript helper library for KoLmafia",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",