diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt index 02ca00298..c154dd38b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt @@ -46,8 +46,8 @@ object HighlightBonzoMasks { fun onBackgroundDrawn(event: GuiContainerEvent.BackgroundDrawnEvent) { if (!config.depletedBonzosMasks) return for (slot in event.gui.inventorySlots.inventorySlots) { - val item = slot.stack ?: continue - val maskType = MaskType.getByInternalName(item.getInternalName()) ?: continue + val internalName = slot.stack?.getInternalName() ?: continue + val maskType = MaskType.getByInternalName(internalName) ?: continue val readyAt = maskTimers[maskType] ?: continue if (readyAt.isInFuture()) { @@ -60,6 +60,7 @@ object HighlightBonzoMasks { @SubscribeEvent fun onChat(event: LorenzChatEvent) { val message = event.message.removeColor() + // TODO move pattern into enum if (bonzoMaskPattern.matches(message)) { maskTimers[MaskType.BONZO_MASK] = SimpleTimeMark.now() + MaskType.BONZO_MASK.cooldown } else if (spiritMaskPattern.matches(message)) { |