def _transform(self, data): data["iconPath"] = cdragon_url(data["iconPath"]) data["cleanedDescription"] = cdragon_sanitize(data["description"]) if data["requiredChampion"] == "": data["requiredChampion"] = None if data["requiredBuffCurrencyName"] == "": data["requiredBuffCurrencyName"] = "GOLD" data["requiredBuffCurrencyCost"] = data["price"] return data
def _transform(self, data): data["squarePortraitPath"] = cdragon_url(data["squarePortraitPath"]) data["tacticalInfo"]["damageType"] = start_k( data["tacticalInfo"]["damageType"]) skins = [] for skin in data["skins"]: skin["splashPath"] = cdragon_url(skin.pop("splashPath", None)) skin["uncenteredSplashPath"] = cdragon_url( skin.pop("uncenteredSplashPath", None)) skin["tilePath"] = cdragon_url(skin.pop("tilePath", None)) skin["loadScreenPath"] = cdragon_url( skin.pop("loadScreenPath", None)) skin["rarity"] = start_k(skin.pop("rarity", None)) skin["chromaPath"] = cdragon_url(skin.pop("chromaPath", None)) if "chromas" in skin: chromas = [] for chroma in skin["chromas"]: chroma["chromaPath"] = cdragon_url( chroma.pop("chromaPath", None)) chromas.append(chroma) skin["chromas"] = chromas if skin["skinLines"] is not None: skin["skinLines"] = skin["skinLines"][0]["id"] skins.append(skin) data["skins"] = skins data["passive"]["abilityIconPath"] = cdragon_url( data["passive"]["abilityIconPath"]) spells = {} for spell in data["spells"]: spell["abilityIconPath"] = cdragon_url(spell["abilityIconPath"]) spell["cost"] = spell.pop("costCoefficients")[:5] spell["cooldown"] = spell.pop("cooldownCoefficients")[:5] spell["cleanedDescription"] = cdragon_sanitize( spell["dynamicDescription"]) spell.pop("formulas", None) spell.pop("coefficients", None) spell.pop("effectAmounts", None) spell.pop("ammo", None) spell.pop("maxLevel", None) spells[spell["spellKey"]] = spell spells["p"] = data.pop("passive") data["spells"] = spells return data
def _transform(self, data): data["iconPath"] = cdragon_url(data["iconPath"]) return data
def chroma_abspath(self) -> str: return cdragon_url(self.chroma_path)
def load_screen_vintage_abspath(self) -> str: return cdragon_url(self.load_screen_vintage_path)
def tile_abspath(self) -> str: return cdragon_url(self.tile_path)
def uncentered_splash_abspath(self) -> str: return cdragon_url(self.uncentered_splash_path)
def splash_abspath(self) -> str: return cdragon_url(self.splash_path)
def ban_vo_abspath(self) -> str: return cdragon_url(self.ban_vo_path)
def choose_vo_abspath(self) -> str: return cdragon_url(self.choose_vo_path)
def stinger_sfx_abspath(self) -> str: return cdragon_url(self.stinger_sfx_path)
def square_abspath(self) -> str: return cdragon_url(self.square_path)
def icon_abspath(self) -> str: return cdragon_url(self.icon_path)
def collection_splash_video_abspath(self) -> str: return cdragon_url(self.collection_splash_video_path)