mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-14 20:54:16 +01:00
Make temporary collection always respect ownership.
This commit is contained in:
parent
2358eb378d
commit
c4f6038d1e
1 changed files with 19 additions and 5 deletions
|
|
@ -199,10 +199,24 @@ public sealed unsafe class CollectionResolver(
|
||||||
|
|
||||||
/// <summary> Check both temporary and permanent character collections. Temporary first. </summary>
|
/// <summary> Check both temporary and permanent character collections. Temporary first. </summary>
|
||||||
private ModCollection? CollectionByIdentifier(ActorIdentifier identifier)
|
private ModCollection? CollectionByIdentifier(ActorIdentifier identifier)
|
||||||
=> tempCollections.Collections.TryGetCollection(identifier, out var collection)
|
{
|
||||||
|| collectionManager.Active.Individuals.TryGetCollection(identifier, out collection)
|
if (tempCollections.Collections.TryGetCollection(identifier, out var collection))
|
||||||
? collection
|
return collection;
|
||||||
: null;
|
|
||||||
|
// Always inherit ownership for temporary collections.
|
||||||
|
if (identifier.Type is IdentifierType.Owned)
|
||||||
|
{
|
||||||
|
var playerIdentifier = actors.CreateIndividualUnchecked(IdentifierType.Player, identifier.PlayerName,
|
||||||
|
identifier.HomeWorld.Id, ObjectKind.None, uint.MaxValue);
|
||||||
|
if (tempCollections.Collections.TryGetCollection(playerIdentifier, out collection))
|
||||||
|
return collection;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (collectionManager.Active.Individuals.TryGetCollection(identifier, out collection))
|
||||||
|
return collection;
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary> Check for the Yourself collection. </summary>
|
/// <summary> Check for the Yourself collection. </summary>
|
||||||
private ModCollection? CheckYourself(ActorIdentifier identifier, Actor actor)
|
private ModCollection? CheckYourself(ActorIdentifier identifier, Actor actor)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue