From d20a4523e7aca66388bf7f7e2ac551820d20e43e Mon Sep 17 00:00:00 2001 From: kuangthree Date: Mon, 9 Oct 2023 22:49:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DcheckMod=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/game.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/game/game.js b/game/game.js index d9063bf2f..eacb87170 100644 --- a/game/game.js +++ b/game/game.js @@ -40546,7 +40546,17 @@ checkMod:function(){ const argumentArray=Array.from(arguments),name=argumentArray[argumentArray.length-2]; let skills=argumentArray[argumentArray.length-1]; - if(skills.getSkills) skills=skills.getModableSkills(_status.event.useCache === true); + if(typeof skills.getModableSkills == 'function'){ + skills=skills.getModableSkills(_status.event.useCache === true); + }else if(typeof skills.getSkills == 'function'){ + skills=skills.getSkills().concat(lib.skill.global); + game.expandSkills(skills); + skills = skills.filter(function(skill){ + var info = get.info(skill); + return info && info.mod; + }); + skills.sort((a,b)=>get.priority(a)-get.priority(b)); + } const arg=argumentArray.slice(0,-2); skills.forEach(value=>{ var mod = get.info(value).mod[name];