mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-14 20:54:17 +01:00
Fix wildcard automations being shown in the UI as active even if the characters triggering it had exact matches already
This commit is contained in:
parent
9c616f1242
commit
9a72928749
1 changed files with 23 additions and 0 deletions
|
|
@ -241,11 +241,34 @@ public class SetSelector : IDisposable
|
||||||
{
|
{
|
||||||
var actorNameStr = actorId.PlayerName.ToString();
|
var actorNameStr = actorId.PlayerName.ToString();
|
||||||
if (regex.IsMatch(actorNameStr))
|
if (regex.IsMatch(actorNameStr))
|
||||||
|
{
|
||||||
|
// Don't show wildcard match as active if the actor already has an exact match automation
|
||||||
|
var hasExactMatch = false;
|
||||||
|
foreach (var designSet in _manager)
|
||||||
|
{
|
||||||
|
if (!designSet.Enabled)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
foreach (var otherId in designSet.Identifiers)
|
||||||
|
{
|
||||||
|
if (otherId.Equals(actorId))
|
||||||
|
{
|
||||||
|
hasExactMatch = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hasExactMatch)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hasExactMatch)
|
||||||
|
continue;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue