fix: replace PartyList with status check

This commit is contained in:
Anna 2020-08-08 22:15:04 -04:00
parent d2ab96fcf9
commit 3b9bf011e1
1 changed files with 5 additions and 1 deletions

View File

@ -146,7 +146,7 @@ namespace PeepingTom {
return actors
.Where(actor => actor.TargetActorID == player.ActorId && actor is PlayerCharacter)
.Select(actor => actor as PlayerCharacter)
.Where(actor => this.plugin.Config.LogParty || this.plugin.Interface.ClientState.PartyList.All(member => member.Actor?.ActorId != actor.ActorId))
.Where(actor => this.plugin.Config.LogParty || !this.InParty(actor))
.Where(actor => this.plugin.Config.LogAlliance || !this.InAlliance(actor))
.Where(actor => this.plugin.Config.LogInCombat || !this.InCombat(actor))
.Where(actor => this.plugin.Config.LogSelf || actor.ActorId != player.ActorId)
@ -163,6 +163,10 @@ namespace PeepingTom {
return (GetStatus(actor) & 2) > 0;
}
private bool InParty(Actor actor) {
return (GetStatus(actor) & 16) > 0;
}
private bool InAlliance(Actor actor) {
return (GetStatus(actor) & 32) > 0;
}