From 7b6aac3ea8b7aebaef104097b0ac7767b27f4c80 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 8 Aug 2023 02:25:22 +0200 Subject: code cleanup utils --- src/main/java/at/hannibal2/skyhanni/utils/CombatUtils.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/utils/CombatUtils.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/CombatUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/CombatUtils.kt index 8f64a2d6e..3bf5ff2f6 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/CombatUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/CombatUtils.kt @@ -13,7 +13,7 @@ object CombatUtils { var lastUpdate: Long = -1 private var skillInfo: XPInformation.SkillInfo? = null private var skillInfoLast: XPInformation.SkillInfo? = null - private const val skillType = "Combat" + private const val SKILL_TYPE = "Combat" var xpGainHourLast = -1f var xpGainHour = -1f var isKilling = false @@ -33,7 +33,7 @@ object CombatUtils { lastUpdate = System.currentTimeMillis() xpGainHourLast = xpGainHour skillInfoLast = skillInfo - skillInfo = XPInformation.getInstance().getSkillInfo(skillType) ?: return + skillInfo = XPInformation.getInstance().getSkillInfo(SKILL_TYPE) ?: return val totalXp: Float = skillInfo!!.totalXp if (lastTotalXp > 0) { val delta: Float = totalXp - lastTotalXp -- cgit