Skip to content

Commit

Permalink
1. 功能更新: 在BP阶段提示玩家所处队伍(红/蓝)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hpero4 committed Oct 13, 2023
1 parent 11f7f68 commit 8200c39
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/lol/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,12 @@ def getGameStatus(self):

return res

@retry()
def getMapSide(self):
js = self.__get("/lol-champ-select/v1/pin-drop-notification").json()

return js.get("mapSide", "")

@retry()
def getReadyCheckStatus(self):
res = self.__get("/lol-matchmaking/v1/ready-check").json()
Expand Down
7 changes: 7 additions & 0 deletions app/view/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,13 @@ def __onGameStatusChanged(self, status):
self.__onGameEnd()
elif status == 'ChampSelect':
title = self.tr("Selecting Champions")

# 在标题添加所处队伍
mapSide = connector.getMapSide()
if mapSide:
mapSide = self.tr("Blue Team") if mapSide == "blue" else self.tr("Red Team")
title = title + " - " + mapSide

self.__onChampionSelectBegin()
self.isChampSelected = True
elif status == 'GameStart':
Expand Down

0 comments on commit 8200c39

Please sign in to comment.