From 997ddcfb21d0c59f504becd5ee281aa54202eeeb Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 24 Feb 2024 18:08:40 +0100 Subject: fix for better skill support for /shdebug --- src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt index a1e74a17e..e309f5b66 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt @@ -201,11 +201,13 @@ object SkillAPI { return } + val skillType = activeSkill + if (skillType == null) { + event.addIrrelevant("activeSkill is null") + return + } + event.addData { - val skillType = activeSkill - if (skillType == null) { - event.addIrrelevant("activeSkill is null") - } storage[skillType]?.let { skillInfo -> addDebug(skillType, skillInfo) } @@ -228,7 +230,7 @@ object SkillAPI { } } - private fun MutableList.addDebug(skillType: SkillType?, skillInfo: SkillInfo) { + private fun MutableList.addDebug(skillType: SkillType, skillInfo: SkillInfo) { add("Name: $skillType") add("- Level: ${skillInfo.level}") add("- CurrentXp: ${skillInfo.currentXp}") -- cgit