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 +1 -1
- package/dist/combat.js +5 -4
- package/package.json +1 -1
package/dist/combat.d.ts
CHANGED
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
|
|
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
|
-
|
|
146
|
-
|
|
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.
|