Fixed conditions being ignored on delayed status effects. Closes #866

This commit is contained in:
Joonas Rikkonen
2018-10-30 20:13:54 +02:00
parent 33d971f5d0
commit 1b4b5bb2e7

View File

@@ -29,6 +29,7 @@ namespace Barotrauma
if (!Stackable && DelayList.Any(d => d.Parent == this && d.Targets.Count == 1 && d.Targets[0] == target)) return;
if (targetNames != null && !targetNames.Contains(target.Name)) return;
if (!HasRequiredConditions(new List<ISerializableEntity>() { target })) return;
DelayedListElement element = new DelayedListElement
{
@@ -53,6 +54,8 @@ namespace Barotrauma
if (targets.Count == 0) return;
}
if (!HasRequiredConditions(targets)) return;
DelayedListElement element = new DelayedListElement
{
Parent = this,