class RemoveAllModifiersEffector extends Effector
{
	var m_statType : gamedataStatType;
	var m_applicationTarget : CName;
	var m_target : StatsObjectID;

	protected export override function Initialize( record : TweakDBID, game : GameInstance, parentRecord : TweakDBID )
	{
		m_statType = TweakDBInterface.GetRemoveAllModifiersEffectorRecord( record ).StatType().StatType();
		m_applicationTarget = TweakDBInterface.GetCName( record + T".applicationTarget", '' );
	}

	protected override function RepeatedAction( owner : GameObject )
	{
		ProcessEffector( owner );
	}

	protected export override function ActionOn( owner : GameObject )
	{
		ProcessEffector( owner );
	}

	private function ProcessEffector( owner : GameObject )
	{
		var ss : StatsSystem;
		if( !( GetApplicationTargetAsStatsObjectID( owner, m_applicationTarget, m_target ) ) )
		{
			return;
		}
		ss = GameInstance.GetStatsSystem( owner.GetGame() );
		ss.RemoveAllModifiers( m_target, m_statType, true );
	}

}

