Merge pull request #1287 from PZ157/PR-Branch

清除本体中lib.character[i]的数组检测
This commit is contained in:
Spmario233 2024-04-30 16:11:49 +08:00 committed by GitHub
commit 9ab7abb2bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -810,7 +810,7 @@ game.import("character", function () {
var list = [];
for (var i in lib.skill.dcbianzhuang.characterMap) {
if (
Array.isArray(lib.character[i]) &&
lib.character[i] &&
get.is.object(lib.skill[lib.skill.dcbianzhuang.characterMap[i]])
)
list.push(i);

View File

@ -2460,7 +2460,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
if (lib.character[name][1] == "key") return 4;
};
game.data.character = game.data.character.filter(function (i) {
return Array.isArray(lib.character[i]);
return get.is.object(lib.character[i]);
});
game.data.character.sort(function (a, b) {
var del = groupSort(a) - groupSort(b);