refactor: make status checkers one line

This commit is contained in:
Anna 2020-08-08 22:18:20 -04:00
parent ddd60a730e
commit 1b19b01811
1 changed files with 3 additions and 9 deletions

View File

@ -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) {