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:
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user