From 90da8983eaa77e44c32b9841212741404ab98b98 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 30 Nov 2023 22:49:06 +0100 Subject: improved readability --- .../features/event/UniqueGiftingOpportunitiesFeatures.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/java/at/hannibal2') diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt index 2a9e4d349..d3b75780c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt @@ -70,15 +70,15 @@ object UniqueGiftingOpportunitiesFeatures { if (!isEnabled()) return val entity = event.entity if (entity is EntityPlayerSP) return - if (entity is EntityPlayer && !entity.isNPC() && excludeIronman(entity) && excludeBingo(entity) && !hasGiftedPlayer(entity)) + if (entity is EntityPlayer && !entity.isNPC() && !isIronman(entity) && !isBingo(entity) && !hasGiftedPlayer(entity)) event.color = LorenzColor.DARK_GREEN.toColor().withAlpha(127) } - private fun excludeBingo(entity: EntityLivingBase) = - HypixelData.bingo || !entity.displayName.formattedText.endsWith("Ⓑ§r") + private fun isBingo(entity: EntityLivingBase) = + !HypixelData.bingo && entity.displayName.formattedText.endsWith("Ⓑ§r") - private fun excludeIronman(entity: EntityLivingBase) = - HypixelData.bingo || HypixelData.ironman || !entity.displayName.formattedText.endsWith("♲§r") + private fun isIronman(entity: EntityLivingBase) = + !LorenzUtils.noTradeMode && entity.displayName.formattedText.endsWith("♲§r") @SubscribeEvent fun onChat(event: LorenzChatEvent) { -- cgit