mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 10:17:23 +01:00
Fix wildcard on retainers triggering automations on mannequins
This commit is contained in:
parent
03cdc1224e
commit
9c616f1242
2 changed files with 19 additions and 1 deletions
|
|
@ -167,6 +167,12 @@ public sealed class AutoDesignApplier : IDisposable
|
|||
if (key.Type != id.Type)
|
||||
continue;
|
||||
|
||||
if (key.Type == IdentifierType.Retainer)
|
||||
{
|
||||
if (id.Retainer != ActorIdentifier.RetainerType.Both && key.Retainer != ActorIdentifier.RetainerType.Both && id.Retainer != key.Retainer)
|
||||
continue;
|
||||
}
|
||||
|
||||
var worldMatches = key.Type switch
|
||||
{
|
||||
IdentifierType.Player => key.HomeWorld == id.HomeWorld || key.HomeWorld == Penumbra.GameData.Structs.WorldId.AnyWorld || id.HomeWorld == Penumbra.GameData.Structs.WorldId.AnyWorld,
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ using OtterGui;
|
|||
using OtterGui.Classes;
|
||||
using OtterGui.Extensions;
|
||||
using OtterGui.Raii;
|
||||
using Penumbra.GameData.Actors;
|
||||
using Penumbra.GameData.Enums;
|
||||
using Penumbra.GameData.Interop;
|
||||
using Penumbra.String;
|
||||
using ImGuiClip = OtterGui.ImGuiClip;
|
||||
|
|
@ -225,7 +227,17 @@ public class SetSelector : IDisposable
|
|||
|
||||
foreach (var (actorId, _) in _objects)
|
||||
{
|
||||
if (actorId.Type == id.Type && actorId.DataId == id.DataId)
|
||||
if (actorId.Type != id.Type)
|
||||
continue;
|
||||
|
||||
// For retainers, also check the RetainerType to avoid matching Bell retainers with Mannequins
|
||||
if (actorId.Type == IdentifierType.Retainer)
|
||||
{
|
||||
if (id.Retainer != ActorIdentifier.RetainerType.Both && actorId.Retainer != ActorIdentifier.RetainerType.Both && id.Retainer != actorId.Retainer)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (actorId.DataId == id.DataId)
|
||||
{
|
||||
var actorNameStr = actorId.PlayerName.ToString();
|
||||
if (regex.IsMatch(actorNameStr))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue