Skip to content

Commit

Permalink
Fix Skill Upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
lonqie committed Dec 30, 2022
1 parent f015050 commit 7fac6be
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Noto+Sans+KR:wght@400;500;700&family=Noto+Sans+SC:wght@400;500;700&family=Noto+Sans+TC:wght@400;500;700&family=Noto+Sans+Thai:wght@400;500;700&family=Nunito+Sans:ital,wght@0,400;0,600;0,700;1,400;1,700&family=Oswald&display=swap" rel="stylesheet">
<link rel="icon" type="image/png" href="favicon.png">
<link rel="manifest" href="./manifest.json" crossorigin="use-credentials">
<link href="css/main.css?v=78" rel="stylesheet">
<link href="css/main.css?v=79" rel="stylesheet">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XQEWDXR13H"></script>
<script>
Expand Down Expand Up @@ -230,9 +230,9 @@ <h5 class="modal-title" data-localize-id="ui,changelog"></h5>
</div>
</body>
<script>
const cache_ver = 78
const cache_ver = 79
document.getElementById('loading-spinner').style.display = null;
window.setTimeout(x => {document.getElementById('loading-skipmsg').style.display = null;}, 10000);
</script>
<script src="js/common.min.js?v=78"></script>
<script src="js/common.min.js?v=79"></script>
</html>
20 changes: 8 additions & 12 deletions js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -5656,22 +5656,18 @@ function recalculateSkillPreview() {

let skill

if (showSkillUpgrades && skillType == 'normal' && "Released" in student.Gear && student.Gear.Released[regionID]) {
if (skillType == 'normal' && showSkillUpgrades && "Released" in student.Gear && student.Gear.Released[regionID]) {
skill = find(student.Skills, 'SkillType', 'gearnormal')[0]
$(`#ba-skill-normal-icon`).toggleClass('plus', true)
$(`#ba-skill-normal-icon`).toggleClass('plus', true).find('img').attr("src", `images/skill/${skill.Icon}.png`)
$(`#ba-skill-normal-plus`).toggle(true)
} else if (skillType == 'passive') {
if (showSkillUpgrades) {
skill = find(student.Skills, 'SkillType', 'weaponpassive')[0]
$(`#ba-skill-passive-icon`).toggleClass('plus', true).find('img').attr("src", `images/skill/${skill.Icon}.png`)
$(`#ba-skill-passive-plus`).toggle(true)
} else {
skill = find(student.Skills, 'SkillType', 'passive')[0]
$(`#ba-skill-passive-icon`).toggleClass('plus', false).find('img').attr("src", `images/skill/${skill.Icon}.png`)
$(`#ba-skill-passive-plus`).toggle(false)
}
} else if (skillType == 'passive' && showSkillUpgrades) {
skill = find(student.Skills, 'SkillType', 'weaponpassive')[0]
$(`#ba-skill-passive-icon`).toggleClass('plus', true).find('img').attr("src", `images/skill/${skill.Icon}.png`)
$(`#ba-skill-passive-plus`).toggle(true)
} else {
skill = find(student.Skills, 'SkillType', skillType)[0]
$(`#ba-skill-${skillType}-icon`).toggleClass('plus', false).find('img').attr("src", `images/skill/${skill.Icon}.png`)
$(`#ba-skill-${skillType}-plus`).toggle(false)
}

$(`#ba-skill-${skillType}-name`).html(skill.Name)
Expand Down
2 changes: 1 addition & 1 deletion js/common.min.js

Large diffs are not rendered by default.

0 comments on commit 7fac6be

Please sign in to comment.