From 1b19b0181129e12604f48b96a9f0e0192070a2c1 Mon Sep 17 00:00:00 2001 From: Anna Date: Sat, 8 Aug 2020 22:18:20 -0400 Subject: [PATCH] refactor: make status checkers one line --- Peeping Tom/TargetWatcher.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Peeping Tom/TargetWatcher.cs b/Peeping Tom/TargetWatcher.cs index e24118c..621d718 100644 --- a/Peeping Tom/TargetWatcher.cs +++ b/Peeping Tom/TargetWatcher.cs @@ -159,17 +159,11 @@ namespace PeepingTom { return Marshal.ReadByte(statusPtr); } - private bool InCombat(Actor actor) { - return (GetStatus(actor) & 2) > 0; - } + private bool InCombat(Actor actor) => (this.GetStatus(actor) & 2) > 0; - private bool InParty(Actor actor) { - return (GetStatus(actor) & 16) > 0; - } + private bool InParty(Actor actor) => (this.GetStatus(actor) & 16) > 0; - private bool InAlliance(Actor actor) { - return (GetStatus(actor) & 32) > 0; - } + private bool InAlliance(Actor actor) => (this.GetStatus(actor) & 32) > 0; private bool CanPlaySound() { if (!this.plugin.Config.PlaySoundOnTarget) {