diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-02-24 18:08:40 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-02-24 18:08:40 +0100 |
commit | 997ddcfb21d0c59f504becd5ee281aa54202eeeb (patch) | |
tree | 2d0d66322c8de1da513b0121665a56dab7c8a738 /src/main/java/at/hannibal2/skyhanni | |
parent | 996a75601b8c74c31bd313e4f9e94f11373e3188 (diff) | |
download | skyhanni-997ddcfb21d0c59f504becd5ee281aa54202eeeb.tar.gz skyhanni-997ddcfb21d0c59f504becd5ee281aa54202eeeb.tar.bz2 skyhanni-997ddcfb21d0c59f504becd5ee281aa54202eeeb.zip |
fix for better skill support for /shdebug
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt | 12 |
1 files changed, 7 insertions, 5 deletions
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<String>.addDebug(skillType: SkillType?, skillInfo: SkillInfo) { + private fun MutableList<String>.addDebug(skillType: SkillType, skillInfo: SkillInfo) { add("Name: $skillType") add("- Level: ${skillInfo.level}") add("- CurrentXp: ${skillInfo.currentXp}") |