refactor(main): 调整批量使用道具的发送间隔
- 将批量使用道具的发送间隔从 100 毫秒调整为 5000 毫秒 - 优化了批量使用道具的逻辑,减少频繁发送请求的次数
This commit is contained in:
@@ -20295,13 +20295,13 @@ var app;
|
|||||||
const batchUse = (num) => {
|
const batchUse = (num) => {
|
||||||
const batchMax = 99;
|
const batchMax = 99;
|
||||||
return (() => {
|
return (() => {
|
||||||
|
t.ThgMu.ins().send_8_11(itemId, Math.min(num, batchMax), curItem.series);
|
||||||
|
num -= batchMax;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
t.ThgMu.ins().send_8_11(itemId, Math.min(num, batchMax), curItem.series);
|
|
||||||
num -= batchMax;
|
|
||||||
if (num > batchMax) {
|
if (num > batchMax) {
|
||||||
batchUse(num);
|
batchUse(num);
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 5000);
|
||||||
})();
|
})();
|
||||||
};
|
};
|
||||||
batchUse(this.curSelectNum);
|
batchUse(this.curSelectNum);
|
||||||
|
|||||||
Reference in New Issue
Block a user