NPCs Taxis and Crafters now checks properly

Fixed taxis that wouldn't check for mesos upon travel. Fixed crafters
that wouldn't check for inventory slots available before crafting items.
This commit is contained in:
ronancpl
2017-05-10 10:47:05 -03:00
parent ab31f3d487
commit ed6121dd5f
39 changed files with 363 additions and 741 deletions

View File

@@ -158,7 +158,7 @@ function action(mode, type, selection) {
else if (status == 3 && mode == 1) {
var complete = true;
if(!cm.canHold(item)) {
if(!cm.canHold(item, 1)) {
cm.sendOk("Check your inventory for a free slot first.");
cm.dispose();
return;
@@ -176,21 +176,6 @@ function action(mode, type, selection) {
}
else if (!cm.haveItem(mats, matQty))
complete = false;
/*if (mats instanceof Array) {
for(var i = 0; complete && i < mats.length; i++){
if (matQty[i] == 1){
if (!cm.haveItem(mats[i]))
complete = false;
}
else if (!cm.haveItem(mats[i],matQty[i]))
complete=false;
}
}
else if (!cm.haveItem(mats,matQty))
complete=false;
*/
}
if (!complete)
cm.sendOk("I only make quality goods, which I cannot do without the proper materials.");