mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-24 01:19:22 +01:00
Check Yourself assignment for special actors.
This commit is contained in:
parent
114ed5954e
commit
bfddcdd7e2
4 changed files with 20 additions and 19 deletions
|
|
@ -44,8 +44,8 @@ public unsafe partial class PathResolver
|
|||
else
|
||||
{
|
||||
var identifier = Penumbra.Actors.FromObject( gameObject, false );
|
||||
var collection = CollectionByIdentifier( identifier )
|
||||
?? CheckYourself( identifier, gameObject )
|
||||
var collection = CollectionByIdentifier( identifier, out var specialIdentifier )
|
||||
?? CheckYourself( identifier.Type == IdentifierType.Special ? specialIdentifier : identifier, gameObject )
|
||||
?? CollectionByAttributes( gameObject )
|
||||
?? CheckOwnedCollection( identifier, gameObject )
|
||||
?? Penumbra.CollectionManager.Default;
|
||||
|
|
@ -71,16 +71,16 @@ public unsafe partial class PathResolver
|
|||
}
|
||||
|
||||
var player = Penumbra.Actors.GetCurrentPlayer();
|
||||
return CollectionByIdentifier( player )
|
||||
return CollectionByIdentifier( player, out _ )
|
||||
?? CheckYourself( player, gameObject )
|
||||
?? CollectionByAttributes( gameObject )
|
||||
?? Penumbra.CollectionManager.Default;
|
||||
}
|
||||
|
||||
// Check both temporary and permanent character collections. Temporary first.
|
||||
private static ModCollection? CollectionByIdentifier( ActorIdentifier identifier )
|
||||
=> Penumbra.TempMods.Collections.TryGetCollection( identifier, out var collection )
|
||||
|| Penumbra.CollectionManager.Individuals.TryGetCollection( identifier, out collection )
|
||||
private static ModCollection? CollectionByIdentifier( ActorIdentifier identifier, out ActorIdentifier specialIdentifier )
|
||||
=> Penumbra.TempMods.Collections.TryGetCollection( identifier, out var collection, out specialIdentifier )
|
||||
|| Penumbra.CollectionManager.Individuals.TryGetCollection( identifier, out collection, out specialIdentifier )
|
||||
? collection
|
||||
: null;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue