Skip to content

Commit

Permalink
1. BUG修复: 修复了战绩详情或生涯页中存在曾经奥恩能够升级的装备时(如盾弓), 程序获取资源出错的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
Hpero4 committed Oct 3, 2023
1 parent f099706 commit 0195c73
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/lol/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,16 @@ def __patch(self, path, data=None):


class JsonManager:

# 曾经奥恩可以升级的杰作装备
masterpieceItemsMap = {
7003: 6664, # 涡轮炼金罐
7004: 3068, # 日炎圣盾
7007: 6672, # 海妖杀手
7008: 6673, # 不朽盾弓
7022: 4005, # 帝国指令
}

def __init__(self, itemData, spellData, runeData, queueData, champions, skins):
self.items = {item["id"]: item["iconPath"] for item in itemData}
self.spells = {item["id"]: item["iconPath"] for item in spellData[:-3]}
Expand All @@ -537,6 +547,9 @@ def __init__(self, itemData, spellData, runeData, queueData, champions, skins):
]["skins"][item["name"]] = item["id"]
self.champions[champs[championId]]["id"] = championId

for oldId, nowId in JsonManager.masterpieceItemsMap.items():
self.items[oldId] = self.items[nowId]

def getItemIconPath(self, iconId):
if iconId != 0:
return self.items[iconId]
Expand Down

0 comments on commit 0195c73

Please sign in to comment.