优化audio为数组时的skill获取
This commit is contained in:
parent
af454aa7b6
commit
64fad7e280
|
@ -10677,9 +10677,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
skills.forEach(skill=>{
|
||||
var info=lib.skill[skill];
|
||||
if(info){
|
||||
if(!info.audioname2) info.audioname2={};
|
||||
if(info.audioname&&info.audioname.includes(character)){
|
||||
if(info.audio&&typeof info.audio=='string') skill=info.audio;
|
||||
if(info.audio){
|
||||
if(typeof info.audio=='string') skill=info.audio;
|
||||
if(Array.isArray(info.audio)) skill=info.audio[0];
|
||||
}
|
||||
if(!lib.skill[skill+'_'+character]) lib.skill[skill+'_'+character]={audio:2};
|
||||
info.audioname2[name]=(skill+'_'+character);
|
||||
}
|
||||
|
@ -10687,9 +10691,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
info.audioname2[name]=info.audioname2[character];
|
||||
}
|
||||
else{
|
||||
if(info.audio&&typeof info.audio=='string') skill=info.audio;
|
||||
if(info.audio){
|
||||
if(typeof info.audio=='string') skill=info.audio;
|
||||
if(Array.isArray(info.audio)) skill=info.audio[0];
|
||||
}
|
||||
info.audioname2[name]=skill;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
mark:true,
|
||||
|
|
Loading…
Reference in New Issue