From 83177bdd663103a94d0964de4b1a82cc45a36a73 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Tue, 6 Feb 2024 12:42:42 +0800 Subject: [PATCH] =?UTF-8?q?get.order=E6=B7=BB=E5=8A=A0=E7=AC=AC=E4=BA=8C?= =?UTF-8?q?=E4=B8=AA=E8=A7=92=E8=89=B2=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noname/get/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/noname/get/index.js b/noname/get/index.js index 9604218ab..19c8d8291 100644 --- a/noname/get/index.js +++ b/noname/get/index.js @@ -4205,7 +4205,8 @@ export class Get extends Uninstantable { let cache = CacheContext.requireCacheContext(); return cache.get.order(item); } - static order(item) { + static order(item, player) { + player = (player || _status.event.player); let cache = CacheContext.requireCacheContext(); var info = get.info(item); if (!info) return -1; @@ -4216,10 +4217,9 @@ export class Get extends Uninstantable { if (order == undefined) return -1; var num = order; if (typeof (order) == 'function') { - num = order(item, _status.event.player); + num = order(item, player); } - if (typeof item == 'object' && _status.event.player) { - var player = _status.event.player; + if (typeof item == 'object' && player) { num = game.checkMod(player, item, num, 'aiOrder', player); } return num;