mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Update PlayerWatcher to deal with multiple actors with the same name.
This commit is contained in:
parent
0b8a3d2d11
commit
b6304d43db
4 changed files with 75 additions and 37 deletions
|
|
@ -86,12 +86,12 @@ namespace Penumbra.PlayerWatch
|
|||
return _playerWatch!.UpdatePlayerWithoutEvent( actor );
|
||||
}
|
||||
|
||||
public IEnumerable< (string, CharacterEquipment) > WatchedPlayers()
|
||||
public IEnumerable< (string, (uint, CharacterEquipment)[]) > WatchedPlayers()
|
||||
{
|
||||
CheckValidity();
|
||||
return _playerWatch!.Equip
|
||||
.Where( kvp => kvp.Value.Item2.Contains( this ) )
|
||||
.Select( kvp => ( kvp.Key, kvp.Value.Item1 ) );
|
||||
.Where( kvp => kvp.Value.RegisteredWatchers.Contains( this ) )
|
||||
.Select( kvp => ( kvp.Key, kvp.Value.FoundActors.Select( kvp2 => ( kvp2.Key, kvp2.Value ) ).ToArray() ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue