From 8502a8847e0f91e12ae360c5fdb70dbf4702865a Mon Sep 17 00:00:00 2001 From: HoraceHyy Date: Thu, 22 Feb 2024 21:25:18 +0800 Subject: [PATCH 1/2] fix: star rail rank additions issue --- .../Components/StarRailInfoCard.vue | 34 +++---------------- 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/src/pages/StarRailPage/Components/StarRailInfoCard.vue b/src/pages/StarRailPage/Components/StarRailInfoCard.vue index 84f2e107..2a89f3f0 100644 --- a/src/pages/StarRailPage/Components/StarRailInfoCard.vue +++ b/src/pages/StarRailPage/Components/StarRailInfoCard.vue @@ -3,7 +3,7 @@ import {computed, onMounted, ref} from 'vue' import {useRouter} from 'vue-router' import {translate} from '../../../i18n' import StatIcon from '../../../components/StatIcon.vue' -import {RankInfo, RankLevelUpSkillInfo} from '../../../types/starrail/srRankMap' +import {RankInfo} from '../../../types/starrail/srRankMap' import {AttributeInfo, CharacterInfo, FormattedApiInfo, RelicSetInfo} from '../../../types/starrail/srPlayerInfo' import {useDialog} from '../../../utils/template-dialog' import SRCharDetailsDialog from "./SRCharDetailsDialog.vue"; @@ -44,29 +44,6 @@ const showcaseIdx = ref(0) const ascLevelMap = [20, 30, 40, 50, 60, 70, 80] let rankMap: Record = {} const ranksReady = ref(false) -// const rankAdditions = ref([]) -const rankAdditions = computed(() => { - if (!ranksReady.value || !playerInfoReady.value) { - return {} - } - let res: Record = {} - playerInfo.value.characters.forEach((character: CharacterInfo) => { - const rank = character.rank - if (rank >= 3 && rank < 5) { - rankMap[character.id + "03"].level_up_skills.forEach((obj: RankLevelUpSkillInfo) => { - res[obj.id] = obj.num - }) - } else if (rank >= 5) { - rankMap[character.id + "03"].level_up_skills.forEach((obj: RankLevelUpSkillInfo) => { - res[obj.id] = obj.num - }) - rankMap[character.id + "05"].level_up_skills.forEach((obj: RankLevelUpSkillInfo) => { - res[obj.id] = obj.num - }) - } - }) - return res -}) onMounted(() => { fetch(translate('sr_charRanksJsonUrl')) @@ -558,19 +535,16 @@ const showCharDetails = (index: number) => {
+ v-if="character.skill_trees[idx - 1].max_level <= (idx == 1 ? 6 : 10)"> {{ character.skill_trees[idx - 1].level }} /{{ character.skill_trees[idx - 1].max_level }}
{{ - character.skill_trees[idx - 1].level + rankAdditions[character.skills[idx - - 1].id] + character.skill_trees[idx - 1].level + (idx == 1 ? 1 : 2) }} /{{ - character.skill_trees[idx - 1].max_level + - rankAdditions[character.skills[idx - - 1].id] + character.skill_trees[idx - 1].max_level }}
From e51ddab467cec254fb41c74b4d6284dbb7bdb8e4 Mon Sep 17 00:00:00 2001 From: HoraceHyy Date: Thu, 22 Feb 2024 21:27:10 +0800 Subject: [PATCH 2/2] Bump version to 2.5.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e7cc830b..be9c5180 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "miXeD", - "version": "2.5.3", + "version": "2.5.4", "main": "dist-electron/main/index.js", "description": "All-in-one MiHOYO game launcher", "author": "HoraceHYY <3214442497@qq.com>",