check name for Actor.GrantCondition()

This commit is contained in:
atlimit8
2020-04-26 01:19:31 -05:00
committed by abcdefg30
parent 1d2d8ed107
commit 1ef27d18c1
21 changed files with 38 additions and 44 deletions

View File

@@ -204,12 +204,10 @@ namespace OpenRA.Mods.Common.Traits
else
currentTargetDelay += 1;
if (!string.IsNullOrEmpty(info.CapturingCondition) &&
capturingToken == Actor.InvalidConditionToken)
if (capturingToken == Actor.InvalidConditionToken)
capturingToken = self.GrantCondition(info.CapturingCondition);
if (!string.IsNullOrEmpty(targetManager.info.BeingCapturedCondition) &&
targetManager.beingCapturedToken == Actor.InvalidConditionToken)
if (targetManager.beingCapturedToken == Actor.InvalidConditionToken)
targetManager.beingCapturedToken = target.GrantCondition(targetManager.info.BeingCapturedCondition);
captures = enabledCaptures