Update 2040022.js
NPC removing items even if player does not have all materials to craft it
This commit is contained in:
@@ -198,20 +198,12 @@ function action(mode, type, selection) {
|
|||||||
} else {
|
} else {
|
||||||
if (mats instanceof Array) {
|
if (mats instanceof Array) {
|
||||||
for (var i = 0; complete && i < mats.length; i++) {
|
for (var i = 0; complete && i < mats.length; i++) {
|
||||||
if (matQty[i] * selection == 1) {
|
if (!cm.haveItem(mats[i], matQty[i])) {
|
||||||
if (!cm.haveItem(mats[i])) {
|
|
||||||
complete = false;
|
complete = false;
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!cm.haveItem(mats[i], matQty[i] * selection)) {
|
|
||||||
complete = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!cm.haveItem(mats, matQty * selection)) {
|
complete = false;
|
||||||
complete = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user