Revert "get.order和get.cacheOrder添加第二个角色参数"

This reverts commit 62e997be05.
This commit is contained in:
mengxinzxz 2024-02-06 11:34:21 +08:00
parent 62e997be05
commit f4138065b0
1 changed files with 8 additions and 7 deletions

View File

@ -4201,11 +4201,11 @@ export class Get extends Uninstantable {
} }
return 1; return 1;
} }
static cacheOrder(item, player){ static cacheOrder(item){
let cache = CacheContext.requireCacheContext(); let cache = CacheContext.requireCacheContext();
return cache.get.order(item, player); return cache.get.order(item);
} }
static order(item, player) { static order(item) {
let cache = CacheContext.requireCacheContext(); let cache = CacheContext.requireCacheContext();
var info = get.info(item); var info = get.info(item);
if (!info) return -1; if (!info) return -1;
@ -4214,12 +4214,13 @@ export class Get extends Uninstantable {
if (aii && aii.order) order = aii.order; if (aii && aii.order) order = aii.order;
else if (aii && aii.basic) order = aii.basic.order; else if (aii && aii.basic) order = aii.basic.order;
if (order == undefined) return -1; if (order == undefined) return -1;
var num = order, target = (player || _status.event.player); var num = order;
if (typeof (order) == 'function') { if (typeof (order) == 'function') {
num = order(item, target); num = order(item, _status.event.player);
} }
if (typeof item == 'object' && target) { if (typeof item == 'object' && _status.event.player) {
num = game.checkMod(target, item, num, 'aiOrder', target); var player = _status.event.player;
num = game.checkMod(player, item, num, 'aiOrder', player);
} }
return num; return num;
} }