diff --git a/app/lol/tools.py b/app/lol/tools.py index f972f0d..4e7a516 100644 --- a/app/lol/tools.py +++ b/app/lol/tools.py @@ -1541,7 +1541,9 @@ async def autoComplete(data, selection: ChampionSelection): if not isAutoCompleted or selection.isChampionPickedCompleted: return - localPlayerCellId = data['localPlayerCellId'] + if not (localPlayerCellId := data.get('localPlayerCellId', None)): + return + for actionGroup in reversed(data['actions']): for action in actionGroup: if action['actorCellId'] != localPlayerCellId: @@ -1669,6 +1671,10 @@ async def autoBan(data, selection: ChampionSelection): candidates.extend(cfg.get(cfg.autoBanChampion)) + bans = itertools.chain(data["bans"]['myTeamBans'], + data["bans"]['theirTeamBans']) + candidates = [x for x in candidates if x not in bans] + # 给队友一点预选的时间 await asyncio.sleep(cfg.get(cfg.autoBanDelay)) diff --git a/app/view/opgg_build_interface.py b/app/view/opgg_build_interface.py index 340ee71..65c424e 100644 --- a/app/view/opgg_build_interface.py +++ b/app/view/opgg_build_interface.py @@ -963,7 +963,7 @@ def __initLayout(self): self.shardsPerksLayout.addLayout(layout) self.gridLayout.setAlignment(Qt.AlignCenter) - self.gridLayout.setHorizontalSpacing(20) + self.gridLayout.setHorizontalSpacing(18) self.gridLayout.setContentsMargins(0, 0, 4, 4) self.gridLayout.addWidget( self.mainTitleIcon, 0, 0, alignment=Qt.AlignCenter)