Przeglądaj źródła

Fix issue #1031.

tags/v0.4.4^2
Peyrille Benjamin 4 lat temu
rodzic
commit
61349dee9f
1 zmienionych plików z 7 dodań i 3 usunięć
  1. +7
    -3
      src/client/ui/templates/smithing/smithing.js

+ 7
- 3
src/client/ui/templates/smithing/smithing.js Wyświetl plik

@@ -242,14 +242,18 @@ define([
let elQuantity = elMaterial.find('.quantity');
let invMaterial = items.find(i => i.name === itemMaterial.name) || { quantity: 0 };
let newText = elQuantity.html().split('/');
newText = invMaterial.quantity + '/' + newText[1];
let currentText = elQuantity.html().split('/');
let newText = invMaterial.quantity + '/' + currentText[1];
elQuantity.html(newText);

let elButton = this.find('.actionButton').removeClass('disabled');
if (invMaterial.quantity < newText[1]) {
if (invMaterial.quantity < currentText[1]) {
elButton.addClass('disabled');
elQuantity.addClass('red');
} else {
elButton.removeClass('disabled');
elQuantity.removeClass('red');
}
},



Ładowanie…
Anuluj
Zapisz