Skip to content

Commit 64fd882

Browse files
author
Val
committed
Adds level 7 armour
Also fixes a bug where the UI close button was disabled if min armour was equal to max armour. That is a valid setting.
1 parent 4c1c4e2 commit 64fd882

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

chrome/ui.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ <h3>Scorpion Guard's Better PvP Script V<span id="sg-version">31</span></h3>
5555
<option value="4">4</option>
5656
<option value="5">5</option>
5757
<option value="6">6</option>
58+
<option value="7">7</option>
5859
</select>
5960
<a id="sg-help" target="_blank" href="http://dssrzs.org/sgpvp/help.html">Help</a>
6061
</span>

chrome/ui.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ SGPvPUI.prototype.configure = function() {
339339
// Armour is the one setting that is invalid on the very first config. So
340340
// watch for this.
341341
this.armourValid =
342-
( armour.low > 0 && armour.max > 0 && armour.low < armour.max );
342+
( armour.low > 0 && armour.max > 0 && armour.low <= armour.max );
343343

344344
this.enableCloseIfProper();
345345

@@ -478,7 +478,7 @@ SGPvPUI.prototype.getPositiveIntegerValue = function(element, max, allowEmpty) {
478478
SGPvPUI.prototype.onArmInput = function() {
479479
var low = this.getPositiveIntegerValue(this.elements.low),
480480
max = this.getPositiveIntegerValue(this.elements.max),
481-
level = this.getPositiveIntegerValue(this.elements.lvl, 6);
481+
level = this.getPositiveIntegerValue(this.elements.lvl, 7);
482482
if ( low && max && low <= max && level > 0 ) {
483483
this.armourValid = true;
484484
this.storage.set( { armour: { low: low, max: max, level: level } } );

0 commit comments

Comments
 (0)