aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/CombatUtils.kt
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-08 02:25:22 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-08 02:25:22 +0200
commit7b6aac3ea8b7aebaef104097b0ac7767b27f4c80 (patch)
tree7b9e068b912256f1bfccbc717517d17aa62542b8 /src/main/java/at/hannibal2/skyhanni/utils/CombatUtils.kt
parent2ac1f3d037fee016063cd7bc499d4abcfeb765d5 (diff)
downloadskyhanni-7b6aac3ea8b7aebaef104097b0ac7767b27f4c80.tar.gz
skyhanni-7b6aac3ea8b7aebaef104097b0ac7767b27f4c80.tar.bz2
skyhanni-7b6aac3ea8b7aebaef104097b0ac7767b27f4c80.zip
code cleanup utils
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/CombatUtils.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/CombatUtils.kt4
1 files changed, 2 insertions, 2 deletions
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