Merge pull request #943 from nonameShijian/PR-Branch
调整加载武将,卡牌包的逻辑,修复联机模式出现非联机武将卡牌包的情况
This commit is contained in:
commit
bcf55b9541
|
@ -641,8 +641,10 @@ export const cardPackMenu = function (connectMenu) {
|
|||
return function (packName) {
|
||||
// 判断菜单栏有没有加载过这个卡牌包
|
||||
if ([...start.firstChild.children].map(node => node.mode).includes(packName)) return;
|
||||
// 单机模式下显示不在lib.config.all.cards里的卡牌包
|
||||
if (!lib.config.all.cards.includes(packName)) createModeConfig(packName, start.firstChild);
|
||||
if (connectMenu) lib.connectCardPack.add(packName);
|
||||
// 显示不是无名杀自带的卡牌包
|
||||
if (!lib.connectCardPack.includes(packName) && !lib.config.all.cards.includes(packName)) {
|
||||
createModeConfig(packName, start.firstChild, node1);
|
||||
if (connectMenu) lib.connectCardPack.add(packName);
|
||||
}
|
||||
}
|
||||
};
|
|
@ -521,8 +521,10 @@ export const characterPackMenu = function (connectMenu) {
|
|||
return function (packName) {
|
||||
// 判断菜单栏有没有加载过这个武将包
|
||||
if ([...start.firstChild.children].map(node => node.mode).includes(packName)) return;
|
||||
// 单机模式下显示不在lib.config.all.characters里的武将包
|
||||
if (!characterlist.includes(packName)) createModeConfig(packName, start.firstChild, node1);
|
||||
if (connectMenu) lib.connectCharacterPack.add(packName);
|
||||
// 显示不是无名杀自带的武将包
|
||||
if (!lib.connectCharacterPack.includes(packName) && !lib.config.all.characters.includes(packName)) {
|
||||
createModeConfig(packName, start.firstChild, node1);
|
||||
if (connectMenu) lib.connectCharacterPack.add(packName);
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue