Skip to content

Commit

Permalink
Add a check to make sure the player actor is not in the collection
Browse files Browse the repository at this point in the history
  • Loading branch information
SheepGoMeh committed Sep 12, 2020
1 parent 8798b05 commit 14c68f2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Visibility/VisibilityPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ private void CheckRender<T>(IEnumerable<T> collection, ICollection<int> friendCo
{
foreach (var item in collection)
{
if (item == _pluginInterface.ClientState.LocalPlayer)
{
continue;
}

var lookupId = item is BattleNpc battleNpc ? battleNpc.OwnerId : item.ActorId;
if ((showParty && _partyActorId.Contains(lookupId))
|| (showFriend && friendCollection.Contains(lookupId))
Expand Down

0 comments on commit 14c68f2

Please sign in to comment.