Skip to content

Commit

Permalink
修复排位模式下锁定英雄后 OPGG 界面不会自动跳转的问题 (#445)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzaphkiel committed Nov 7, 2024
1 parent 1f43c2f commit 63e4b2a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions app/lol/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1422,14 +1422,19 @@ async def showOpggBuild(data, selection: ChampionSelection):
# 只有在英雄已经选定后才会尝试刷新 OPGG 界面
for actionGroup in data['actions']:
for action in actionGroup:
if action['actorCellId'] == cellId and \
(not action['completed'] or action['type'] != 'pick'):
if not action['actorCellId'] == cellId:
continue

if action['type'] != 'pick':
continue

if not action['completed']:
return False

# 拿一下位置和英雄 ID
for player in data['myTeam']:
if player['cellId'] == cellId:
position = player.get('assignedPosition')
position = player.get('assignedPosition', "")
championId = player['championId'] or player['championPickIntent']
break

Expand Down Expand Up @@ -1460,6 +1465,7 @@ async def showOpggBuild(data, selection: ChampionSelection):
mode = ""

selection.opggShowChampionId = championId

signalBus.toOpggBuildInterface.emit(championId, mode, position)

return True
Expand Down
2 changes: 1 addition & 1 deletion app/resource/bin/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 编译
``` shell
gcc main.c -o main.exe -O2 -static-libgcc
gcc fix_lcu_window.c -o fix_lcu_window.exe -O2 -static-libgcc
```

## 运行
Expand Down

0 comments on commit 63e4b2a

Please sign in to comment.