This commit is contained in:
mengxinzxz 2024-05-22 08:33:57 +08:00
parent b0dab87a9d
commit ad78056255
2 changed files with 3 additions and 1 deletions

View File

@ -2793,6 +2793,7 @@ export class Game {
lib.skill[skill] = content[1]; lib.skill[skill] = content[1];
lib.character[skill] = content[2]; lib.character[skill] = content[2];
for (let i = 0; i < list.length; i++) { for (let i = 0; i < list.length; i++) {
if (!list[i]) continue;
lib.translate[skill + ["", "_prefix", "_ab"][i]] = list[i]; lib.translate[skill + ["", "_prefix", "_ab"][i]] = list[i];
} }
player.storage[skill] = content[4]; player.storage[skill] = content[4];

View File

@ -7315,7 +7315,7 @@ export class Player extends HTMLDivElement {
cfg.source = this.name; cfg.source = this.name;
} }
} }
const list = cfg.caption ? [cfg.caption] : ["", "_prefix", "_ab"].map(str => "name" + str).filter(str => lib.translate[str]); const list = cfg.caption ? [cfg.caption] : ["", "_prefix", "_ab"].map(str => lib.translate["name" + str]);
game.broadcastAll( game.broadcastAll(
//TODO: 这里直接修改trashBin部分后续需要修改为新写法 //TODO: 这里直接修改trashBin部分后续需要修改为新写法
function (player, skill, list, cfg) { function (player, skill, list, cfg) {
@ -7338,6 +7338,7 @@ export class Player extends HTMLDivElement {
lib.character[skill].trashBin.push("character:" + cfg.name); lib.character[skill].trashBin.push("character:" + cfg.name);
} }
for (let i = 0; i < list.length; i++) { for (let i = 0; i < list.length; i++) {
if (!list[i]) continue;
lib.translate[skill + ["", "_prefix", "_ab"][i]] = list[i]; lib.translate[skill + ["", "_prefix", "_ab"][i]] = list[i];
} }
player.storage[skill] = cfg; player.storage[skill] = cfg;