Remove Actor.HasTrait<T>()

This commit is contained in:
atlimit8
2015-08-01 23:53:58 -05:00
parent 959914779f
commit 85fab45451
79 changed files with 153 additions and 153 deletions

View File

@@ -78,7 +78,7 @@ namespace OpenRA.Mods.Common.Traits
void ActorRemoved(Actor a)
{
if (a.Owner != Self.Owner || !a.HasTrait<SupportPower>())
if (a.Owner != Self.Owner || !a.Info.Traits.Contains<SupportPowerInfo>())
return;
foreach (var t in a.TraitsImplementing<SupportPower>())
@@ -119,7 +119,7 @@ namespace OpenRA.Mods.Common.Traits
public IEnumerable<SupportPowerInstance> GetPowersForActor(Actor a)
{
if (a.Owner != Self.Owner || !a.HasTrait<SupportPower>())
if (a.Owner != Self.Owner || !a.Info.Traits.Contains<SupportPowerInfo>())
return NoInstances;
return a.TraitsImplementing<SupportPower>()