class RestoreStatPoolEffector extends Effector
{
	var m_statPoolType : gamedataStatPoolType;
	var m_valueToRestore : Float;
	var m_percentage : Bool;

	protected override function Initialize( record : TweakDBID, game : GameInstance, parentRecord : TweakDBID )
	{
		m_statPoolType = ( ( gamedataStatPoolType )( ( ( Int32 )( EnumValueFromString( "gamedataStatPoolType", TweakDBInterface.GetString( record + T".statPoolType", "" ) ) ) ) ) );
		m_valueToRestore = TweakDBInterface.GetFloat( record + T".value", 0.0 );
		m_percentage = TweakDBInterface.GetBool( record + T".isPercentage", false );
	}

	protected override function ActionOn( owner : GameObject )
	{
		if( m_statPoolType != gamedataStatPoolType.Invalid && ( m_valueToRestore > 0.0 ) )
		{
			GameInstance.GetStatPoolsSystem( owner.GetGame() ).RequestChangingStatPoolValue( owner.GetEntityID(), m_statPoolType, m_valueToRestore, owner, false, m_percentage );
		}
	}

}

