mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-13 12:14:17 +01:00
Add option to get watched players and their current equip from IPlayerWatcher.
This commit is contained in:
parent
adb1aaeb93
commit
65778bb1b4
3 changed files with 26 additions and 13 deletions
|
|
@ -1,4 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Dalamud.Game.ClientState.Actors.Types;
|
||||
using Dalamud.Plugin;
|
||||
using Penumbra.GameData.Structs;
|
||||
|
|
@ -81,6 +83,14 @@ namespace Penumbra.PlayerWatch
|
|||
CheckValidity();
|
||||
return _playerWatch!.UpdateActorWithoutEvent( actor );
|
||||
}
|
||||
|
||||
public IEnumerable< (string, ActorEquipment) > WatchedPlayers()
|
||||
{
|
||||
CheckValidity();
|
||||
return _playerWatch!.Equip
|
||||
.Where( kvp => kvp.Value.Item2.Contains( this ) )
|
||||
.Select( kvp => ( kvp.Key, kvp.Value.Item1 ) );
|
||||
}
|
||||
}
|
||||
|
||||
public static class PlayerWatchFactory
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue