Replace usage of the Stances dict by a method call
This commit is contained in:
@@ -114,7 +114,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (modifiers.HasModifier(TargetModifiers.ForceMove))
|
||||
return false;
|
||||
|
||||
var stance = self.Owner.Stances[target.Owner];
|
||||
var stance = target.Owner.RelationshipWith(self.Owner);
|
||||
if (!info.TargetStances.HasStance(stance) && !modifiers.HasModifier(TargetModifiers.ForceAttack))
|
||||
return false;
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor)
|
||||
{
|
||||
var stance = self.Owner.Stances[target.Owner];
|
||||
var stance = target.Owner.RelationshipWith(self.Owner);
|
||||
if (!info.TargetStances.HasStance(stance) && !modifiers.HasModifier(TargetModifiers.ForceAttack))
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user