Skip to content

Commit 139c6cb

Browse files
committed
Fixed change weapon to '-'
1 parent 44e83ba commit 139c6cb

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

AttackMaster/3.3.0/attackMaster.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ API_Meta.AttackMaster={offset:Number.MAX_SAFE_INTEGER,lineCount:-1};
190190
* Allow filterWeapons() to filter items other than weapons from tables.
191191
* Improve finding of ammo rows when inserting ammo. Allow recovery of
192192
* cursed ammo. Fix the "Death" button on the Other-Actions menu. Fixed
193-
* charged powers for hidden in-hand magic items on attack menu.
193+
* charged powers for hidden in-hand magic items on attack menu. Fixed
194+
* taking '-' in-hand in Change Weapon dialog.
194195
*/
195196

196197
var attackMaster = (function() {
@@ -5249,7 +5250,7 @@ var attackMaster = (function() {
52495250
values[fields.InHand_column[0]][fields.InHand_column[1]] = c;
52505251
values[fields.InHand_handedness[0]][fields.InHand_handedness[1]] = handedness;
52515252
values[fields.InHand_db[0]][fields.InHand_db[1]] = weaponDB;
5252-
values[fields.InHand_type[0]][fields.InHand_type[1]] = (!item.obj ? weaponSpecs[0][2] : item.obj[1].type);
5253+
values[fields.InHand_type[0]][fields.InHand_type[1]] = (!item || !item.obj ? weaponSpecs[0][2] : item.obj[1].type);
52535254
values[fields.InHand_dancer[0]][fields.InHand_dancer[1]] = weapData.dancer;
52545255

52555256
switch (args[0].toUpperCase()) {

AttackMaster/attackMaster.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ API_Meta.AttackMaster={offset:Number.MAX_SAFE_INTEGER,lineCount:-1};
190190
* Allow filterWeapons() to filter items other than weapons from tables.
191191
* Improve finding of ammo rows when inserting ammo. Allow recovery of
192192
* cursed ammo. Fix the "Death" button on the Other-Actions menu. Fixed
193-
* charged powers for hidden in-hand magic items on attack menu.
193+
* charged powers for hidden in-hand magic items on attack menu. Fixed
194+
* taking '-' in-hand in Change Weapon dialog.
194195
*/
195196

196197
var attackMaster = (function() {
@@ -3054,7 +3055,7 @@ var attackMaster = (function() {
30543055
* Build melee weapon attack macro
30553056
*/
30563057

3057-
var buildMWattkMacros = function( args, senderId, charCS, tableInfo, mwIndex, backstab=false ) {
3058+
var buildMWattkMacros = function( args, senderId, charCS, tableInfo, mwIndex, backstab=false ) { // toLowerCase()
30583059

30593060
return new Promise(resolve => {
30603061

@@ -5249,7 +5250,7 @@ var attackMaster = (function() {
52495250
values[fields.InHand_column[0]][fields.InHand_column[1]] = c;
52505251
values[fields.InHand_handedness[0]][fields.InHand_handedness[1]] = handedness;
52515252
values[fields.InHand_db[0]][fields.InHand_db[1]] = weaponDB;
5252-
values[fields.InHand_type[0]][fields.InHand_type[1]] = (!item.obj ? weaponSpecs[0][2] : item.obj[1].type);
5253+
values[fields.InHand_type[0]][fields.InHand_type[1]] = (!item || !item.obj ? weaponSpecs[0][2] : item.obj[1].type);
52535254
values[fields.InHand_dancer[0]][fields.InHand_dancer[1]] = weapData.dancer;
52545255

52555256
switch (args[0].toUpperCase()) {

0 commit comments

Comments
 (0)