aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/api
diff options
context:
space:
mode:
authorDavid Cole <40234707+DavidArthurCole@users.noreply.github.com>2024-10-13 09:54:05 -0400
committerGitHub <noreply@github.com>2024-10-13 15:54:05 +0200
commite0ae2e8ad4602b3e96fb6ec39716709f225d2461 (patch)
treeb70ad5cec46af89dd0f05a61d39027a964c03693 /src/main/java/at/hannibal2/skyhanni/api
parent113389a86c769d4d3a547fac5b7440fa8f29bc6f (diff)
downloadskyhanni-e0ae2e8ad4602b3e96fb6ec39716709f225d2461.tar.gz
skyhanni-e0ae2e8ad4602b3e96fb6ec39716709f225d2461.tar.bz2
skyhanni-e0ae2e8ad4602b3e96fb6ec39716709f225d2461.zip
Backend: Detekt Fixes Part 7 (#2667)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/api')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt
index ba8e42d66..95e39d1f7 100644
--- a/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt
@@ -324,7 +324,14 @@ object SkillAPI {
val nextLevelDiff = levelArray.getOrNull(level)?.toDouble() ?: 7_600_000.0
val nextLevelProgress = nextLevelDiff * xpPercentage / 100
val totalXp = levelXp + nextLevelProgress
- updateSkillInfo(existingLevel, level, nextLevelProgress.toLong(), nextLevelDiff.toLong(), totalXp.toLong(), matcher.group("gained"))
+ updateSkillInfo(
+ existingLevel,
+ level,
+ nextLevelProgress.toLong(),
+ nextLevelDiff.toLong(),
+ totalXp.toLong(),
+ matcher.group("gained"),
+ )
} else {
val exactLevel = getLevelExact(needed)
val levelXp = calculateLevelXp(existingLevel.level - 1).toLong() + current
@@ -468,7 +475,9 @@ object SkillAPI {
val skill = storage?.get(skillType) ?: return
if (targetLevel <= skill.overflowLevel) {
- ChatUtils.userError("Custom goal level ($targetLevel) must be greater than your current level (${skill.overflowLevel}).")
+ ChatUtils.userError(
+ "Custom goal level ($targetLevel) must be greater than your current level (${skill.overflowLevel})."
+ )
return
}