Skip to content

Commit 4c71c4e

Browse files
committed
Fix crash on !attk with no command
1 parent 341b49f commit 4c71c4e

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

AttackMaster/5.0.5/attackMaster.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,16 @@ API_Meta.AttackMaster={offset:Number.MAX_SAFE_INTEGER,lineCount:-1};
115115
* Fixed scanForModifiers() priority selection and added saves as a new possible
116116
* priority.
117117
* v5.0.5 14/10/2025 Fixed the error introduced to scanForModifiers() by 5.0.4! Fixed AC calc on
118-
* changing player page and/or dropping token on map.
118+
* changing player page and/or dropping token on map. Fixed crash if !attk called
119+
* without a command or parameters.
119120
*/
120121

121122
var attackMaster = (function() { // eslint-disable-line no-unused-vars
122123
'use strict';
123124
var version = '5.0.5',
124125
author = 'Richard @ Damery',
125126
pending = null;
126-
const lastUpdate = 1760467757;
127+
const lastUpdate = 1760686967;
127128

128129
/*
129130
* Define redirections for functions moved to the RPGMaster library
@@ -8677,7 +8678,7 @@ var attackMaster = (function() { // eslint-disable-line no-unused-vars
86778678
} else {
86788679
sendDebug('senderId is defined as ' + getObj('player',senderId).get('_displayname'));
86798680
};
8680-
if (!flags.noWaitMsg && !args[0].toLowerCase().startsWith('nowaitmsg')) sendWait(senderId,1,'attkMaster');
8681+
if (!flags.noWaitMsg && args[0] && !args[0].toLowerCase().startsWith('nowaitmsg')) sendWait(senderId,1,'attkMaster');
86818682

86828683
_.each(args, function(e) {
86838684
setTimeout( doAttkCmd, (1*t++), e, selected, senderId, isGM );

AttackMaster/attackMaster.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,16 @@ API_Meta.AttackMaster={offset:Number.MAX_SAFE_INTEGER,lineCount:-1};
115115
* Fixed scanForModifiers() priority selection and added saves as a new possible
116116
* priority.
117117
* v5.0.5 14/10/2025 Fixed the error introduced to scanForModifiers() by 5.0.4! Fixed AC calc on
118-
* changing player page and/or dropping token on map.
118+
* changing player page and/or dropping token on map. Fixed crash if !attk called
119+
* without a command or parameters.
119120
*/
120121

121122
var attackMaster = (function() { // eslint-disable-line no-unused-vars
122123
'use strict';
123124
var version = '5.0.5',
124125
author = 'Richard @ Damery',
125126
pending = null;
126-
const lastUpdate = 1760467757;
127+
const lastUpdate = 1760686967;
127128

128129
/*
129130
* Define redirections for functions moved to the RPGMaster library
@@ -8677,7 +8678,7 @@ var attackMaster = (function() { // eslint-disable-line no-unused-vars
86778678
} else {
86788679
sendDebug('senderId is defined as ' + getObj('player',senderId).get('_displayname'));
86798680
};
8680-
if (!flags.noWaitMsg && !args[0].toLowerCase().startsWith('nowaitmsg')) sendWait(senderId,1,'attkMaster');
8681+
if (!flags.noWaitMsg && args[0] && !args[0].toLowerCase().startsWith('nowaitmsg')) sendWait(senderId,1,'attkMaster');
86818682

86828683
_.each(args, function(e) {
86838684
setTimeout( doAttkCmd, (1*t++), e, selected, senderId, isGM );

0 commit comments

Comments
 (0)