Fix for battle minions

This commit is contained in:
RisaDev
2024-10-27 19:06:45 +03:00
parent 1802e500f4
commit b3086529d1

View File

@@ -29,10 +29,15 @@ public static class ActorIdentifierExtensions
}
/// <summary>
/// Matches() method but ignoring ownership for owned objects.
/// Matches() method but ignoring ownership for owned objects or if one of identifiers is NPC while the other one is Owned.
/// </summary>
public static bool MatchesIgnoringOwnership(this ActorIdentifier identifier, ActorIdentifier other)
{
//carbuncles and other battle minions
if ((identifier.Type == IdentifierType.Npc && other.Type == IdentifierType.Owned) ||
(identifier.Type == IdentifierType.Owned && other.Type == IdentifierType.Npc))
return PenumbraExtensions.Manager.DataIdEquals(identifier, other);
if (identifier.Type != other.Type)
return false;